gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I/usr/X11R6/include -O2 -pipe -Wall -pedantic -Werror -c freeglut_joystick.c -MT libglut_la-freeglut_joystick.lo -MD -MP -MF .deps/libglut_la-freeglut_joystick.TPlo -fno-common -DPIC -o .libs/libglut_la-freeglut_joystick.lo cc1: warnings being treated as errors freeglut_joystick.c: In function 'fghJoystickOpen': freeglut_joystick.c:1063: warning: unused variable 'counter' freeglut_joystick.c:1042: warning: unused variable 'i' make[2]: *** [libglut_la-freeglut_joystick.lo] Error 1 make[2]: *** Waiting for unfinished jobs.... mv -f .libs/libglut_la-freeglut_geometry.lo libglut_la-freeglut_geometry.lo make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 !!! ERROR: media-libs/freeglut-2.4.0 failed Reproducible: Always Steps to Reproduce: 1. 2. 3. emerge info !!! Relying on the shell to locate gcc, this may break !!! DISTCC, installing gcc-config and setting your current gcc !!! profile will fix this Portage 2.0.51.22-r1 (default-darwin/macos/10.4, gcc-4.0.0, libsystem-7.1-r0, 8.1.0 Power Macintosh) ================================================================= System uname: 8.1.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 ~ppc-macos" AUTOCLEAN="yes" CBUILD="powerpc-apple-darwin" CFLAGS="-O2 -pipe" CHOST="powerpc-apple-darwin" 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 userpriv" 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" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="ppc X aalib bzip2 cdr curl ecc emboss gd idea ipv6 javascript jpeg ldap libwww mad nls ogg png ppc-macos python qt sdl slang sqlite ssl tetex tiff unicode vorbis xinerama xv zlib userland_Darwin kernel_Darwin elibc_Darwin" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
I don't have freeglut-2.4.0 in my portage (so it probably is brand new ;) ) however: cc1: warnings being treated as errors did you specify -Wall -W as CFLAGS in your /etc/make.conf? Otherwise the patch is quite simple, but I don't have the ebuild in my portage. Will check tomorrow.
This is actually interesting. It seems there is OSX code for joystick support, but I can't find anything on their website of OSX support. So I assumed it was not mature enough, and went the X11 way. I fixed this compilation issue by making OSX treated equal to Linux, as shown in the sourcefile patch. This package uses no use flags. Original reporter, can you easily check whether this patch results in a working freeglut for your setup?
Created attachment 62453 [details, diff] changes made to the ebuild Activates a patch which allow compilation to succeed on OSX Tiger
Created attachment 62454 [details, diff] Patch made to freeglut_joystick.c source file This patch allows compilation by treating OSX as linux. This results in X11 being used.
Created attachment 63046 [details, diff] Configure Patch for OSX Joystick Code Why not conditionally use your patch for USE=X and conditionally use the following patch for USE=aqua?
I think it's a BAD thing to remove -Werror here. Someone compiling with a native compiler like icc or Sun cc would get confronted with fatal errors while gcc just continues. The -Werror is there for a good reason. Also, I have no evidence whatsoever that the TARGET_HOST_MAC_OSX is being set. I do have evidence that no matter what you put between a TARGET_HOST_MAC_OSX block is being ignored. As such, my conclusion is that upstream is not yet prepared to support OSX natively. Since there is no message for OSX on their website, I think it is safe to only support X here. I think X and aqua are mutual exclusive, how to deal with that? :wq
freeglut-2.4.0 was already ~ppc-macos, hence I added my patch to allow compilation.