This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Problem with static linking
Jeff Morrow wrote:
> OK, here's what I did. I compiled with -g and ran. On the compiling
> machine, it all worked just fine. When I transferred the binary to
> another machine and ran it, I got the following:
Looks like a glibc incompatibility? Even with static linking you have to
make sure that iconv stuff is of the right version - I think it gets
dynamically loaded? So you should make sure that the "other" machine has
the same glibc as your compiling machine.
If you want to create a good portable binary, I recommend statically
linking libgcj, but dynamically linking glibc, linuxthreads, etc. That way
the installed glibc version shouldn't matter quite as much.
regards
[ bryce ]