Make problem causing gnu-java-beans.lo to be created incorrectly
Terry Laurenzo
tlaurenzo@gmail.com
Sat Aug 20 00:45:00 GMT 2005
Hi all,
I hope there are some people out there who are much more skilled with
automake than me b/c I can't figure out what the problem is here.
I ran into this while creating a libgcj.dll for MinGW, working off of
the 4.1 (May 15, 2005) sources. Some notes on my work (which was
successful) can be found on my blog at:
http://tjlaurenzo.blogspot.com/2005/08/building-libgcjdll-for-mingw-with-gcc.html
Note that I think this problem is not specific to Windows. It is
merely brought out when building a Windows dll because all of the
symbols have to resolve.
Here is the relevant excerpt from my blog:
----------------------------------------
I also ran into a problem with the sequence of the build. During the
first pass build, the gnu-java-beans.lo file is generated prior to the
most of its classfiles being compiled. Because of this, it only
contains a handful of classes, which causes a lot of undefined
references when building the dll later. I think this is a general
problem that just doesn't manifest very often because the java.beans.*
API is very rarely used in practice. A work-around is simple enough.
After you build it once, just delete the generated gnu-java-beans.lo
and rerun make. Since all of the class files are present the output
file will be created as expected. You should see that the backing .o
file(s) are much larger the second time around.
-----------------------------------------
I traced this down to the line in the following line in the Makefile.am:
find gnu/java/beans -name '*.class' -print
This must be executing out-of-sequence because at the time it runs,
there are only a couple of class files to be found. Once the make is
complete, however, all of the class files exist, and rerunning this
target causes the libraries to be created correctly.
Anyway, like I said, I hope someone else can make sense of it. I did
a quick search of the bug database, but without really knowing what to
look for, nothing jumped out at me.
TJ
More information about the Java
mailing list