Opened 10 years ago

Closed 10 years ago

#26947 closed defect (fixed)

subversion-javahlbindings does not build with newest 10.6 Java Developer Package

Reported by: akehurst@… Owned by: danielluke (Daniel J. Luke)
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: MailToArlo@…
Port: subversion-javahlbindings

Description

I updated to the newest Java Development package for 10.6 and now I'm having a problem compiling subversion-javahlbindings (says it can't find the JNI headers).

Change History (12)

comment:1 Changed 10 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to dluke@…

Please remember to cc the maintainer.

Are you sure you installed the updated Java developer package as well as the Java update? Similar problems like #26934 arise from installing one but not both.

comment:2 Changed 10 years ago by akehurst@…

Yes, I've installed both. The Java Update came through the Software Update system, and I went and downloaded the Java Developer Package Update 3 (javadeveloper_10.6_10m3261.dmg, MD5=8013e1d4f7d85b80b8929a0b0ce6be4e).

Then, I rebooted my machine to make sure I had a good starting point.

As I wanted to fully repro this problem I went ahead and removed all my installed ports and tried to build from scratch. I'm using Macports 1.9.1

I issued this command: 46 sudo port -v install subversion-javahlbindings

It compiles a few of the dependencies, and now it's hanging up in building db46:

---> Building db46 /bin/sh ./libtool --mode=compile /usr/bin/gcc-4.2 -c -I. -I../dist/.. -I/opt/local/include -pipe -O2 -arch x86_64 -fno-strict-aliasing ../dist/../libdb_java/db_java_wrap.c

/usr/bin/gcc-4.2 -c -I. -I../dist/.. -I/opt/local/include -pipe -O2 -arch x86_64 -fno-strict-aliasing ../dist/../libdb_java/db_java_wrap.c -fno-common -DPIC -o .libs/db_java_wrap.o

/bin/sh ./libtool --mode=compile /usr/bin/gcc-4.2 -c -pipe -O2 -arch x86_64 -I../dist/.. -I/opt/local/include ../dist/../db_dump185/db_dump185.c ../dist/../libdb_java/db_java_wrap.c:123:17: error: jni.h: No such file or directory ../dist/../libdb_java/db_java_wrap.c:147: error: expected ')' before '*' token

[ SNIP ]

../dist/../libdb_java/db_java_wrap.c:10071: error: expected '=', ',', ';', 'asm' or 'attribute' before 'void' make: * [db_java_wrap.lo] Error 1 make: * Waiting for unfinished jobs.... shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_db46/work/db-4.6.21/build_unix" && /usr/bin/make -j2 all " returned error 2 Error: Target org.macports.build returned: shell command failed Warning: the following items did not execute (for db46): org.macports.activate org.macports.build org.macports.destroot org.macports.install Log for db46 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_db46/main.log Error: The following dependencies failed to build: apr-util db46 expat libiconv gperf sqlite3 ncurses ncursesw readline cyrus-sasl2 openssl zlib gettext junit hamcrest-core apache-ant neon serf subversion Error: Status 1 encountered during processing. To report a bug, see <http://guide.macports.org/#project.tickets>

comment:3 Changed 10 years ago by akehurst@…

OK, better formatted:

--->  Building db46
/bin/sh ./libtool --mode=compile /usr/bin/gcc-4.2 -c -I. -I../dist/.. -I/opt/local/include -pipe -O2 -arch x86_64  -fno-strict-aliasing ../dist/../libdb_java/db_java_wrap.c
 /usr/bin/gcc-4.2 -c -I. -I../dist/.. -I/opt/local/include -pipe -O2 -arch x86_64 -fno-strict-aliasing ../dist/../libdb_java/db_java_wrap.c  -fno-common -DPIC -o .libs/db_java_wrap.o
/bin/sh ./libtool --mode=compile /usr/bin/gcc-4.2 -c -pipe -O2 -arch x86_64  -I../dist/.. -I/opt/local/include ../dist/../db_dump185/db_dump185.c
../dist/../libdb_java/db_java_wrap.c:123:17: error: jni.h: No such file or directory
../dist/../libdb_java/db_java_wrap.c:147: error: expected ')' before '*' token

