palemoon-27.0.0b3r2 - disable-elf-hack

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
gin83

palemoon-27.0.0b3r2 - disable-elf-hack

Unread post by gin83 » 2016-10-29, 09:59

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: 35475
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

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

Unread post by Moonchild » 2016-10-29, 10:08

Slackware keeps being that red-headed stepchild ;)
(sorry I can't help here, some Linux folks will have to step in...)
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

gin83

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

Unread post by gin83 » 2016-10-29, 11:01

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

New Tobin Paradigm

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

Unread post by New Tobin Paradigm » 2016-10-29, 18:35

Don't use system libs.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35475
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

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

Unread post by Moonchild » 2016-10-29, 18:39

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?
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

New Tobin Paradigm

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

Unread post by New Tobin Paradigm » 2016-10-29, 18:47

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.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35475
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

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

Unread post by Moonchild » 2016-10-29, 19:10

All good points. Something does need to be done, though.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Walter Dnes
Astronaut
Astronaut
Posts: 650
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

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

Unread post by Walter Dnes » 2016-10-29, 19:13

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.
There's a right way
There's a wrong way
And then there's my way

gin83

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

Unread post by gin83 » 2016-10-29, 20:17

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: 1736
Joined: 2013-05-20, 18:19
Location: Somewhere in Sector 001

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

Unread post by trava90 » 2016-10-30, 04:21

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

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

Unread post by gin83 » 2016-10-30, 07:39

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: 369
Joined: 2015-07-28, 11:10
Location: Earth

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

Unread post by ketmar » 2016-11-01, 06:31

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.

Locked