glibc 2.2 vs 2.3 issue back again
- From: Denes Molnar <molnar@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 28 Dec 2005 18:42:24 -0500
Hi,
The glibc 2.2 vs 2.3 problem came back to haunt me - and this time there is no way to compile from source because the package in question, Mathematica 5.2, has only a glibc-2.3 version for Linux.
Somebody mentioned in a previous thread (dynamic ELF - > static) that all one needs to do is lump together all the dynamic libs needed and use LD_LIBRARY_PATH. I know, Paul Pluzhnikov has questioned this and probably he is right because it fails for me. I tried the following:
i) for all the libs needed (as reported by 'ldd', except the "ghost" linux-gate.so.1) by the various Mathematica executables, copy into a new directory, /lib2, the glibc 2.3 versions from Fedora 4
ii) copy also the linux loader ld-linux from Fedora 4 into /lib2, add a symlink /lib2/ldlinux.so.2 to it
iii) replace the strings /lib/ld-linux.so.2 with the identical-length /lib2/ldlinux.so.2 in all the executables and also the libc 2.3 libraries (for convenience, so that one need not invoke the glibc 2.3 loader "by hand")
iv) in the main mathematica executable, which is a shell script, set LD_LIBRARY_PATH to /lib2 and export it (bash!) just before the last "exec <Mathematica_executable> <params>" line that starts the real executable
Thus the script runs with libc-2.2 libraries but starting from the main executable everything should be libc 2.3.
-----
What happens is about 30% of the time immediate (or quick) SEGFAULT. The other 70% brings up the main window (where X, fonts, editing all work) but another X window that should also come up (specialized input, like matrices or indices) does NOT show up at all. When one tries to compute something, which should start and utilize another so-called Mathematica kernel process, the process does not start and one gets some internal Mathematica error.
I tried 'strace' to see where things fail - but with strace I get SEGFAULT 100% of the time and no X windows come up at all. On Fedora tracing Mathematica is not a problem at all.
--------
Naively, I would have thought that if I copy all required glibc-2.3 libraries and all glibc-2.3 version for all the executables (including ones executed by the executables themselves), things should be fine. I have a few hunches where one might look to try to fix this but given my little knowledge I would like to ask some advice (to save me from dead ends, or rank possibilities by chance of success).
i) could the program or the Fedora libraries require 2.6 kernels? Because I am running 2.4.26. The strace output for starting mathematica on Fedora gives quite different system calls. For example set_thread(...), which does not show up at all on my linux 2.4.26. Google does bring up pages about libc 2.3 + kernel 2.4 systems, so libc 2.3 alone should not require a kernel change but I wonder whether the libraries I copied could have some kernel dependence.
ii) could it be that I need additional data files for libc 2.3? I vaguely recall one of the main changes from libc 2.2 to 2.3 was in internationalization support. Hints that this might matter are that via strace I see that both the working Fedora version and my attempts on my linux 2.4.26 load libnss_files.so (by the way not reported by ldd), and on my linux 2.4.26 I also get "Warning: locale not supported by C library, locale unchanged" in the cases when the Mathematica windows at all come up. This message does not come up for the working mathematica on Fedora. I of course tried with a copy of libnss...so.2 from Fedora but that did not fix the problem. But what about locale files? I checked that my RedHat 7.3 has some 30MB in /usr/lib/locale whereas Fedora 4 has nearly 120MB, and it is not only the size but also there are additional files on Fedora such as /usr/lib/locale/locale-archive. If I want to copy the Fedora locales, is there a way to tell libc-2.3 to look for them at some specific place I choose (so that things can coexist with my lib 2.2)?
iii) it appears that Mathematica would communicate with its kernel process through some special files in /tmp (named pipes?, if I am guessing right). Could such inter-process communication be affected by locale settings, or kernel version??
---------
Thanks for any advice,
Denes .
- Follow-Ups:
- Re: glibc 2.2 vs 2.3 issue back again
- From: Paul Pluzhnikov
- Re: glibc 2.2 vs 2.3 issue back again
- From: John Reiser
- Re: glibc 2.2 vs 2.3 issue back again
- From: Roger Leigh
- Re: glibc 2.2 vs 2.3 issue back again
- Prev by Date: Re: Why does Firefox use 47 MB of RAM?
- Next by Date: Re: glibc 2.2 vs 2.3 issue back again
- Previous by thread: -D_FILE_OFFSET_BITS=64 where to put it in a make project ?
- Next by thread: Re: glibc 2.2 vs 2.3 issue back again
- Index(es):
Relevant Pages
|