Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#26934 closed defect (fixed)

cmake 2.8.2_3 fails to build after Java Update

Reported by: dershow Owned by: cssdev
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: wanthalf@…, mkae (Marko Käning), raimue (Rainer Müller), diegotheblind@…, mayace.cysque@…, spyro@…, mf2k (Frank Schima), victor.poughon@…, erickunder@…, acampbell3000@…, dcecchin@…, axet (Alexey Kuznetsov), icemac (Michael Howitz)
Port: cmake

Description

I have cmake 2.8.2_2 installed, but the upgrade to 2.8.2_3 is failing. I am on a Macbook pro, with OS 10.6.4.

Here is the error:

sudo port upgrade outdated
--->  Computing dependencies for cmake
--->  Fetching cmake
--->  Attempting to fetch cmake-2.8.2.tar.gz from http://www.cmake.org/files/v2.8/
--->  Verifying checksum(s) for cmake
--->  Extracting cmake
--->  Applying patches to cmake
--->  Configuring cmake
Error: Target org.macports.configure returned: configure failure: shell command failed
Log for cmake is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_cmake/main.log
Error: Unable to upgrade port: 1
To report a bug, see <http://guide.macports.org/#project.tickets>

I will also attach the log file that is being generated.

Thanks,

--Adam

Attachments (1)

main.log (121.9 KB) - added by dershow 13 years ago.
cmake configure log file

Download all attachments as: .zip

Change History (49)

Changed 13 years ago by dershow

Attachment: main.log added

cmake configure log file

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

The relevant error from the log seems to be:

:info:configure CMake Error at Tests/CMakeLists.txt:1630 (FILE):
:info:configure   file Internal CMake error when trying to open file:
:info:configure   /System/Library/Frameworks/JavaVM.framework/Headers/jni.h for reading.

Does that file in fact exist, and is it readable?

comment:2 Changed 13 years ago by dershow

Good question. It seems to exist if I just do

ls /System/Library/Frameworks/JavaVM.framework/Headers

However, if I try to actually look at the file I can't.
There is a link:

/System/Library/Frameworks/JavaVM.framework/Headers -> Versions/Current/Headers

And there:

ls -l /System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/

returns this:

jni.h -> ../../CurrentJDK/Headers/jni.h

And this:

ls -l /System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/../../CurrentJDK/Headers

Reports no such file or directory.

And this:

more /System/Library/Frameworks/JavaVM.framework/Headers/jni.h

Reports this:

/System/Library/Frameworks/JavaVM.framework/Headers/jni.h: No such file or directory

So it seems like the actual file is missing. I did recently let Apple Software Upgrade do a Java upgrade. I wonder if there was something wrong with this release?
If I do java -version I get 1.6.0_22.

comment:3 Changed 13 years ago by wanthalf@…

Same problem. The links point to an invalid location. I did also install the Java update yesterday. Any way to fix this correctly and globally within the system?

comment:4 Changed 13 years ago by wanthalf@…

Cc: wanthalf@… added

Cc Me!

comment:5 Changed 13 years ago by mkae (Marko Käning)

Cc: mk@… added

Cc Me!

comment:6 Changed 13 years ago by raimue (Rainer Müller)

Cc: raimue@… added

Cc Me!

comment:7 Changed 13 years ago by raimue (Rainer Müller)

I was told this can be fixed by installing the Java for Mac OS X 10.6 Update 3 Developer Package.

comment:8 Changed 13 years ago by mkae (Marko Käning)

I do acknowledge, that installing said package solves the issue.

The question is now, how can a MacPorts port inform the installing user about this before the installation?

There is certainly a method to test for the presence of an installed developer package before going on with the port install, isn't it?

comment:9 Changed 13 years ago by dershow

Yes, that upgrade did the job. I must have had the older Java developer package, and it must be that upgrading java broke that version, or at least how it works with cmake? Anyway, thanks for the help, and I do agree that it would be great if there were some way that a macport user could be informed of this kind of problem.

--Adam

comment:10 Changed 13 years ago by raimue (Rainer Müller)

Summary: cmake 2.8.2_3 fails to buildcmake 2.8.2_3 fails to build after Java Update

comment:11 Changed 13 years ago by cssdev

Owner: changed from macports-tickets@… to css@…
Status: newassigned

I haven't installed that update yet, but it seems odd that there now appears to be another installation required.

comment:12 Changed 13 years ago by diegotheblind@…

Cc: diegotheblind@… added

Cc Me!

comment:13 Changed 13 years ago by jmroot (Joshua Root)

Cc: css@… removed

