jdk builds on the mac
Jonathan Gibbons
jonathan.gibbons at oracle.com
Wed Aug 15 19:10:52 UTC 2012
I would expect the necessary classes to be in
build/$PLATFORM-$ARCH/classes, so you might want to try using that path
instead of the proposed condition.
-- Jon
On 08/15/2012 11:30 AM, Joel Borggrén-Franck wrote:
> Well that didn't work, patch inline:
>
> diff -r 38263aa28324 src/macosx/native/jobjc/build.xml
> --- a/src/macosx/native/jobjc/build.xml Mon Jul 30 22:32:59 2012 +0100
> +++ b/src/macosx/native/jobjc/build.xml Wed Aug 15 20:09:08 2012 +0200
> @@ -73,6 +73,10 @@
> <not><isset property="env.RC_ARCHS"/></not>
> </condition>
>
> +<condition property="classes" value="${obj}/../langtools/dist/lib/classes.jar" else="${env.ALT_JDK_IMPORT_PATH}/jre/lib/rt.jar">
> +<not><isset property="env.ALT_JDK_IMPORT_PATH"/></not>
> +</condition>
> +
> <!-- -/- -->
>
> <property name="bin" location="${obj}/bin"/>
> @@ -115,7 +119,7 @@
> <not><isset property="env.INSTALL_PATH"/></not>
> </condition>
>
> -<echo message="(Settings :src '${src}' :cfg '${cfg}' :obj '${obj}' :dst '${dst}')"/>
> +<echo message="(Settings :src '${src}' :cfg '${cfg}' :obj '${obj}' :dst '${dst}') :classes '${classes}'"/>
>
> <path id="test.lib.path.id">
> <fileset dir="/usr/share/java">
> @@ -140,15 +144,11 @@
> <!-- Compile PrimitiveCoder first to work around javac bug. -->
> <javac srcdir="${core.src}" destdir="${core.bin}" source="1.5" target="1.5" debug="${compile.debug}"
> includes="**/PrimitiveCoder.java"
> - includeantruntime="false">
> -<classpath>
> -<path location="${obj}/../langtools/dist/lib/classes.jar"/>
> -</classpath>
> + includeantruntime="false"
> + classpath="${classes}">
> </javac>
> -<javac srcdir="${core.src}" destdir="${core.bin}" source="1.5" target="1.5" debug="${compile.debug}" includeantruntime="false">
> -<classpath>
> -<path location="${obj}/../langtools/dist/lib/classes.jar"/>
> -</classpath>
> +<javac srcdir="${core.src}" destdir="${core.bin}" source="1.5" target="1.5" debug="${compile.debug}" includeantruntime="false"
> + classpath="${classes}">
> </javac>
>
> <exec executable="/usr/bin/perl" outputproperty="core.classes" failonerror="true">
>
> On 15 aug 2012, at 20:17, Joel Borggrén-Franck<joel.franck at oracle.com> wrote:
>
>> I would't say I'm working on it.
>>
>> But from the department of "works for me (™)" here is a patch that sort of works for me. It might be breaking other stuff (like full forest builds), and it might not be what we want to do ...
>>
>> cheers
>> /Joel
>>
>>
>>
>> On 10 aug 2012, at 07:39, Erik Joelsson<erik.joelsson at oracle.com> wrote:
>>
>>> It does and I believe Joel, in the langtools team, is looking at this issue.
>>>
>>> /Erik
>>>
>>> On 2012-08-10 03:00, Kelly O'Hair wrote:
>>>> I think we need to make sure that the only thing that gets built with the bootjdk javac is the langtools
>>>> bootstrap javac.jar, all other javac compilations needs to be done by the bootstrap javac.
>>>> Does that fix this issue?
>>>>
>>>> -kto
>>>>
>>>> On Aug 6, 2012, at 2:33 AM, Erik Joelsson wrote:
>>>>
>>>>> The classpath reference was added on my request for build-infra. The reason was to get javax.annotation.GenerateNativeHeader on the classpath. The javac used in that ant script is the bootjdk javac, which usually doesn't provide the annotation. I suppose the correct fix would be to change the ant script to use the bootstrap javac instead.
>>>>>
>>>>> /Erik
>>>>>
>>>>> On 2012-07-28 00:06, Kumar Srinivasan wrote:
>>>>>> On 7/25/2012 2:23 PM, Kelly O'Hair wrote:
>>>>>>> Naoto has noticed this build failure on the Mac (just the Mac) when building just the jdk repository.
>>>>>>>
>>>>>>> From what I can tell, the Mac build of the jdk repository now depends on the langtools repository also
>>>>>>> being built, which means that partial builds of just the jdk repository will no longer work on the Mac?
>>>>>>> There is an ant script at jdk/src/macosx/native/jobjc/build.xml that has a baked in classpath reference to
>>>>>>> ../../langtools/dist/lib/classes.jar
>>>>>>>
>>>>>>> Has anyone seen this, or have any additional information on it?
>>>>>> This is preventing me to test certain things I can only run from a jdk build under
>>>>>> jprt on the macosx machine.
>>>>>>
>>>>>> Kumar
>>>>>>
>>>>>>> -kto
>>>>>>>
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> build-core:
>>>>>>> [mkdir] Created dir: /private/tmp/jprt/P1/174541.nsato/s/build/macosx-x86_64/JObjC.build/bin/core
>>>>>>> [javac] com/apple/jobjc/PrimitiveCoder.java added as com/apple/jobjc/PrimitiveCoder.class doesn't exist.
>>>>>>> [javac] Compiling 1 source file to /private/tmp/jprt/P1/174541.nsato/s/build/macosx-x86_64/JObjC.build/bin/core
>>>>>>> [javac] Using modern compiler
>>>>>>> dropping /private/tmp/jprt/P1/174541.nsato/s/build/macosx-x86_64/langtools/dist/lib/classes.jar from path as it doesn't exist
>>>>>>> [javac] Compilation arguments:
>>>>>>> [javac] '-d'
>>>>>>> [javac] '/private/tmp/jprt/P1/174541.nsato/s/build/macosx-x86_64/JObjC.build/bin/core'
>>>>>>> [javac] '-classpath'
>>>>>>> [javac] '/private/tmp/jprt/P1/174541.nsato/s/build/macosx-x86_64/JObjC.build/bin/core'
>>>>>>> [javac] '-sourcepath'
>>>>>>> [javac] '/private/tmp/jprt/P1/174541.nsato/s/src/macosx/native/jobjc/src/core/java'
>>>>>>> [javac] '-target'
>>>>>>> [javac] '1.5'
>>>>>>> [javac] '-g'
>>>>>>> [javac] '-source'
>>>>>>> [javac] '1.5'
>>>>>>> [javac]
>>>>>>> [javac] The ' characters around the executable and arguments are
>>>>>>> [javac] not part of the command.
>>>>>>> [javac] File to be compiled:
>>>>>>> [javac] /private/tmp/jprt/P1/174541.nsato/s/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/PrimitiveCoder.java
>>>>>>> [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.5
>>>>>>> [javac] /private/tmp/jprt/P1/174541.nsato/s/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/JObjCRuntime.java:32: warning: Unsafe is internal proprietary API and may be removed in a future release
>>>>>>> [javac] import sun.misc.Unsafe;
>>>>>>> [javac] ^
>>>>>>>
>>>>>>> .....
>>>>>>>
>>>>>>> [javac] @GenerateNativeHeader
>>>>>>> [javac] ^
>>>>>>> [javac] symbol: class GenerateNativeHeader
>>>>>>> [javac] Note: Some input files use unchecked or unsafe operations.
>>>>>>> [javac] Note: Recompile with -Xlint:unchecked for details.
>>>>>>> [javac] 61 errors
>>>>>>> [javac] 7 warnings
>>>>>>>
>>>>>>> BUILD FAILED
>>>>>>> /private/tmp/jprt/P1/174541.nsato/s/src/macosx/native/jobjc/build.xml:143: Compile failed; see the compiler error output for details.
>>>>>>> at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1079)
>>>>>>> at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:882)
>>>>>>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
>>>>>>> at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
>>>>>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>>>> at java.lang.reflect.Method.invoke(Method.java:601)
>>>>>>> at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>>>>>>> at org.apache.tools.ant.Task.perform(Task.java:348)
>>>>>>> at org.apache.tools.ant.Target.execute(Target.java:357)
>>>>>>> at org.apache.tools.ant.Target.performTasks(Target.java:385)
>>>>>>> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
>>>>>>> at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
>>>>>>> at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
>>>>>>> at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
>>>>>>> at org.apache.tools.ant.Main.runBuild(Main.java:758)
>>>>>>> at org.apache.tools.ant.Main.startAnt(Main.java:217)
>>>>>>> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
>>>>>>> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
>>>>>>>
>>>>>>> Total time: 1 second
>>>>>>> make[2]: *** [../../../build/macosx-x86_64/JObjC.build/JObjC.jar] Error 1
>>>>>>> make[1]: *** [all] Error 1
>>>>>>> make: *** [all] Error 1
More information about the build-dev
mailing list