newbie: compiling/linking

Dhek Bhun Kho
Sat Dec 14 09:49:00 GMT 2002

Hi Jeff,

Op za 14-12-2002, om 17:10 schreef Jeff Sturm:
> Once linked, "ldd ant" will tell you exactly which DSO's are included in
> each.
Maybe you can help me out on this then. I got ant 1.5.1 working now
based sources from jakarta, but the thing is I wanted to:

- make dso's for all core library functions from
bcel,xerces,xalan,regexp,javacup --> implies removing all ui related
code and most of the java source with main methods.
- create native binaries linked to shared libs only

(and have a full set of cni/jni/class/jars whatever, which is handy as
long as I am messing around with source code, some problems only occur
when compiling from source to classes or from classes to native code)

but because I compile and link with: 
gcj -o ant -L/home/java/lib -l-javax-xml-parsers  -l-javax-xml-transform
-l-org-apache-regexp -l-org-apache-bcel  -l-org-apache-tools

I have to explicitly include xerces as a jar into my classpath:
$ export

Because I can't include -l-org-apache-xerces into the linkage of ant
itself, because it fails to resolve classes from org.w3c.dom. It could
be that it's solely due to rpm's from mandrake (I didn't build gcj

I am trying to work around this by recompiling gcj so it just includes
the core java classes into gcj and separate all other stuff to separate
libraries. Or is there a simpler approach available. For some reason I
can't include my libgcj.jar into the compilation because it fails
bytecode verification. 

If I just got that fixed and the silly IllegalArgumentException from
MessageFormat.format() I would be very happy. It's very tempting to just
hack the code from jakarta to make it not call MessageFormat.format().

Thanks in advance, any useful feedback appreciated. If anybody wants a
list of the diffs I made to the code from jakarta, just mail me.

Greets, Bhun.

More information about the Java mailing list