palemoon-27.0.0b3r2 - disable-elf-hack

Support and discussions for the x86/x64 Linux version of Pale Moon.

Moderators: trava90, Indalecio, satrow

gin83
Moongazer
Moongazer
Posts: 8
Joined: Fri May 06, 2016 7:16 am

palemoon-27.0.0b3r2 - disable-elf-hack

Postby gin83 » Sat Oct 29, 2016 9:59 am

Hi,
Just to report that I'm having trouble at building palemoon-27.0.0b3r2 with Slackware64-14.2 (again :lol: )

Here is the error I get:

Code: Select all

g++  -Wall -Wempty-body -Woverloaded-virtual -Wsign-compare -Wwrite-strings -Wno-invalid-offsetof -Wcast-align -O2 -fPIC -fno-strict-aliasing -fno-rtti -fno-math-errno -std=gnu++0x -pthread -pipe -fexceptions  -DNDEBUG -DTRIMMED -g -freorder-blocks -O2 -fomit-frame-pointer -fPIC -shared -Wl,-z,defs -Wl,-h,test-ctors.so -o test-ctors.so -lpthread  -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id -B /home/cethyel/Public/tip/xap/gtk/palemoon/build-palemoon/Pale-Moon-27.0.0b3r2/obj_dir/build/unix/gold    -Wl,-rpath-link,/home/cethyel/Public/tip/xap/gtk/palemoon/build-palemoon/Pale-Moon-27.0.0b3r2/obj_dir/dist/bin -Wl,-rpath-link,/usr/local/lib  test-ctors.o -nostartfiles
===
=== If you get failures below, please file a bug describing the error
=== and your environment (compiler and linker versions), and use
=== --disable-elf-hack until this is fixed.
===
# Fail if the library doesn't have INIT_ARRAY .dynamic info
===
readelf -d test-array.so | grep '(INIT_ARRAY)'
=== If you get failures below, please file a bug describing the error
=== and your environment (compiler and linker versions), and use
 0x0000000000000019 (INIT_ARRAY)         0x9830
=== --disable-elf-hack until this is fixed.
/home/cethyel/Public/tip/xap/gtk/palemoon/build-palemoon/Pale-Moon-27.0.0b3r2/obj_dir/build/unix/elfhack/elfhack -b -f test-array.so
===
# Fail if the library doesn't have INIT .dynamic info
elfhack: /home/cethyel/Public/tip/xap/gtk/palemoon/build-palemoon/Pale-Moon-27.0.0b3r2/build/unix/elfhack/elf.cpp:261: Elf::Elf(std::ifstream&): Assertion `segment->getFileSize() == phdr.p_filesz' failed.
Makefile:20 : la recette pour la cible « test-array.so » a échouée
make[5]: *** [test-array.so] Abandon
make[5]: *** Attente des tâches non terminées....
readelf -d test-ctors.so | grep '(INIT)'
 0x000000000000000c (INIT)               0x4020
/home/cethyel/Public/tip/xap/gtk/palemoon/build-palemoon/Pale-Moon-27.0.0b3r2/obj_dir/build/unix/elfhack/elfhack -b -f test-ctors.so
elfhack: /home/cethyel/Public/tip/xap/gtk/palemoon/build-palemoon/Pale-Moon-27.0.0b3r2/build/unix/elfhack/elf.cpp:261: Elf::Elf(std::ifstream&): Assertion `segment->getFileSize() == phdr.p_filesz' failed.
Makefile:20 : la recette pour la cible « test-ctors.so » a échouée
make[5]: *** [test-ctors.so] Abandon
make[5] : on quitte le répertoire « /home/cethyel/Public/tip/xap/gtk/palemoon/build-palemoon/Pale-Moon-27.0.0b3r2/obj_dir/build/unix/elfhack »
/home/cethyel/Public/tip/xap/gtk/palemoon/build-palemoon/Pale-Moon-27.0.0b3r2/config/recurse.mk:82 : la recette pour la cible « build/unix/elfhack/libs » a échouée
make[4]: *** [build/unix/elfhack/libs] Erreur 2
make[4] : on quitte le répertoire « /home/cethyel/Public/tip/xap/gtk/palemoon/build-palemoon/Pale-Moon-27.0.0b3r2/obj_dir »
/home/cethyel/Public/tip/xap/gtk/palemoon/build-palemoon/Pale-Moon-27.0.0b3r2/config/recurse.mk:36 : la recette pour la cible « libs » a échouée
make[3]: *** [libs] Erreur 2
make[3] : on quitte le répertoire « /home/cethyel/Public/tip/xap/gtk/palemoon/build-palemoon/Pale-Moon-27.0.0b3r2/obj_dir »
/home/cethyel/Public/tip/xap/gtk/palemoon/build-palemoon/Pale-Moon-27.0.0b3r2/config/rules.mk:541 : la recette pour la cible « default » a échouée
make[2]: *** [default] Erreur 2
make[2] : on quitte le répertoire « /home/cethyel/Public/tip/xap/gtk/palemoon/build-palemoon/Pale-Moon-27.0.0b3r2/obj_dir »
/home/cethyel/Public/tip/xap/gtk/palemoon/build-palemoon/Pale-Moon-27.0.0b3r2/client.mk:398 : la recette pour la cible « realbuild » a échouée
make[1]: *** [realbuild] Erreur 2
make[1] : on quitte le répertoire « /home/cethyel/Public/tip/xap/gtk/palemoon/build-palemoon/Pale-Moon-27.0.0b3r2 »
client.mk:171 : la recette pour la cible « build » a échouée
make: *** [build] Erreur 2


