Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 613314 - net-libs/nodejs-6.9.4 merge error on PowerPC (G4): illegal instruction while running mksnapshot
Summary: net-libs/nodejs-6.9.4 merge error on PowerPC (G4): illegal instruction while ...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-20 16:10 UTC by Jocelyn Mayer
Modified: 2020-11-09 12:59 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
net-libs/nodejs-6.9.4 failed build log (net-libs:nodejs-6.9.4:20170320-114830.log,605.25 KB, text/x-log)
2017-03-20 16:10 UTC, Jocelyn Mayer
Details
node-v6.9.4.patch: patch to make it compile on PowerPC (node-v6.9.4.patch,1.63 KB, patch)
2017-03-20 19:43 UTC, Jocelyn Mayer
Details | Diff
node-v6.9.4-runtime.patch: ugly patch to avoid emitting instructions not supported by PowerPC G4 / G5 CPUs (node-v6.9.4-runtime.patch,3.86 KB, patch)
2017-03-20 19:47 UTC, Jocelyn Mayer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jocelyn Mayer 2017-03-20 16:10:34 UTC
Created attachment 467646 [details]
net-libs/nodejs-6.9.4 failed build log

net-libs/nodejs-6.9.4 fails to merge on PowerPC architecture, failing on:
LD_LIBRARY_PATH=/var/tmp/portage/net-libs/nodejs-6.9.4/work/node-v6.9.4/out/Re
lease/lib.host:/var/tmp/portage/net-libs/nodejs-6.9.4/work/node-v6.9.4/out/Relea
se/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../deps/v8/tools/gyp;
 mkdir -p /var/tmp/portage/net-libs/nodejs-6.9.4/work/node-v6.9.4/out/Release/ob
j.target/v8_snapshot/geni; "/var/tmp/portage/net-libs/nodejs-6.9.4/work/node-v6.
9.4/out/Release/mksnapshot" --startup_src "/var/tmp/portage/net-libs/nodejs-6.9.
4/work/node-v6.9.4/out/Release/obj.target/v8_snapshot/geni/snapshot.cc" ""
/bin/sh: line 1: 21354 Illegal instruction     "/var/tmp/portage/net-libs/nodejs-6.9.4/work/node-v6.9.4/out/Release/mksnapshot" --startup_src "/var/tmp/portage/net-libs/nodejs-6.9.4/work/node-v6.9.4/out/Release/obj.target/v8_snapshot/geni/snapshot.cc" ""

Running gdb gives more informations:
# cd /var/tmp/portage/net-libs/nodejs-6.9.4/work/node-v6.9.4/out
# gdb /var/tmp/portage/net-libs/nodejs-6.9.4/work/node-v6.9.4/out/Release/mksnapshot
[...]
(gdb) r  --startup_src "/var/tmp/portage/net-libs/nodejs-6.9.4/work/node-v6.9.4/out/Release/obj.target/v8_snapshot/geni/snapshot.cc" ""
Starting program: /var/tmp/portage/net-libs/nodejs-6.9.4/work/node-v6.9.4/out/Release/mksnapshot --startup_src "/var/tmp/portage/net-libs/nodejs-6.9.4/work/node-v6.9.4/out/Release/obj.target/v8_snapshot/geni/snapshot.cc" ""
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
[New Thread 0xb7fbe450 (LWP 21642)]

Program received signal SIGILL, Illegal instruction.
0x39c59348 in ?? ()
(gdb) x/i 0x39c59348
=> 0x39c59348:  fcfid   f1,f1

From IBM documentation:
"This instruction is defined only for 64-bit implementations. Using it on a 32-bit implementation will cause the system illegal instruction error handler to be invoked."
Looks like gcc emits some 64 bits code on a 32 bits architecture, then...
# gcc -v
Using built-in specs.
COLLECT_GCC=/usr/powerpc-unknown-linux-gnu/gcc-bin/4.9.4/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/powerpc-unknown-linux-gnu/4.9.4/lto-wrapper
Target: powerpc-unknown-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.9.4/work/gcc-4.9.4/configure --host=powerpc-unknown-linux-gnu --build=powerpc-unknown-linux-gnu --prefix=/usr --bindir=/usr/powerpc-unknown-linux-gnu/gcc-bin/4.9.4 --includedir=/usr/lib/gcc/powerpc-unknown-linux-gnu/4.9.4/include --datadir=/usr/share/gcc-data/powerpc-unknown-linux-gnu/4.9.4 --mandir=/usr/share/gcc-data/powerpc-unknown-linux-gnu/4.9.4/man --infodir=/usr/share/gcc-data/powerpc-unknown-linux-gnu/4.9.4/info --with-gxx-include-dir=/usr/lib/gcc/powerpc-unknown-linux-gnu/4.9.4/include/g++-v4 --with-python-dir=/share/gcc-data/powerpc-unknown-linux-gnu/4.9.4/python --enable-languages=c,c++,objc,obj-c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.9.4 p1.0, pie-0.6.4' --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --disable-multilib --enable-altivec --disable-fixed-point --enable-targets=all --disable-libgcj --disable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --disable-vtable-verify --disable-libvtv --enable-lto --without-cloog --enable-libsanitizer
Thread model: posix
gcc version 4.9.4 (Gentoo 4.9.4 p1.0, pie-0.6.4)

