Segmentation fault when start binary version (due to old glibc)

Bug #905648 reported by RodionD
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenBox Menu Generator
Invalid
Undecided
Unassigned

Bug Description

# uname -a
Linux work-nb 3.1.5-calculate #1 SMP PREEMPT Wed Dec 14 13:15:05 FET 2011 x86_64 Intel(R) Celeron(R) CPU 560 @ 2.13GHz GenuineIntel GNU/Linux

Segmentation fault when running the binary version of obmenugen.

Revision history for this message
Pável Varela Rodríguez (neonskull) wrote :

Please, could you try to compile obmenugen youserlf and use it? You just need dmd 1.x an phobos 1.x, then, the typical 'make && make install'.
obmenugen, since compiles statically, depends only on glibc. This is what's in my system:

┌[neonskull: ~]
└$ ldd /usr/bin/obmenugen
 linux-gate.so.1 => (0xb77b1000)
 libpthread.so.0 => /lib/libpthread.so.0 (0xb7772000)
 libm.so.6 => /lib/libm.so.6 (0xb7748000)
 libc.so.6 => /lib/libc.so.6 (0xb75cc000)
 /lib/ld-linux.so.2 (0xb77b2000)
┌[neonskull: ~]
└$ pacman -Qo /lib/libc.so.6
/lib/libc.so.6 is owned by glibc 2.14.1-1

Hope this help you. Also, backup and remove all what's on $HOME/.config/obmenugen/ and re-run 'obmenugen'. That could be of help, maybe there is something in your configuration, and configuration in this version has changed, just a little, but maybe is causing some error for you.

See you

Revision history for this message
RodionD (rodion2000) wrote :

Unfortunately, in the main Gentoo tree, there is no packet for dmd and phobos. In the overlay "d" these packages are, but the package dev-lang/dmd-1.061 need dev-util/dmd-common. But his version 1.X in the overlay is not present, only 2.X.

After assembling the dmd and phobos, and trying to compile the project:
work-nb obmenugen-0.5-r72 # make
dmd -O -release -inline -od/tmp/ -of./usr//bin/obmenugen src/d2substs.d src/global_data.d src/openbox_mg.d src/config.d src/file.d src/obmenugen.d src/help.d src/utils.d src/i18n.d src/i18n_common.d src/desktopfile.d
make: dmd: Command not found
make: *** [obmenugen] Error 127

After create a link /usr/bin/dmd1.bin -> /usr/bin/dmd:
dmd -O -release -inline -od/tmp/ -of./usr//bin/obmenugen src/d2substs.d src/global_data.d src/openbox_mg.d src/config.d src/file.d src/obmenugen.d src/help.d src/utils.d src/i18n.d src/i18n_common.d src/desktopfile.d
object.d: Error: module object cannot read file 'object.d'
make: *** [obmenugen] Segmentation fault

Revision history for this message
RodionD (rodion2000) wrote :

Deleted dmd:1 and phobos:1. Set version 2.x. Created a link /usr/bin/dmd2.bin -> /usr/bin/dmd
Try again:
work-nb obmenugen-0.5-r72 # make
dmd -O -release -inline -od/tmp/ -of./usr//bin/obmenugen src/d2substs.d src/global_data.d src/openbox_mg.d src/config.d src/file.d src/obmenugen.d src/help.d src/utils.d src/i18n.d src/i18n_common.d src/desktopfile.d
object.d: Error: module object is in file 'object.d' which cannot be read
Specify path to file 'object.d' with -I switch
make: *** [obmenugen] Error 1

Revision history for this message
RodionD (rodion2000) wrote :

work-nb obmenugen-0.5-r72 # equery f dev-lang/dmd | grep -i object.d
/usr/include/druntime/object.di
Is this it?

Revision history for this message
Pável Varela Rodríguez (neonskull) wrote :

Yes, I think so. ".di" file are "interface" files for ".d" files. something a lot like ".h" and ".c" or ".cpp", so, yes, that should be your path to set.

