Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem emerging freeglut-2.4.0-r1 on PowerPC [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
dsorber
n00b
n00b


Joined: 07 May 2006
Posts: 11
Location: Washington D.C.

PostPosted: Sat Apr 12, 2008 3:11 pm    Post subject: Problem emerging freeglut-2.4.0-r1 on PowerPC [solved] Reply with quote

Hello all,

I decided to attempt to install Gentoo on my trusty PowerBook G4, which has served me well but is no longer my primary machine. Everything has gone smoothly except that I've run into a problem with freeglut-2.4.0-r1 when I tried to emerge gnome and X.

Code:

  You do not have 'march' set in your CFLAGS.
  This is known to cause compilation problems
  in freeglut-2.4.0.  If the compile fails, please set
  'march' to the appropriate architecture.
>>> Unpacking source...
>>> Unpacking freeglut-2.4.0.tar.gz to /var/tmp/portage/media-libs/freeglut-2.4.0-r1/work
  Applying freeglut-2.4.0-macos.patch ...

  Applying freeglut-gcc42.patch ...

  Applying 2.4.0-cursor.patch ...

>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/media-libs/freeglut-2.4.0-r1/work/freeglut-2.4.0 ...
 * econf: updating freeglut-2.4.0/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating freeglut-2.4.0/config.sub with /usr/share/gnuconfig/config.sub
./configure --prefix=/usr --host=powerpc-unknown-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-warnings --build=powerpc-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for powerpc-unknown-linux-gnu-gcc... powerpc-unknown-linux-gnu-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether powerpc-unknown-linux-gnu-gcc accepts -g... yes
checking for powerpc-unknown-linux-gnu-gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of powerpc-unknown-linux-gnu-gcc... gcc3
checking for an ANSI C-conforming const... yes
checking build system type... powerpc-unknown-linux-gnu
checking host system type... powerpc-unknown-linux-gnu
checking for ld used by GCC... /usr/powerpc-unknown-linux-gnu/bin/ld
checking if the linker (/usr/powerpc-unknown-linux-gnu/bin/ld) is GNU ld... yes
checking for /usr/powerpc-unknown-linux-gnu/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/powerpc-unknown-linux-gnu-nm -B
checking for a sed that does not truncate output... /bin/sed
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking command to parse /usr/bin/powerpc-unknown-linux-gnu-nm -B output... ok
checking how to run the C preprocessor... powerpc-unknown-linux-gnu-gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for powerpc-unknown-linux-gnu-ranlib... powerpc-unknown-linux-gnu-ranlib
checking for powerpc-unknown-linux-gnu-strip... powerpc-unknown-linux-gnu-strip
checking for objdir... .libs
checking for powerpc-unknown-linux-gnu-gcc option to produce PIC... -fPIC
checking if powerpc-unknown-linux-gnu-gcc PIC flag -fPIC works... yes
checking if powerpc-unknown-linux-gnu-gcc static flag -static works... yes
checking if powerpc-unknown-linux-gnu-gcc supports -c -o file.o... no
checking if we can lock with hard links... yes
checking if powerpc-unknown-linux-gnu-gcc supports -fno-rtti -fno-exceptions... no
checking whether the linker (/usr/powerpc-unknown-linux-gnu/bin/ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether -lc should be explicitly linked in... no
creating libtool
checking for X... libraries , headers
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for XF86VidModeSwitchToMode in -lXxf86vm... yes
checking for ANSI C header files... (cached) yes
checking GL/gl.h usability... yes
checking GL/gl.h presence... yes
checking for GL/gl.h... yes
checking GL/glu.h usability... yes
checking GL/glu.h presence... yes
checking for GL/glu.h... yes
checking GL/glx.h usability... yes
checking GL/glx.h presence... yes
checking for GL/glx.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking for X11/extensions/xf86vmode.h... yes
checking whether powerpc-unknown-linux-gnu-gcc needs -traditional... no
checking for vprintf... yes
checking for _doprnt... no
checking for main in -lm... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating include/GL/Makefile
config.status: creating include/Makefile
config.status: creating progs/Makefile
config.status: creating progs/demos/CallbackMaker/Makefile
config.status: creating progs/demos/Fractals/Makefile
config.status: creating progs/demos/Fractals_random/Makefile
config.status: creating progs/demos/Lorenz/Makefile
config.status: creating progs/demos/Makefile
config.status: creating progs/demos/One/Makefile
config.status: creating progs/demos/shapes/Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: executing default-1 commands
cd . \
     && CONFIG_FILES= CONFIG_HEADERS=config.h \
        /bin/sh ./config.status
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing default-1 commands
make  all-recursive
make[1]: Entering directory `/var/tmp/portage/media-libs/freeglut-2.4.0-r1/work/freeglut-2.4.0'
Making all in src
make[2]: Entering directory `/var/tmp/portage/media-libs/freeglut-2.4.0-r1/work/freeglut-2.4.0/src'
source='freeglut_callbacks.c' object='libglut_la-freeglut_callbacks.lo' libtool=yes \
   depfile='.deps/libglut_la-freeglut_callbacks.Plo' tmpdepfile='.deps/libglut_la-freeglut_callbacks.TPlo' \
   depmode=gcc3 /bin/sh ../depcomp \
   /bin/sh ../libtool --mode=compile powerpc-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include    -mlong-double-128 -O2 -mcpu=G4 -mtune=G4 -maltivec -mabi=ibmlongdouble -fno-strict-aliasing -pipe -c -o libglut_la-freeglut_callbacks.lo `test -f freeglut_callbacks.c || echo './'`freeglut_callbacks.c
source='freeglut_cursor.c' object='libglut_la-freeglut_cursor.lo' libtool=yes \
   depfile='.deps/libglut_la-freeglut_cursor.Plo' tmpdepfile='.deps/libglut_la-freeglut_cursor.TPlo' \
   depmode=gcc3 /bin/sh ../depcomp \
   /bin/sh ../libtool --mode=compile powerpc-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include    -mlong-double-128 -O2 -mcpu=G4 -mtune=G4 -maltivec -mabi=ibmlongdouble -fno-strict-aliasing -pipe -c -o libglut_la-freeglut_cursor.lo `test -f freeglut_cursor.c || echo './'`freeglut_cursor.c
mkdir .libs
rm -f .libs/libglut_la-freeglut_callbacks.lo
powerpc-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -mlong-double-128 -O2 -mcpu=G4 -mtune=G4 -maltivec -mabi=ibmlongdouble -fno-strict-aliasing -pipe -c freeglut_cursor.c -MT libglut_la-freeglut_cursor.lo -MD -MP -MF .deps/libglut_la-freeglut_cursor.TPlo  -fPIC -DPIC
powerpc-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -mlong-double-128 -O2 -mcpu=G4 -mtune=G4 -maltivec -mabi=ibmlongdouble -fno-strict-aliasing -pipe -c freeglut_callbacks.c -MT libglut_la-freeglut_callbacks.lo -MD -MP -MF .deps/libglut_la-freeglut_callbacks.TPlo  -fPIC -DPIC
cc1: warning: Using IBM extended precision long double
cc1: warning: Using IBM extended precision long double
mv -f libglut_la-freeglut_cursor.o .libs/libglut_la-freeglut_cursor.lo
mv: cannot stat `libglut_la-freeglut_cursor.o': No such file or directory
make[2]: *** [libglut_la-freeglut_cursor.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
mv -f libglut_la-freeglut_callbacks.o .libs/libglut_la-freeglut_callbacks.lo
mv: cannot stat `libglut_la-freeglut_callbacks.o': No such file or directory
make[2]: *** [libglut_la-freeglut_callbacks.lo] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-libs/freeglut-2.4.0-r1/work/freeglut-2.4.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-libs/freeglut-2.4.0-r1/work/freeglut-2.4.0'
make: *** [all] Error 2
 
  ERROR: media-libs/freeglut-2.4.0-r1 failed.
  Call stack:
                ebuild.sh, line   49:  Called src_compile
              environment, line 2319:  Called die
  The specific snippet of code:
        emake || die "emake failed"
   The die message:
    emake failed
 
  If you need support, post the topmost build error, and the call stack if relevant.
  A complete build log is located at '/var/tmp/portage/media-libs/freeglut-2.4.0-r1/temp/build.log'.
  The ebuild environment file is located at '/var/tmp/portage/media-libs/freeglut-2.4.0-r1/temp/environment'.
 


I tried to add
Code:
-march=powerpc
to CFLAGS in make.conf but then I got a different error message saying that gcc could not produce an executable. The gcc documentation does not list -march as a valid option for PowerPC based systems so I'm a bit confused. This is my first time installing linux on a non x86 based system. Does anyone have any idea how to fix this?

Last edited by dsorber on Sat Apr 12, 2008 5:02 pm; edited 1 time in total
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Sat Apr 12, 2008 3:42 pm    Post subject: Reply with quote

Moved from Desktop Environments to Gentoo on PPC.

post the output of emerge --info please. btw -march isn't a valid option for powerpc systems.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
dsorber
n00b
n00b


Joined: 07 May 2006
Posts: 11
Location: Washington D.C.

PostPosted: Sat Apr 12, 2008 3:54 pm    Post subject: Reply with quote

Sorry I didn't see the Gentoo on PPC section....

Yeah I figured -march wasn't a valid powerpc option since it wasn't listed in the gcc documentation.

Here is the output of emerge --info:

Code:
Portage 2.1.4.4 (default-linux/ppc/ppc32/2006.0/G4, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r3 ppc)
=================================================================
System uname: 2.6.24-gentoo-r3 ppc 7447A, altivec supported
Timestamp of tree: Sat, 12 Apr 2008 00:19:01 +0000
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="ppc"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-mlong-double-128 -O2 -mcpu=G4 -mtune=G4 -maltivec -mabi=ibmlongdouble -fno-strict-aliasing -pipe"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-mlong-double-128 -O2 -mcpu=G4 -mtune=G4 -maltivec -mabi=ibmlongdouble -fno-strict-aliasing -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.mirrors.tera-byte.com/ http://gentoo.osuosl.org/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://www.gtlib.gatech.edu/pub/gentoo ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://cudlug.cudenver.edu/gentoo/ http://gentoo.mirrors.pair.com/ http://gentoo.mirrors.tds.net/gentoo http://gentoo.netnitco.net http://mirror.espri.arizona.edu/gentoo/ http://open-systems.ufl.edu/mirrors/gentoo http://gentoo.llarian.net/ http://gentoo.binarycompass.org http://mirror.datapipe.net/gentoo http://prometheus.cs.wmich.edu/gentoo http://mirror.usu.edu/mirrors/gentoo/ http://gentoo.cites.uiuc.edu/pub/gentoo/ http://mirror.fslutd.org/linux/distributions/gentoo/ http://gentoo.chem.wisc.edu/gentoo/ http://lug.mtu.edu/gentoo/ "
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X alsa altivec apache2 apm arts berkdb bitmap-fonts bluetooth bonobo bzip2 cdr cli cracklib crypt cups dbus dri dvd dvdr eds emboss encode esd foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtkhtml hal iconv imlib ipv6 isdnlog jpeg ldap libwww mad midi mikmod motif mozilla mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pcre perl png ppc pppd python quicktime readline reflection ruby samba sdl session spell spl ssl tcpd truetype truetype-fonts type1-fonts unicode vorbis wifi xml xorg xscreensaver xv xvid zlib" ALSA_CARDS="aoa aoa-fabric-layout aoa-onyx aoa-soundbus aoa-soundbus-i2s aoa-tas aoa-toonie powermac usb-audio via82xx" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="chips dummy fbdev glint imstt mach64 mga nv r128 radeon s3 s3virge savage sisusb tdfx trident v4l voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Sat Apr 12, 2008 4:55 pm    Post subject: Reply with quote

Your CFLAGs are pretty broken:
Quote:

CFLAGS="-mlong-double-128 -O2 -mcpu=G4 -mtune=G4 -maltivec -mabi=ibmlongdouble -fno-strict-aliasing -pipe"


Change it to this and it should work (you may want to recompile your whole system):
Code:

CFLAGS="-O2 -mcpu=G4 -mtune=G4 -maltivec -mabi=altivec -pipe"

_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
dsorber
n00b
n00b


Joined: 07 May 2006
Posts: 11
Location: Washington D.C.

PostPosted: Sat Apr 12, 2008 4:58 pm    Post subject: Reply with quote

I had my CFLAGS just like this:

Quote:
Code:

CFLAGS="-O2 -mcpu=G4 -mtune=G4 -maltivec -mabi=altivec -pipe"


but I had to add the ibmlongdouble stuff in order to get glibc-2.6.1 to compile...

I'll change things back and see what happens.


Last edited by dsorber on Sat Apr 12, 2008 5:02 pm; edited 1 time in total
Back to top
View user's profile Send private message
dsorber
n00b
n00b


Joined: 07 May 2006
Posts: 11
Location: Washington D.C.

PostPosted: Sat Apr 12, 2008 5:01 pm    Post subject: Reply with quote

Yup that fixed it, thanks for the help. I wonder what's going to happen when I try to recompile glibc....
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Sat Apr 12, 2008 5:05 pm    Post subject: Reply with quote

You shouldn't have added those lines for glibc. The issue is that you're not using gcc-4. Make sure that gcc-4 is installed on your machine, then use gcc-config to select that compiler. It should work fine then.
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
w0rm
n00b
n00b


Joined: 08 May 2004
Posts: 67

PostPosted: Sat Apr 26, 2008 8:01 pm    Post subject: Reply with quote

Hey,
I had the same problem on old IBM ThinkPad 600X laptop.
I did find out that the problem was because of the -fvar-tracking CFLAG.
I was using
Code:

CFLAGS="-march=pentium3 -O2 -fomit-frame-pointer -fvar-tracking"


When I changed it to the one in the bottom, it compiled without any problems:
Code:

CFLAGS="-march=pentium3 -O2 -fomit-frame-pointer"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum