glibc 2.2 vs 2.3 issue back again



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
.



Relevant Pages

  • RE: Maple on Fedora
    ... | I have used Mathematica on Fedora for a number of years. ... Perhaps a full-priced license has ... with open platforms due to those platforms' quick evolution. ...
    (Fedora)
  • Re: open failed: illegal insecure pathname
    ... For setuid/setgid executables your preloaded code has to be read from a ... trusted directory for secure ELF objects. ... It would be much better to unset LD_PRELOAD before extern executables ... get started because this code should only be used by mathematica. ...
    (comp.unix.solaris)
  • RE: Maple on Fedora
    ... I have used Mathematica on Fedora for a number of years. ... | Maple is not open source. ... My daughter bought Mathmatica for a project perhaps five years ago. ...
    (Fedora)
  • Re: maybe of help in redhat issues
    ... Matt Giwer wrote: ... /usr/local/bin rather than /usr/bin even though it has preferentially started to put executables in /usr/bin and this does not make sense. ... No Fedora tip for you! ... fix the file that puts local, ...
    (linux.redhat)
  • Re: mathematica or maple?
    ... deemanw wrote: ... I had a few problems getting mathematica to work with fedora, which was due to selinux. ...
    (sci.math)