dmd src/*.d -O -release -inline -od/tmp/ -of./usr/bin/obmenugen -I/usr/include/

Just for you to know: this is the content of my /etc/dmd.conf
┌[neonskull: ~]
└$ cat /etc/dmd.conf
[Environment]
DFLAGS=-I/usr/include/d -L-L/usr/lib

and
┌[neonskull: ~]
└$ pacman -Ql libphobos|grep object
libphobos /usr/include/d/internal/object.d
libphobos /usr/include/d/object.d

Besides, have you checked your glibc version? I'm talking about the segmentation fault the binary screams. Also, the tip about removing all your previous configuration files wasn't helpfull?

Revision history for this message
Pável Varela Rodríguez (neonskull) wrote :

Please, post here your glibc version, dmd, libphobos, etc... Maybe we could finally get a working-for-you binary.

I insist, remove all your previous configuration, or better, tar your $HOME/.config/obmenugen/ and send it to me, to the mail address that's in the readme and documentation.

What happens if you just run "obmenugen --help"?

Revision history for this message
RodionD (rodion2000) wrote :

I came home and try to do everything at home. Set dev-lang/dmd-2.046, dev-libs/phobos-2.046. Home link / usr/bin/dmd.dmd2-phobos --> /usr/bin/dmd appeared by itself.
When trying to make:

rodion-nb obmenugen-0.5-r72 # make
dmd -O -release -inline -od/tmp/ -of./usr//bin/obmenugen src/d2substs.d src/utils.d src/openbox_mg.d src/config.d src/obmenugen.d src/help.d src/global_data.d src/file.d src/i18n.d src/i18n_common.d src/desktopfile.d
toString(char*) called from src/d2substs.d(9) is deprecated. Instead you may want to import std.conv and use to!string(x) instead of toString(x).
src/d2substs.d(9): Error: function std.string.toString!(char*,"src/d2substs.d",9).toString is deprecated
make: *** [obmenugen] Error 1

Deleted versions 2.X and dmd phobos. Set 1.X.
Trying to build shows:

dmd -O -release -inline -od/tmp/ -of./usr//bin/obmenugen src/d2substs.d src/utils.d src/openbox_mg.d src/config.d src/obmenugen.d src/help.d src/global_data.d src/file.d src/i18n.d src/i18n_common.d src/desktopfile.d
mkdir -p ./usr//share/doc/obmenugen/html/
txt2tags -o ./usr//share/doc/obmenugen/html/obmenugen.html html/src/obmenugen-html.t2t
make: txt2tags: Command not found
make: *** [doc] Error 127

Install app-text/txt2tags-2.6 and tried again:

rodion-nb obmenugen-0.5-r72 # make
dmd -O -release -inline -od/tmp/ -of./usr//bin/obmenugen src/d2substs.d src/utils.d src/openbox_mg.d src/config.d src/obmenugen.d src/help.d src/global_data.d src/file.d src/i18n.d src/i18n_common.d src/desktopfile.d
mkdir -p ./usr//share/doc/obmenugen/html/

Bingo?

Cleared the ~/.config/obmenugen and tried ./obmenugen -s:

$ ./obmenugen -s
Information (Core): Generating Static 'menu.xml'.

Bingo!

Now is:
sys-libs/glibc-2.12.2
dev-lang/dmd-1.061
dev-util/dmd-common-2.046
dev-libs/phobos-1.061

Changed in obmenugen:
status: New → Invalid
summary: - Segmentation fault when start
+ Segmentation fault when start binary version (due to old glibc)
Revision history for this message
Pável Varela Rodríguez (neonskull) wrote :

OK, so we already know what was the problem. Binary is built against glibc 2.14.1 and you have 2.12.2, so, it complains about missing features and symbols and simply explodes, jejeje.

I'm really glad to see we've done here, so, marked bug as closed, changed the title of it.

Thank you for your cooperation here.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.