While trying to emerge wordnet-2.0 I ran into the following problem gcc -O2 -pipe -DUNIX -I/var/tmp/portage/wordnet-2.0/temp/usr/include -c -o wnutil.o wnutil.c wnutil.c:11:20: error: malloc.h: No such file or directory make[2]: *** [wnutil.o] Error 1 make[2]: Target `all' not remade because of errors. make[1]: *** [library] Error 2 Compiling wn... gcc -O2 -pipe -DUNIX -I/var/tmp/portage/wordnet-2.0/temp/usr/include -c -o wn.o wn.c gcc -o wn -L/var/tmp/portage/wordnet-2.0/temp/usr/lib -L/usr/X11R6/lib wn.o -lwn /usr/bin/ld: warning -L: directory name (/var/tmp/portage/wordnet-2.0/temp/usr/lib) does not exist /usr/bin/ld: can't locate file for: -lwn collect2: ld returned 1 exit status make[2]: *** [wn] Error 1 make[2]: Target `all' not remade because of errors. Compiling wnb... gcc -O2 -pipe -DUNIX -I/var/tmp/portage/wordnet-2.0/temp/usr/include -c -o stubs.o stubs.c gcc -O2 -pipe -DUNIX -I/var/tmp/portage/wordnet-2.0/temp/usr/include -c -o tkAppInit.o tkAppInit.c gcc -o wishwn -L/var/tmp/portage/wordnet-2.0/temp/usr/lib -L/usr/X11R6/lib -L/usr/local/lib -L/ usr/local/lib -L/usr/openwin/lib stubs.o tkAppInit.o -ltk -ltcl -lX11 -lm -lnsl -ldl -lpthread -lwn /usr/bin/ld: warning -L: directory name (/var/tmp/portage/wordnet-2.0/temp/usr/lib) does not exist /usr/bin/ld: warning -L: directory name (/usr/openwin/lib) does not exist /usr/bin/ld: can't locate file for: -lnsl collect2: ld returned 1 exit status make[2]: *** [wishwn] Error 1 make[2]: Target `all' not remade because of errors. Skipping grind... Done compiling interfaces make[1]: Target `all' not remade because of errors. Installing wn... gcc -o wn -L/var/tmp/portage/wordnet-2.0/temp/usr/lib -L/usr/X11R6/lib wn.o -lwn /usr/bin/ld: warning -L: directory name (/var/tmp/portage/wordnet-2.0/temp/usr/lib) does not exist /usr/bin/ld: can't locate file for: -lwn collect2: ld returned 1 exit status make[2]: *** [wn] Error 1 Installing wnb... gcc -o wishwn -L/var/tmp/portage/wordnet-2.0/temp/usr/lib -L/usr/X11R6/lib stubs.o tkAppInit.o - lwn -ltk -ltcl -lX11 -lm -lnsl -ldl -lpthread /usr/bin/ld: warning -L: directory name (/var/tmp/portage/wordnet-2.0/temp/usr/lib) does not exist /usr/bin/ld: can't locate file for: -lwn collect2: ld returned 1 exit status make[2]: *** [wishwn] Error 1 Skipping grind... Done installing interfaces make: *** [wnsrc] Error 2 Reproducible: Always Steps to Reproduce: 1. 2. 3. Portage 2.0.51.22-r3 (default-darwin/macos/10.4, gcc-4.0.0, libsystem-7.1-r0, 8.2.0 Power Macintosh) =============================================================== == System uname: 8.2.0 Power Macintosh powerpc macos-20041118 distcc 2.0.1-zeroconf powerpc-apple-darwin7.0 (protocol 1) (default port 3632) [disabled] dev-lang/python: [Not Present] sys-apps/sandbox: [Not Present] sys-devel/autoconf: [Not Present] sys-devel/automake: [Not Present] sys-devel/binutils: [Not Present] sys-devel/libtool: [Not Present] virtual/os-headers: 7.1 ACCEPT_KEYWORDS="ppc-macos" AUTOCLEAN="yes" CBUILD="powerpc-apple-darwin8" CFLAGS="-O2 -pipe" CHOST="powerpc-apple-darwin8" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/ qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig collision-protect distlocks sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/ gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="ppc aalib emboss gdbm gif imagemagick libwww nls ogg opengl png ppc-macos qt sdl slang tiff vorbis userland_Darwin kernel_Darwin elibc_Darwin" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Created attachment 72277 [details, diff] solve the missing malloc.h problem on MacOSX The patch should make the package compile. Somehow I have problems using this patch in the ebuild
Created attachment 72738 [details, diff] make it compile on macosx Second try. This time I even get a clean emerge
try a #if defined(UNIX) && !defined(__APPLE__) instead of the extra #ifndef and #endif, looks nicer.
Created attachment 72747 [details, diff] make it compile on macosx, try 3 > try a #if defined(UNIX) && !defined(__APPLE__) instead of the extra #ifndef and > #endif, looks nicer. done
yup, you got it! Does the application run/work?
> Does the application run/work? Seems so. # wn hello -over Overview of noun hello The noun hello has 1 sense (first 1 from tagged texts) 1. (1) hello, hullo, hi, howdy, how-do-you-do -- (an expression of greeting; "every morning they exchanged polite hellos")
Added your patch, as ~ppc-macos in portage.