deu / palemoon-overlay

Unofficial Gentoo overlay for the Pale Moon (http://www.palemoon.org/) web browser.
34 stars 12 forks source link

www-client/palemoon-27.6.2 fails to compile against GCC 4.9.4: libstagefright/Unified_cpp_media_libstagefright0.o: require s dynamic R_X86_64_PC32 reloc against '_Z13GetDemuxerLogv' which may overflow at runtime; recompile with -fPIC #59

Closed fusion809 closed 6 years ago

fusion809 commented 6 years ago

Hi,

I tried to compile Pale Moon 27.6.2 against GCC 4.9.4 and oddly it failed with the error:

16:31.22     INPUT("../../modules/zlib/src/inftrees.o")
16:31.22     INPUT("../../modules/zlib/src/trees.o")
16:31.22     INPUT("../../modules/zlib/src/uncompr.o")
16:31.22     INPUT("../../modules/zlib/src/zutil.o")
16:31.22     INPUT("StaticXULComponentsEnd/StaticXULComponentsEnd.o")
16:31.22
16:31.22 ../../build/unix/gold/ld: error: /var/tmp/portage/www-client/palemoon-27.6.2/work/palemoon-27.6.2/o/toolkit/library/../../media/libstagefright/Unified_cpp_media_libstagefright0.o: require
s dynamic R_X86_64_PC32 reloc against '_Z13GetDemuxerLogv' which may overflow at runtime; recompile with -fPIC
16:31.22 ../../build/unix/gold/ld: error: read-only segment has dynamic relocations
16:31.22 /var/tmp/portage/www-client/palemoon-27.6.2/work/palemoon-27.6.2/media/libstagefright/binding/MoofParser.cpp:728: error: undefined reference to 'GetDemuxerLog()'
16:31.22 /var/tmp/portage/www-client/palemoon-27.6.2/work/palemoon-27.6.2/media/libstagefright/binding/MoofParser.cpp:735: error: undefined reference to 'GetDemuxerLog()'
16:31.22 /var/tmp/portage/www-client/palemoon-27.6.2/work/palemoon-27.6.2/media/libstagefright/binding/MoofParser.cpp:591: error: undefined reference to 'GetDemuxerLog()'
16:31.22 /var/tmp/portage/www-client/palemoon-27.6.2/work/palemoon-27.6.2/media/libstagefright/binding/MoofParser.cpp:599: error: undefined reference to 'GetDemuxerLog()'
16:31.22 collect2: error: ld returned 1 exit status
16:31.22 gmake[5]: *** [/var/tmp/portage/www-client/palemoon-27.6.2/work/palemoon-27.6.2/config/rules.mk:820: libxul.so] Error 1
16:31.22 gmake[4]: *** [/var/tmp/portage/www-client/palemoon-27.6.2/work/palemoon-27.6.2/config/recurse.mk:74: toolkit/library/target] Error 2
16:31.22 gmake[3]: *** [/var/tmp/portage/www-client/palemoon-27.6.2/work/palemoon-27.6.2/config/recurse.mk:37: compile] Error 2
16:31.22 gmake[2]: *** [/var/tmp/portage/www-client/palemoon-27.6.2/work/palemoon-27.6.2/config/rules.mk:541: default] Error 2
16:31.22 gmake[1]: *** [/var/tmp/portage/www-client/palemoon-27.6.2/work/palemoon-27.6.2/client.mk:399: realbuild] Error 2

my build log is here. emerge -pqv returns:

[ebuild  N    ] www-client/palemoon-27.6.2  USE="alsa dbus devtools gtk2 official-branding optimize system-libvpx -debug -ffmpeg (-gtk3) -jemalloc -necko-wifi -pulseaudio -shared-js -system-bzip2 -system-libevent -system-libwebp -system-sqlite -system-zlib -threads -valgrind -webrtc" CPU_FLAGS_X86="sse sse2"

while emerge --info returns:

    Portage 2.3.19 (python 3.6.3-final-0, default/linux/amd64/17.0/desktop, gcc-4.9.4, glibc-2.26-r3, 4.14.6-1-ARCH x86_64)
    =================================================================
                             System Settings
    =================================================================
    System uname: Linux-4.14.6-1-ARCH-x86_64-Intel-R-_Core-TM-_i7-4700MQ_CPU_@_2.40GHz-with-gentoo-2.4.1
    KiB Mem:    16363764 total,   2154232 free
    KiB Swap:    8388604 total,   8388604 free
    Head commit of repository gentoo: d5b0a115ce37913d3a0be576aa66a127592cd7e8

    Head commit of repository fusion809: a7d73dee8697c8b2d5871b3d52b09916ce813277

    Head commit of repository palemoon: 6865bfc0080f263cada6714fdf404643782188d6

    sh bash 4.4_p12
    ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
    app-shells/bash:          4.4_p12::gentoo
    dev-lang/perl:            5.26.1-r1::gentoo
    dev-lang/python:          2.7.14-r1::gentoo, 3.6.3-r1::gentoo
    dev-util/cmake:           3.10.1::gentoo
    dev-util/pkgconfig:       0.29.2::gentoo
    sys-apps/baselayout:      2.4.1-r2::gentoo
    sys-apps/openrc:          0.34.11::gentoo
    sys-apps/sandbox:         2.12::gentoo
    sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
    sys-devel/automake:       1.15.1-r1::gentoo
    sys-devel/binutils:       2.29.1-r1::gentoo
    sys-devel/gcc:            4.9.4::gentoo, 7.2.0::gentoo
    sys-devel/gcc-config:     1.9.1::gentoo
    sys-devel/libtool:        2.4.6-r4::gentoo
    sys-devel/make:           4.2.1-r1::gentoo
    sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
    sys-libs/glibc:           2.26-r3::gentoo
    Repositories:

    gentoo
        location: /usr/portage
        sync-type: git
        sync-uri: https://github.com/gentoo/gentoo.git
        priority: -1000

    fusion809
        location: /usr/local/fusion809-overlay
        sync-type: git
        sync-uri: https://github.com/fusion809/fusion809-overlay.git
        masters: gentoo

    palemoon
        location: /usr/local/palemoon-overlay
        sync-type: git
        sync-uri: git://github.com/deu/palemoon-overlay.git
        masters: gentoo

    ACCEPT_KEYWORDS="amd64 ~amd64"
    ACCEPT_LICENSE="*"
    CBUILD="x86_64-pc-linux-gnu"
    CFLAGS="-O2 -pipe -march=haswell"
    CHOST="x86_64-pc-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"
    CXXFLAGS="-O2 -pipe -march=haswell"
    DISTDIR="/usr/portage/distfiles"
    FCFLAGS="-O2 -pipe"
    FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
    FFLAGS="-O2 -pipe"
    GENTOO_MIRRORS="http://distfiles.gentoo.org"
    LANG="en_AU.UTF-8"
    LDFLAGS="-Wl,-O1 -Wl,--as-needed"
    MAKEOPTS="-j4"
    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 a52 aac acl acpi alsa amd64 berkdb branding bumblebee bzip2 cairo cdda cdr cli consolekit cracklib crypt cups custom-cflags custom-optimization cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm gtk iconv ipv6 jpeg kms lcms ldap libnotify mad mng modules mp3 mp4 mpeg multilib ncurses nls nptl nvidia ogg opengl openmp pam pango pcre pdf png policykit ppds qt3support readline sdl seccomp session spell ssl startup-notification svg system-harfbuzz system-icu system-jpeg system-libvpx tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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 synaptics" KERNEL="linux" L10N="en en_AU en_GB en_US en-AU en-GB en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_AU en_GB en-AU en-GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="nvidia intel" 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

If relevant (although I doubt it) I was trying to build it in a chroot (with all the filesystems mounted up per the Gentoo AMD64 handbook, of course).

Thanks for your time, Brenton

fusion809 commented 6 years ago

Well I just got the build to work by adjusting USE flags, this is the combination that works:

[ebuild   R   #] www-client/palemoon-27.6.2::palemoon  USE="alsa dbus devtools ffmpeg gtk2 official-branding optimize system-bzip2 system-libevent system-libvpx system-libwebp system-sqlite system-zlib -debug (-gtk3) -jemalloc -necko-wifi -pulseaudio -shared-js -threads -valgrind -webrtc" CPU_FLAGS_X86="sse sse2" 0 KiB
deu commented 6 years ago

That was almost certainly caused by a non-standard USE flag combination. I can't realistically test every combination, so I recommend to start with the default one and try enabling them one by one from there (though remember that you won't be able to get official support from Pale Moon that way), so to be able to identify clearly what are the ones that don't go well together (and maybe open an issue about it here).