This is the mail archive of the mailing list for the Java project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCJ 4.1.1 and static linking - SEGV -- SUMMARY

Thomas Aeby wrote:
> A more detailed description with a workaround has been filed as a bug
> report:


I've had nothing but trouble with static builds using gcc newer than an old
4.0-branch snapshot (2005-11-21, I think).  In most attempts, the executable
SEGVs at startup, and gdb only works with core dumps, with gibberish in the
backtraces (some day I'll figure out what's going wrong with my gdb).  With
my 2006-06-27 gcc fetch from svn, THE DESCRIBED PATCH FIXES THE PROBLEM!

I see that all my builds since the start of 2006 used GC_PTHREAD_SYM_VERSION
in pthread_support.c, and all of them had the static build problem.  I
haven't tested very much yet, but a simple AWT app now builds statically
with xlib peers and runs.  I couldn't believe my eyes, so I used ldd to make
sure I'd actually built static executables (says "not a dynamic executable",
of course).  I'll test with a fresh gcc from svn when I get a chance.

Thank you.  Excellent work!

BTW I'm on Linux version, glibc2.3.4.
GCC configured with:

I know others are trying to get static builds working, so I thought I'd
attach a shell script that works for me.  I used the attached script to
build and run my test programs.  It's a bit strange, I know, and there's a
lot of unnecessary stuff in there, but if you do it like this, I claim it
works.  For GTK or QT peers, you may need the same "whole archive" thing,
unless you want to specifically reference a whole bunch of classes in one of
your source files.

Attachment: ces2
Description: Binary data

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]