I am currently trying to emerge ecls on ppc to use in maxima. I am trying to see if we can get sage (bug# 201321) on ppc, upstream supports it and it requires maxima compiled with ecls. Building fails with both gcc-4.3.4 (stable) and gcc-4.4.3. The failures are different. I am attaching build logs for ecls-10.2, but the same problem was there in the ecls-9 series. Reproducible: Always Steps to Reproduce: 1.get a gentoo ppc machine 2.put ecls in package.keywords 3.emerge ecls Actual Results: failure to build. Expected Results: build successfully. emerge --info Portage 2.2_rc63 (default/linux/powerpc/ppc32/10.0, gcc-4.4.3, glibc-2.11-r1, 2.6.30-gentoo-r5 ppc) ================================================================= System uname: Linux-2.6.30-gentoo-r5-ppc-7450,_altivec_supported-with-gentoo-1.12.13 Timestamp of tree: Mon, 01 Mar 2010 00:15:01 +0000 ccache version 2.4 [disabled] app-shells/bash: 4.0_p35 dev-java/java-config: 1.3.7-r1, 2.1.10 dev-lang/python: 2.5.4-r3, 2.6.4-r99 dev-python/pycrypto: 2.0.1-r8 dev-util/ccache: 2.4-r7 dev-util/cmake: 2.6.4-r3 sys-apps/baselayout: 1.12.13 sys-apps/sandbox: 2.2 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.19.1-r1 sys-devel/gcc: 4.3.4, 4.4.3 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6b virtual/os-headers: 2.6.30-r1 ACCEPT_KEYWORDS="ppc" ACCEPT_LICENSE="* -@EULA" CBUILD="powerpc-unknown-linux-gnu" CFLAGS="-O2 -mcpu=7450 -mtune=7450 -pipe -maltivec -mabi=altivec -fno-strict-aliasing" CHOST="powerpc-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-O2 -mcpu=7450 -mtune=7450 -pipe -maltivec -mabi=altivec -fno-strict-aliasing" DISTDIR="/scratch/portage/distfiles/" FEATURES="assume-digests distlocks fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="ftp://mirror.ihug.co.nz/gentoo ftp://mirrors.tds.net/gentoo http://mirrors.tds.net/gentoo ftp://ftp.vic.keypoint.com.au ftp://mirror.pacific.net.au/linux/Gentoo" LC_ALL="en_GB.UTF-8" LDFLAGS="-Wl,--as-needed" LINGUAS="fr en_GB" MAKEOPTS="-j1 VERBOSE=1" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" 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="/scratch/portage/" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage/layman/science /usr/local/portage/layman/x11 /usr/local/portage/layman/sunrise /usr/local/portage/layman/sage-on-gentoo /usr/local/portage" SYNC="rsync://rsync.au.gentoo.org/gentoo-portage" USE="X a52 aac acl alsa altivec amr ao asf audiofile avahi berkdb bzip2 cairo cdda cddb cdf cdio cdparanoia cdr cli consolekit cracklib crypt cups curl cxx dbus divx dri dts dv dvd dvdr dvdread encode exif expat f77 ffmpeg fftw flac fontconfig foomaticdb fortran fts3 gdbm gif gmedia gmp gpm graphviz gs gstreamer gtk hal iconv icu id3tag idn ieee1394 imagemagick imlib imlib2 ipv6 java jbig jpeg jpeg2k kde kdehiddenvisibility kpathsea ladspa lame lapack latex lcms libsamplerate lzma lzo mad mikmod mjpeg mmap mng modules mp3 mp4 mpeg mudflap musicbrainz ncurses netcdf network nls nptl nptlonly ogg openal openexr opengl pcre pdf perl png policykit ppc ppds pppd python qt3support qt4 quicktime raster rdesktop readline reflection sdl sdl-image secure-delete session slang slp sndfile spl ssl startup-notification svg sysfs szip taglib tcl tcltk tcpd theora tiff tk truetype unicode usb vcd vidix vnc vorbis wavpack wmf wmp x264 xcb xine xinerama xml xml2 xorg xv xvid zeroconf zip 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 mmap_emul 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" LINGUAS="fr en_GB" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev nv vga nouveau" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 223089 [details] build log of ecls with gcc-4.3.4
Created attachment 223091 [details] build log of ecls with gcc-4.4.3
Adding -std=c99 to my CFLAGS brings the building of ecls with gcc-4.4.3 at the same point than with gcc-4.3.4. Why you need this on ppc and not on x86 is beyond me. The next problem is why doesn't it bootstrap and why do I have all those warning about implicit declarations that don't appear on x86.
I should make an update on that. Removing all my cflags except for -std=c99 resulted in a successful compilation with gcc-4.4.3. I haven't investigated fully which flag or combination of flags is guilty.
Well, does it work now?
(In reply to comment #5) > Well, does it work now? > I finally got to do a test of it today with maxima. It seems to work. So in short one of my CFLAGS (which aren't really ricers flags) is causing problem. I cannot point the finger on which one yet - this old G4 is updating some other packages at the moment and it will take a while. For some reason on ppc with gcc-4.4.3 -std=c99 is needed.
OK I cornered it. ecls is allergic to altivec instructions. Appending "-mno-altivec -mabi=no-altivec" to the CFLAGS solve the problem. I will probably up an ebuild with the fix in the science overlay later on.
Created attachment 230377 [details, diff] patch to ecls-10.4.1 ebuild So I ended up just patching the ebuild to add the appropriate flags. I had a quick look at ecls sources but it would be quite difficult to solve the problem in the source as far as I can see. Upstream may or may not be interested in this problem.
@ppc team, can somebody approve the patch? I know nothing about the altivec instruction set. Thank you in advance.
Can you try with ecls-16.0.0? It looks to be keyworded on ppc
Dear me, talk about a zombie. I don't have a Gentoo ppc machine anymore I am afraid but I believe it would work out of the box on ppc64 (gentoo or not).