I have to add "ac_add_options --disable-elf-hack" to my .mozconfig otherwise, the build fails.

here is my .mozconfig:

Code: Select all

ac_add_options --with-branding=browser/branding/unstable
ac_add_options --enable-application=browser
ac_add_options --enable-optimize
ac_add_options --disable-installer
ac_add_options --disable-updater
ac_add_options --disable-debug
ac_add_options --disable-telemetry
ac_add_options --enable-jemalloc
ac_add_options --enable-jemalloc-lib
ac_add_options --enable-shared-js
ac_add_options --with-pthreads
ac_add_options --enable-strip
ac_add_options --x-libraries=/usr/lib64


GCC is 5.4.0, binutils-2.26

Code: Select all

gcc -v
Lecture des spécifications à partir de /usr/lib64/gcc/x86_64-slackware-linux/5.4.0/specs
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-slackware-linux/5.4.0/lto-wrapper
Cible : x86_64-slackware-linux
Configuré avec: ../gcc-5.4.0/configure --prefix=/usr --libdir=/usr/lib64 --mandir=/usr/man --infodir=/usr/info --enable-shared --enable-bootstrap --enable-languages=ada,c,c++,fortran,go,java,lto,objc --enable-threads=posix --enable-checking=release --enable-objc-gc --with-system-zlib --with-python-dir=/lib64/python2.7/site-packages --enable-libstdcxx-dual-abi --with-default-libstdcxx-abi=gcc4-compatible --disable-libunwind-exceptions --enable-__cxa_atexit --enable-libssp --enable-lto --disable-install-libiberty --with-gnu-ld --verbose --enable-java-home --with-java-home=/usr/lib64/jvm/jre --with-jvm-root-dir=/usr/lib64/jvm --with-jvm-jar-dir=/usr/lib64/jvm/jvm-exports --with-arch-directory=amd64 --with-antlr-jar=/home/cethyel/tmp/gcc/antlr-runtime-3.4.jar --enable-java-awt=gtk --disable-gtktest --disable-multilib --target=x86_64-slackware-linux --build=x86_64-slackware-linux --host=x86_64-slackware-linux
Modèle de thread: posix
gcc version 5.4.0 (GCC)


Any ideas why the build fails?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 19477
Joined: Sun Aug 28, 2011 5:27 pm
Location: 58.5°N 15.5°E
Contact:

Re: palemoon-27.0.0b3r2 - disable-elf-hack

