I have been trying for a while to cross-compile jamvm (including GNU classpath) for an embedded linux (2.6) and I am stuck in a delicate place.
I will try to sum up: after a lot of errors I finally compiled the package for my architecture but although I specified the --enable-static in the ./configure, when I try to run the jamvm it complains about not finding GLIBC 2.4. The thing is that I have the 2.3.5 version and compiling the 2.4 for my architecture is not an option for the moment (it would mean getting started with a whole new problem).
I suspect the problem comes from building from a machine with a different toolchain than supported by the embedded target.
The thing is that I know the exact gcc, glibc, binutils, and linux kernel headers that match my CPU, but the problem is that I don't know how to incorporate this information in the cross-compiling/build process.
However, perhaps I am wrong assuming that the fact that my machine uses a different toolchain will affect the cross-compiling.
To put it simple, I need to cross-compile jamvm in a way that it does not complain about glibc 2.4 or any other libraries that are not suported by the embedded system (assuming that I know the right toolchain for my architecture)
I would really appreciate any help regarding this issue. I would also appreciate some light on the topic if my reasoning is not correct.
I'm not sure I understand your problem in 100%, but maybe try to build a list of symbols that are creating the dependency on GLIBC 2.4 by using:
(use a more relaxed
grepsearch pattern if you won't find any symbols)Then, check if the offending symbols have other versions in your GLIBC, that is equal or lower than GLIBC v2.3.5. I'll use
posix_spawnas an example:This means that if
posix_spawnis found to be pulling in GLIBC v2.15, your program can be recompiled to useposix_spawnfrom GLIBC v2.2, deleting the GLIBC 2.15 dependency (ifposix_spawnis the only symbol pulling in GLIBC v2.15).You can select which
posix_spawnversion to use by using this directive inside the source code, at the beginning of the unit (.cor.cppfile) that actually uses the symbol:Sorry if this is not what you're asking about.