3.3 configure static
Jeff Sturm
jsturm@one-point.com
Wed Jul 9 03:55:00 GMT 2003
On Wed, 9 Jul 2003, Erik Poupaert wrote:
> Is there a way to fix gcj 3.3 so that configure static on Linux would work?
What have you tried? How about:
1) Pick the oldest distribution that you plan to support with your
distributed binary (e.g. RH 7.2) and use this as your build machine.
2) Configure your GCC toolchain with --disable-shared.
3) Build your application with this toolchain, and verify it does not link
to any DSO apart from libc, libm and libpthread.
I haven't tried this, but I'd expect that because of 1) your binary will
work with the libc.so installed on your build machine or any later
version, and 2) will not depend on shared versions of libgcc_s and libgcj.
Note this is not the same as simply building your application with
-static. I strongly recommend against -static for distribution.
> It is quite unfortunate that this configure option does not work on
> Linux, while it does on Windows.
I've grown tired of hearing that Windows somehow solves a problem that
GNU/Linux does not. For one thing GCC doesn't support shared builds
whatsoever on Windows, so your options are actually more limited. For
another, what you might think are static executables on Windows certainly
are not: run objdump -p on them sometime to see what DLLs they depend on.
Microsoft certainly has library versioning problems of their own, let
alone incompatibilities between releases (e.g. 95/98/ME vs. NT/2000/XP).
Jeff
More information about the Java
mailing list