# emerge -pqv =net-libs/nodejs-6.9.4::gentoo                  [ebuild  N    ] net-libs/nodejs-6.9.4  USE="icu npm snapshot ssl -debug -doc {-test}" PYTHON_TARGETS="python2_7"
# emerge --info =net-libs/nodejs-6.9.4::gentoo
Portage 2.3.3 (python 3.4.5-final-0, default/linux/powerpc/ppc32/13.0, gcc-4.9.4, glibc-2.23-r3, 4.9.6-gentoo-r1 ppc)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.9.6-gentoo-r1-ppc-7447A,_altivec_supported-with-gentoo-2.3
KiB Mem:     2067000 total,    375548 free
KiB Swap:    4194300 total,   4176516 free
Timestamp of repository gentoo: Wed, 15 Mar 2017 12:00:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p48-r1::gentoo
dev-lang/perl:            5.22.3_rc4::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.23.2::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.4_p6-r2::gentoo, 1.5-r2::gentoo, 1.6.3-r2::gentoo, 1.7.9-r3::gentoo, 1.8.5-r5::gentoo, 1.9.6-r4::gentoo, 1.10.3-r1::gentoo, 1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo, 2.26.1::gentoo
sys-devel/gcc:            4.9.3::gentoo, 4.9.4::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="ppc"
ACCEPT_LICENSE="* -@EULA"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -pipe -mcpu=7450 -maltivec -mabi=altivec -fomit-frame-pointer"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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"
CXXFLAGS="-O2 -pipe -mcpu=7450 -maltivec -mabi=altivec -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildsyspkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.modulix.net/gentoo/ http://mirror.netcologne.de/gentoo/ http://gentoo.mirrors.ovh.net/gentoo-distfiles/ http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ http://mirror.leaseweb.com/gentoo/ http://mirror.bytemark.co.uk/gentoo/ http://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://tux.rainside.sk/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/"
LANG="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X Xaw3d a52 aac aalib acl adns aim alsa altivec ao apache2 apm audiofile avahi bash-completion bcmath berkdb bidi blas bluetooth branding bzip2 cairo calendar caps cdb cdda cddb cdparanoia cdr cgi cli cracklib crypt cscope ctype cups curl curlwrappers cvs cxx dbus dga djvu dri dts dv dvb dvd dvdr eds emacs encode enscript evo exif expat fam fastcgi fbcon ffmpeg fftw filecaps flac fltk fontconfig fortran ftp gd gdbm geoip ggi gif gimp git glut gmp gnuplot gnutls gphoto2 gpm gps graphviz gsl gsm gstreamer gtk guile gzip hddtemp iconv icq icu idn ieee1394 imagemagick imap imlib inotify introspection ipv6 jack javascript jingle jit jpeg jpeg2k ladspa lame lash latex lcms ldap libass libcaca libffi libnotify libsamplerate libwww lua lzma lzo m17n-lib mad maildir matroska mbox memlimit mhash mikmod mime mmap mms mng modplug modules motif mozilla mp3 mp4 mpeg mpi mplayer msn mtp musepack musicbrainz nas ncurses nls nntp nptl nsplugin ocaml ocamlopt odbc offensive ofx ogg openal openexr opengl osc oscar oss pam pcmcia pcntl pcre pda pdf perl pie plotutils png policikit portaudio posix postgres postscript ppc ppds pulseaudio python quicktime raw rdesktop readline rss ruby samba sasl savedconfig sdl shorten simplexml skey slang slp smp sndfile snmp soap sockets sound sox speex spell ssl startup-notification static-libs subversion svg syslog sysvipc szip taglib tcl tcpd theora threads tidy tiff timidity tk truetype udev unicode upnp upnp-av upower usb v4l vcd vhosts vnc vorbis wavpack wddx wifi wmf wxwidgets x264 xattr xcb xcomposite xface xft xine xinerama xinetd xml xmlrpc xmp xmpp xosd xpm xscreensaver xv xvid yahoo yaz zeroconf zlib" ABI_PPC="32" ALSA_CARDS="aoa aoa-fabric-layout aoa-onyx aoa-soundbus aoa-soundbus-i2s aoa-tas aoa-toonie powermac usb-audio via82xx" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2 canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev keyboard linuxinput mouse void" KERNEL="linux" L10N="en fr" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en fr" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" SANE_BACKENDS="hp net pnm" USERLAND="GNU" VIDEO_CARDS="amdgpu dummy fbdev r300 r600 radeon v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Jocelyn Mayer 2017-03-20 16:50:05 UTC
I guess I found the bug location:
at the start of the build log, one can see:
creating icu_config.gypi
{ 'target_defaults': { 'cflags': [],
                       'default_configuration': 'Release',
                       'defines': [],
                       'include_dirs': [],
                       'libraries': [ '-lz',
                                      '-lhttp_parser',
                                      '-luv',
                                      '-lcrypto',
                                      '-lssl',
                                      '-licui18n',
                                      '-licuuc',
                                      '-licudata']},
  'variables': { 'asan': 0,
                 'coverage': 'false',
                 'debug_devtools': 'node',
                 'force_dynamic_crt': 0,
                 'host_arch': 'ppc64',

while host_arch should be 'ppc'...
Don't know how to solve this, anyway...
Comment 2 Jocelyn Mayer 2017-03-20 19:43:16 UTC
Created attachment 467750 [details, diff]
node-v6.9.4.patch: patch to make it compile on PowerPC
Comment 3 Jocelyn Mayer 2017-03-20 19:45:49 UTC
Unfortunately, node program does not run neither on PowerPC (G4) nor on PowerPC64 (G5) because it generates code using instructions which are not in the base PowerPC instruction set.
Thus, the program crashes with an Illegal Instruction exception.
Comment 4 Jocelyn Mayer 2017-03-20 19:47:11 UTC
Created attachment 467752 [details, diff]
node-v6.9.4-runtime.patch: ugly patch to avoid emitting instructions not supported by PowerPC G4 / G5 CPUs
Comment 5 Marek Szuba archtester gentoo-dev 2020-11-09 12:59:10 UTC
Closing due to inactivity, please reopen with updated information if this is still a problem.