Build Failure on OpenSuSE 10.2 AMD 64 and Solution
Kelly O'Hair
Kelly.Ohair at Sun.COM
Tue May 15 01:11:14 UTC 2007
Keep in mind that there are some java sources that are templates for
generated code, and there are several other ways java source is generated
during the build process. So a simple ant script just isn't going to be
possible. Look in the build/*/gensrc directory after a build for all the
generated java sources.
-kto
Andreas Schaefer wrote:
> Kelly O'Hair wrote:
>>
>>
>> Andreas Schaefer wrote:
>>> Hi
>>>
>>> Petteri Räty wrote:
>>>> Andreas Schaefer kirjoitti:
>>>>
>>>>> /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld:
>>>>>
>>>>> cannot find -lX11
>>>>>
>>>> See that?
>>>>
>>> Yes, I saw that and that what made me go installing X11. The strange
>>> thing is that there was only one X11.so (in ghostscript) and that after
>>> installing the additional RPMs I did not found any new X11.* files.
>>>
>>> It also seems only to happen on AMD64 because with OpenSuSE on Intel
>>> 32-bit I did not have to install these packages.
>>>>
>>>>> After installing X11-devel and X11-Server I could go with the build
>>>>> even
>>>>> though I have no clue what fixed it.
>>>>>
>>>>>
>>>> You were missing the libraries so installing them fixed it. Of
>>>> course it
>>>> would be better to check for them in the sanity check and fail with a
>>>> nice error message.
>>>>
>>> Well, maybe but I am not quite sure if you can check for all
>>> dependencies. It is also difficult to keep up as you see with the
>>> AccColorT.h file that is not used to build but the sanity check looks
>>> for that file.
>>>
>>> All of that is a strong incentive for me to have a Java-source-only
>>> build using Ant. It is way to complicated to build the Java source with
>>> the make file.
>>>
>>
>> Not sure what ant vs. make has to do with sanity checks and native
>> libraries
>> missing, seems like they are a pain no matter what you use to build.
>>
>> Just building the java source is worth investigating, but keep in mind
>> that we need to clean up the javac/recompile build ordering issue we
>> have.
>> Right now, we use the boot jdk (stage 1) to build a javac from the jdk
>> sources plus
>> enough runtime for this new first stage2 javac to run. These classes are
>> built by the boot javac, and usually aren't the final ones we want.
>> Then we take the stage2 javac we built and recompile everything javac
>> needs again, this gives us a new javac built from itself so to speak,
>> then we compile all the rest of the java source of the jdk.
>> The fact that we run what we build during the build process means that
>> any java sources that are backed up with JNI native libraries must
>> get their native code compiled after the java classes are built.
>> Since you need the javah headers to compile the native code, you need
>> the classes files first, then run javah, then run the native C/C++
>> compiler.
>> It's pretty convoluted.
>>
>> But we plan on changing this soon, and in such a way that the entire
>> jdk is built completely, and running the build at all isn't required
>> to get
>> a build. In other words, we remove the javac recompile stage2 compiler
>> and use a prebuilt javac from the javac team.
>> These changes are in the works, and should make things simplier to
>> build, and faster too.
>> The recompile process will be removed and delegated to the javac
>> team.
>>
>> -kto
> My primary goal is to create a build script that only builds the Java
> part to make life easier for "Java-only" developers. That said I agree
> that it would not make much sense to have a build in Make and Ant but
> for now that is were I will start just to find the pitfalls and traps.
> Right now it takes way to long for my little change in the URLConnection
> to build before I can fire up a test.
>
> Maybe Java is called so because I can get a few cups of Joe when Java is
> building - just kidding.
>
> -Andy
More information about the build-dev
mailing list