error building jobjc during build of jdk7u-osx
Mike Swingler
swingler at apple.com
Tue Jan 3 16:16:10 PST 2012
On Dec 28, 2011, at 1:46 PM, Stephen Bannasch wrote:
> At 12:33 AM -0500 12/28/11, Stephen Bannasch wrote:
>
>> I tried the following to build jdk7u-osx:
>>
>> hg clone http://hg.openjdk.java.net/jdk7u/jdk7u-osx
>> cd jdk7u-osx
>> hg fpull -u
>> unset LC_ALL LANG CLASSPATH JAVA_HOME LD_LIBRARY_PATH; make ALLOW_DOWNLOADS=true SA_APPLE_BOOT_JAVA=true ALWAYS_PASS_TEST_GAMMA=true ALT_BOOTDIR=`/usr/libexec/java_home -v 1.6`
>>
>> But got the following error building jobjc:
>>
>> ./jdk/src/macosx/native/jobjc/build.xml:131: exec returned: 1
>> at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:646)
>> at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:672)
>> at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:498)
>> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
>> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:597)
>> 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:390)
>> at org.apache.tools.ant.Target.performTasks(Target.java:411)
>> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
>> at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
>> at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
>> at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
>> at org.apache.tools.ant.Main.runBuild(Main.java:809)
>> at org.apache.tools.ant.Main.startAnt(Main.java:217)
>> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
>> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
>>
>
> Evidently this ruby script used as part of the jobjc build process doesn't work in Ruby 1.9.2p290:
>
> jdk/src/macosx/native/jobjc/run-and-write-if-okay
>
> I am using RVM to manage multiple ruby installs and I use Ruby 1.9.2p290 as the default.
>
> Selecting the system Ruby with an '.rvmrc' file before running the build now completes without this error.
>
> [jdk7u-osx ]$ cat .rvmrc
> rvm system
>
> [jdk7u-osx ]$ ruby -v
> ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin10.0]
>
> I've updated my scripts for building jdk7u-osx:
>
> https://gist.github.com/1529906
Feel free to transliterate that script into pure bash shell script, or something more maintainable. The Java build process should not depend on the system installed version of Ruby. It's also quite deceptive that that script doesn't end in .rb either.
Regards,
Mike Swingler
Apple Inc.
More information about the macosx-port-dev
mailing list