I filed [rdar://problem/8583005] requesting that the corresponding Developer Package be added to Software Update. Anyone who would like this to happen should file a similar report of their own. http://bugreport.apple.com/

comment:14 Changed 13 years ago by mayace.cysque@…

Cc: mayace.cysque@… added

Cc Me!

comment:15 Changed 13 years ago by hgwrsgr@…

Cc: hgwrsgr@… added

Cc Me!

comment:16 Changed 13 years ago by spyro@…

Cc: spyro@… added

Cc Me!

comment:17 Changed 13 years ago by mf2k (Frank Schima)

Cc: macsforever2000@… added

Cc Me!

comment:18 in reply to:  7 ; Changed 13 years ago by mf2k (Frank Schima)

Replying to raimue@…:

I was told this can be fixed by installing the Java for Mac OS X 10.6 Update 3 Developer Package.

This worked for me.

comment:19 in reply to:  9 Changed 13 years ago by cssdev

Replying to dersh@…:

I do agree that it would be great if there were some way that a macport user could be informed of this kind of problem.

It should be feasible to check for the header, and if it's not present, present a ui_error to the user instructing the user to download and install the Java for Mac OS X Developer Package from ADC.

comment:20 Changed 13 years ago by victor.poughon@…

Cc: victor.poughon@… added

Cc Me!

comment:21 in reply to:  18 ; Changed 13 years ago by victor.poughon@…

Replying to macsforever2000@…:

Replying to raimue@…:

I was told this can be fixed by installing the Java for Mac OS X 10.6 Update 3 Developer Package.

This worked for me.

This did not work for me :(

comment:22 in reply to:  21 Changed 13 years ago by victor.poughon@…

Replying to victor.poughon@…:

Replying to macsforever2000@…:

Replying to raimue@…:

I was told this can be fixed by installing the Java for Mac OS X 10.6 Update 3 Developer Package.

This worked for me.

This did not work for me :(

Actually it did. I had to run port selfupdate first. Sorry for the double post.

comment:23 Changed 13 years ago by cssdev

I'm going to try:

pre-configure {
	if {![file exits "/System/Library/Frameworks/JavaVM.framework/Headers/jni.h"]} {
		ui_error "${name} requires the that the Java for Mac OS X Developer Package is installed. Please download and install this package from https://developer.apple.com/."
	}
}

I'm waiting for a series of upgrades to complete before confirming. I'm not certain if the tcl command will properly report a broken symbolic link as not existing.

comment:24 Changed 13 years ago by erickunder@…

Cc: erickunder@… added

Cc Me!

comment:25 Changed 13 years ago by hgwrsgr@…

Cc: hgwrsgr@… removed

Cc Me!

comment:26 Changed 13 years ago by luis.beca@…

Cc: luis.beca@… added

Cc Me!

comment:27 Changed 13 years ago by luis.beca@…

Cc: luis.beca@… removed

Cc Me!

comment:28 Changed 13 years ago by cssdev

Resolution: fixed
Status: assignedclosed

I bumped the revision in r72692 to check for the header before configuring CMake. If it's not found, then the message points the user to download it from Apple.

comment:29 Changed 13 years ago by acampbell3000@…

Cc: acampbell3000@… added

Cc Me!

comment:30 Changed 13 years ago by jwhowse4

Resolution: fixed
Status: closedreopened

I am in a different position with respect to this fix. I had installed cmake 2.8.2_3 before the Apple Java update. After the Apple Java update, the cmake upgrade from 2.8.2_3 to 2.8.2_4 failed saying that I needed to install Java from Apple, which was already installed. As far as I can tell, the Apple update to Java 1.6.0_22 did not properly update the header path. In the updated version the header path leads to a dead end. I was able to fix this by doing the following.

1) Create directory

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Headers

2) Copy entire contents of directory

/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Headers

to directory

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Headers

After this fix the upgrade to cmake 2.8.2_4 worked. However, if the macports cmake could be made to look for the Java headers in /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Headers this would resolve an existing problem.

comment:31 in reply to:  30 Changed 13 years ago by cssdev

Replying to jwhowse4@…:

I am in a different position with respect to this fix. I had installed cmake 2.8.2_3 before the Apple Java update. After the Apple Java update, the cmake upgrade from 2.8.2_3 to 2.8.2_4 failed saying that I needed to install Java from Apple, which was already installed. As far as I can tell, the Apple update to Java 1.6.0_22 did not properly update the header path. In the updated version the header path leads to a dead end. I was able to fix this by doing the following.

You need to install the developer package, not just the Java update. Modifying system files isn't an acceptable approach. Apple states the dev package is the include headers, so changing the search location won't work either.

After this fix the upgrade to cmake 2.8.2_4 worked. However, if the macports cmake could be made to look for the Java headers in /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Headers this would resolve an existing problem.

Doesn't installing the required dev package put the files in place to satisfy the existing symbolic link? Installing the specified update seems like a better solution than modifying either system contents or port sources.

comment:32 in reply to:  7 Changed 13 years ago by erickunder@…

Replying to raimue@…:

I was told this can be fixed by installing the Java for Mac OS X 10.6 Update 3 Developer Package.

It works!

comment:33 Changed 13 years ago by jmroot (Joshua Root)

Probably better to put the direct link https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20719 in the message rather than just developer.apple.com.

comment:34 Changed 13 years ago by dcecchin@…

Cc: dcecchin@… added

Cc Me!

comment:35 Changed 13 years ago by axet (Alexey Kuznetsov)

Cc: ak@… added

Cc Me!

comment:36 Changed 13 years ago by bayonne

Cc: porter@… added

Cc Me!

comment:38 in reply to:  23 Changed 13 years ago by vulcan_@…

Replying to css@…:

I'm going to try:

pre-configure {
	if {![file exits "/System/Library/Frameworks/JavaVM.framework/Headers/jni.h"]} {
		ui_error "${name} requires the that the Java for Mac OS X Developer Package is installed. Please download and install this package from https://developer.apple.com/."
	}
}

i just hit this problem and this message was only frustrating because i already have the needed package installed .. just not to update 3. And of course bloody Apple does NOT have this update in Software Update .. .grrr.

so yes .. putting in a message that there is an update 3 and the links for 10.5 and 10.6 are needed. I use both Leopard and Snow as several of my fav tools stop working in Snow ;-(

comment:39 Changed 13 years ago by icemac (Michael Howitz)

Cc: mh@… added

Cc Me!

comment:40 in reply to:  37 ; Changed 13 years ago by icemac (Michael Howitz)

Replying to dluke@…:

Replying to jmr@…:

Probably better to put the direct link https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20719 in the message rather than just developer.apple.com.

Or even better:

10.6 - http://adcdownload.apple.com/Java/java_for_mac_os_x_10.6_update_3_developer_package/javadeveloper_10.6_10m3261.dmg

10.5 - http://adcdownload.apple.com/Java/java_for_mac_os_x_10.5_update_8_developer_package/javadeveloper_10.5_9m3263.dmg

Yes, please. Searching on https://developer.apple.com for "Java for Mac OS X Developer Package" does not lead to any useful results.

comment:41 Changed 13 years ago by bayonne

Cc: porter@… removed

Cc Me!

comment:42 in reply to:  40 Changed 13 years ago by cssdev

Replying to mh@…:

Replying to dluke@…:

Replying to jmr@…:

Probably better to put the direct link https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20719 in the message rather than just developer.apple.com.

Or even better:

Yes, please. Searching on https://developer.apple.com for "Java for Mac OS X Developer Package" does not lead to any useful results.

Deep-linking to ADC downloads won't work unless logged into the developer connection.

comment:43 Changed 13 years ago by cssdev

oops, and the link should be to http://connect.apple.com, not http://developer.apple.com. I'll update the message and include the deep links.

comment:44 Changed 13 years ago by cssdev

Resolution: fixed
Status: reopenedclosed

Updated in r72833

comment:45 Changed 13 years ago by njbutko@…

I just ran port selfupdate and port upgrade outdated. I get the following error. I believe this is an error because the requested .jni file is installed at my system at /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Headers so the build system is just looking in an old, now non-standard place.

Error: Target org.macports.configure returned: 
********************
cmake requires the Java for Mac OS X Developer Package from the Apple Developer Connection at http://connect.apple.com.
For Mac OS X 10.6: http://adcdownload.apple.com/Java/java_for_mac_os_x_10.6_update_3_developer_package/javadeveloper_10.6_10m3261.dmg
For Mac OS X 10.5: 
http://adcdownload.apple.com/Java/java_for_mac_os_x_10.5_update_8_developer_package/javadeveloper_10.5_9m3263.dmg
********************
Log for cmake is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_cmake/main.log
Error: Unable to upgrade port: 1
To report a bug, see <http://guide.macports.org/#project.tickets>

comment:46 Changed 13 years ago by cssdev

This should be handled better in CMake 2.8.3, 2.8.3-rc4 provided a change.

comment:47 Changed 13 years ago by cssdev

The CMake bug for this issue is #0011357, and I committed 2.8.3 to r73127

comment:48 Changed 13 years ago by flashjay@…

非常感谢! -fy

Note: See TracTickets for help on using tickets.