[snip]

../dist/../libdb_java/db_java_wrap.c:10071: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
make: *** [db_java_wrap.lo] Error 1
make: *** Waiting for unfinished jobs....
shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_db46/work/db-4.6.21/build_unix" && /usr/bin/make -j2 all " returned error 2
Error: Target org.macports.build returned: shell command failed
Warning: the following items did not execute (for db46): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Log for db46 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_db46/main.log
Error: The following dependencies failed to build: apr-util db46 expat libiconv gperf sqlite3 ncurses ncursesw readline cyrus-sasl2 openssl zlib gettext junit hamcrest-core apache-ant neon serf subversion
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>

comment:4 Changed 10 years ago by akehurst@…

and I do have jni.h, in what looks like the proper place:

Jade:Headers jakehurst$ ls -al
total 56
drwxr-xr-x  14 root  wheel    476 Oct 22 13:03 .
drwxr-xr-x  10 root  wheel    340 Oct 22 13:03 ..
-rw-r--r--   1 root  wheel    472 Oct  6 10:30 AWTCocoaComponent.h
-rw-r--r--   1 root  wheel   1708 Oct  6 10:30 JDWP.h
-rw-r--r--   1 root  wheel  11217 Oct  6 10:30 JDWPCommands.h
-rw-r--r--   1 root  wheel    179 Oct  6 10:30 JavaVM.h
-rw-r--r--   1 root  wheel   2390 Oct  6 10:30 NSJavaConfiguration.h
-rw-r--r--   1 root  wheel   2060 Oct  6 10:30 NSJavaVirtualMachine.h
-rw-r--r--   1 root  wheel   8498 Oct  6 10:30 jawt.h
-rw-r--r--   1 root  wheel    486 Oct  6 10:30 jawt_md.h
-rw-r--r--   1 root  wheel   5926 Oct  6 10:30 jdwpTransport.h
-rw-r--r--   1 root  wheel  68336 Oct  6 10:30 jni.h
-rw-r--r--   1 root  wheel    507 Oct  6 10:30 jni_md.h
-rw-r--r--   1 root  wheel  77539 Oct  6 10:30 jvmti.h
Jade:Headers jakehurst$ pwd
/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers

comment:5 Changed 10 years ago by danielluke (Daniel J. Luke)

Status: newassigned

I get the same errors on a system that doesn't have the Developer package installed.

subversion's configure script is looking for jni.h in /Library/Java/Home/include

still investigating...

comment:6 Changed 10 years ago by danielluke (Daniel J. Luke)

Looks like the latest packages from Apple don't have an include link or directory there anymore.

A quick hack would be to add one:

sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers /System/Library/Frameworks/JavaVM.framework/Home/include

which lets things build again...

I guess we need to patch every java port for this? :-\

comment:7 Changed 10 years ago by akehurst@…

I did the quick hack and added a symlink. Now doing a port clean db46, and rebuilding it. It does appear to be working for me.

Thanks for the help.

comment:8 Changed 10 years ago by akehurst@…

Cc: akehurst@… added

Cc Me!

comment:9 Changed 10 years ago by jmroot (Joshua Root)

Cc: akehurst@… removed

You don't need to be in cc when you are the reporter. The db46 build failure is #26939, and it seems like it goes away for most people after installing the developer package.

comment:10 Changed 10 years ago by akehurst@…

That may be so, but on my system I installed that Java Developer Package twice, and still had the same issue. The issue was resolved when I created the symlink provided by dluke@macports above.

comment:11 Changed 10 years ago by MailToArlo@…

Cc: MailToArlo@… added

Cc Me!

comment:12 Changed 10 years ago by danielluke (Daniel J. Luke)

Resolution: fixed
Status: assignedclosed

Ok, you do need to have the Java Developer Package installed, but it doesn't install a symlink that subversion's configure script was looking for. (The db46 configure script uses considerably more code to find the appropriate header location).

I've just submitted a patch that should fix the build problem (r72798)

Note: See TracTickets for help on using tickets.