Postby Moonchild » Sat Oct 29, 2016 10:08 am

Slackware keeps being that red-headed stepchild ;)
(sorry I can't help here, some Linux folks will have to step in...)
Improving Mozilla code: You know you're on the right track with code changes when you spend the majority of your time deleting code.
Image

gin83
Moongazer
Moongazer
Posts: 8
Joined: Fri May 06, 2016 7:16 am

Re: palemoon-27.0.0b3r2 - disable-elf-hack

Postby gin83 » Sat Oct 29, 2016 11:01 am

Moonchild wrote:Slackware keeps being that red-headed stepchild


Oh! That's funny, I like It! :D

Back to the issue...
It's not a big deal since I manage to build Palemoon. Basically my report is much more a wink towards you developpers to warn you "maybe there's a problem here!"
I can't program, therefore I can't tell if the failure is related to the code itself or Slackware. :think:

Here the final .mozconfig I've been using with this beta, It's compiling fine like this.

Code: Select all

ac_add_options --build=x86_64-slackware-linux
ac_add_options --host=x86_64-slackware-linux
ac_add_options --x-libraries=/usr/lib64
ac_add_options --enable-release
ac_add_options --with-x
ac_add_options --with-arch=native
ac_add_options --enable-cpp-rtti
ac_add_options --with-pthreads
ac_add_options --with-system-nspr
ac_add_options --with-system-libevent=/usr
ac_add_options --with-system-jpeg
ac_add_options --with-system-zlib
ac_add_options --with-system-bz2
ac_add_options --with-system-webp
ac_add_options --enable-system-hunspell
ac_add_options --enable-system-ffi
ac_add_options --enable-application=browser
ac_add_options --enable-default-toolkit=cairo-gtk2
ac_add_options --enable-startup-notification
ac_add_options --enable-official-branding
ac_add_options --disable-accessibility
ac_add_options --disable-printing
ac_add_options --with-system-libvpx
ac_add_options --enable-alsa
ac_add_options --enable-pulseaudio
ac_add_options --enable-gstreamer
ac_add_options --disable-gamepad
ac_add_options --disable-updater
ac_add_options --disable-tests
ac_add_options --disable-parental-controls
ac_add_options --enable-system-sqlite
ac_add_options --enable-safe-browsing
ac_add_options --enable-url-classifier
ac_add_options --enable-optimize="-O2"
ac_add_options --enable-jemalloc
ac_add_options --enable-jemalloc-lib
ac_add_options --enable-shared-js
ac_add_options --enable-system-cairo
ac_add_options --enable-system-pixman
ac_add_options --disable-necko-wifi
ac_add_options --with-system-icu
ac_add_options --disable-elf-hack

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 3793
Joined: Tue Oct 09, 2012 7:37 pm

Re: palemoon-27.0.0b3r2 - disable-elf-hack

Postby New Tobin Paradigm » Sat Oct 29, 2016 6:35 pm

Don't use system libs.
[ T O B I N W A V E ]

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 19477
Joined: Sun Aug 28, 2011 5:27 pm
Location: 58.5°N 15.5°E
Contact:

Re: palemoon-27.0.0b3r2 - disable-elf-hack

Postby Moonchild » Sat Oct 29, 2016 6:39 pm

Matt A Tobin wrote:Don't use system libs.


Considering the incredible minefield system libs is, what say you that we consider removing this as a build option, Tobin?
Improving Mozilla code: You know you're on the right track with code changes when you spend the majority of your time deleting code.
Image

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 3793
Joined: Tue Oct 09, 2012 7:37 pm

Re: palemoon-27.0.0b3r2 - disable-elf-hack

Postby New Tobin Paradigm » Sat Oct 29, 2016 6:47 pm

I am conflicted.. What really needs to happen is is an audit of which libs are safe and which ones aren't.. I want to prevent issues with system libs but I don't want to discount them either.. MAYBE system libs should be dependent on a master switch in configure that will allow it if you REALLY want to do that but make casual building based on FIREFOX mozconfigs not work.. --enable-system-libs + normal system lib use options.. Also make it spout warnings for each one when enabled.

not using flag with any --use-system-* .. ac error "ERROR: Building with system libs is unsupported and may produce unstable builds
with flag ac warning "WARNING: Using system libs is unsupported and may produce unstable builds

Will not prevent someone from doing it anyway but they will be properly informed and copypastaing Firefox mozconfig will not be so cut and dry. The idea is to get them to stop and think not prevent builders and .. travis/me.. from doing stuff. Could also not allow it period with branding if MOZ_BUILD_APP is browser.
[ T O B I N W A V E ]

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 19477
Joined: Sun Aug 28, 2011 5:27 pm
Location: 58.5°N 15.5°E
Contact:

Re: palemoon-27.0.0b3r2 - disable-elf-hack

Postby Moonchild » Sat Oct 29, 2016 7:10 pm

All good points. Something does need to be done, though.
Improving Mozilla code: You know you're on the right track with code changes when you spend the majority of your time deleting code.
Image

Walter Dnes
Lunatic
Lunatic
Posts: 297
Joined: Thu Jul 30, 2015 8:29 pm
Location: Vaughan, ON, Canada

Re: palemoon-27.0.0b3r2 - disable-elf-hack

Postby Walter Dnes » Sat Oct 29, 2016 7:13 pm

Matt A Tobin wrote:I am conflicted.. What really needs to happen is is an audit of which libs are safe and which ones aren't.

You'll have to do a lot of micro-managing for that... i.e.

"ac_add_options --with-system-foo" only if lib-foo is in a specific range of versions, and built with specific compile-time options

"ac_add_options --with-system-bar" only if lib-bar is in a specific range of versions, and built with specific compile-time options

This is dependancy management that is usually done by the distro. And the necessary ranges/compile-time-options may change with each version of Pale Moon. I don't think you really want to take on that task.

gin83
Moongazer
Moongazer
Posts: 8
Joined: Fri May 06, 2016 7:16 am

Re: palemoon-27.0.0b3r2 - disable-elf-hack

Postby gin83 » Sat Oct 29, 2016 8:17 pm

Travis any ideas on the issue?
Your input is always welcome, furthermore It might put back the topic of this thread on track.

User avatar
trava90
Contributing developer
Contributing developer
Posts: 1296
Joined: Mon May 20, 2013 6:19 pm
Location: Earth
Contact:

Re: palemoon-27.0.0b3r2 - disable-elf-hack

Postby trava90 » Sun Oct 30, 2016 4:21 am

I do not know what is causing the elf-hack problem off-hand without looking into it more, but there have been many reported issues with Slackware. Try building without system-libs and see if that resolves it.

As for what to do about building with system libs, I agree completely with Tobin.

gin83
Moongazer
Moongazer
Posts: 8
Joined: Fri May 06, 2016 7:16 am

Re: palemoon-27.0.0b3r2 - disable-elf-hack

Postby gin83 » Sun Oct 30, 2016 7:39 am

slackware's users used to experience trouble with Palemoon. We faced a segmentation fault whether we were using Palemoon as binaries through your release channel or with our own builds. Some time ago Slackware rebuilt glib2-2.46.2 with a path to fix a crash in Thunar, since that day no more seg fault (at least from my side).

If It's good practice to not profit from the system libraries, then I'll adjust my .mozconfig accordingly.
That elf hack triggered my curiosity because I've been building Palemoon since the 25.7.3 release without much change in my parameters.

I guess the matter is closed.
Cheers!

User avatar
ketmar
Lunatic
Lunatic
Posts: 257
Joined: Tue Jul 28, 2015 11:10 am
Location: Earth

Re: palemoon-27.0.0b3r2 - disable-elf-hack

Postby ketmar » Tue Nov 01, 2016 6:31 am

gin83 wrote:slackware's users used to experience trouble with Palemoon.

would you please not speak for "slackware users" in the future? thank you alot.


Return to “Pale Moon for Linux”

Who is online

Users browsing this forum: Chrisp, Yahoo [Bot] and 7 guests