You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Bill Dudney <bd...@mac.com> on 2004/03/03 22:18:17 UTC

compile problems - javahl on OS X 10.3.2

Hi All,

It has been far too long since I've done C/C++ devl so I'm probably  
being a bonehead. Any help would be greatly appreciated...

I got the source for subversion and I'm trying to get the javahl stuff  
to compile.

cd .../subversion/bindings/java/javahl
./autogen.sh
./configure  
--with-jdk=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/ 
Home
make

tons of errors which seem to all stem from this

SVNClient.h:28:17: jni.h: No such file or directory

For some reason the $(JDK)/include directory is not making it into the  
include directors for g++.

Here is the output of running make up to the failed look for jni.h

 >make
Making all in src
make[1]: Nothing to be done for `all'.
Making all in native
make  all-am
source='SVNClient.cpp' object='SVNClient.lo' libtool=yes \
depfile='.deps/SVNClient.Plo' tmpdepfile='.deps/SVNClient.TPlo' \
depmode=gcc3 /bin/sh ../depcomp \
/bin/sh ../libtool --mode=compile g++ -DPACKAGE_NAME=\"javahl\"  
-DPACKAGE_TARNAME=\"javahl\" -DPACKAGE_VERSION=\"0.32.1\"  
-DPACKAGE_STRING=\"javahl\ 0.32.1\" -DPACKAGE_BUGREPORT=\"\"  
-DPACKAGE=\"javahl\" -DVERSION=\"0.32.1\" -DSTDC_HEADERS=1  
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1  
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1  
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1  
-DHAVE_DLFCN_H=1  -I. -I.     -g -O2  -g -O2  -DDARWIN  
-DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp                       
-I/Users/bdudney/Development/svn/apr/include    
-I/Users/bdudney/Development/svn/apr-util/include  
-I/usr/local/BerkeleyDB.4.2/include  
-I/Users/bdudney/Development/svn/apr-util/xml/expat/lib  
-I../../../../include  -c -o SVNClient.lo `test -f 'SVNClient.cpp' ||  
echo './'`SVNClient.cpp
  g++ -DPACKAGE_NAME=\"javahl\" -DPACKAGE_TARNAME=\"javahl\"  
-DPACKAGE_VERSION=\"0.32.1\" "-DPACKAGE_STRING=\"javahl 0.32.1\""  
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"javahl\" -DVERSION=\"0.32.1\"  
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1  
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1  
-DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1  
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I. -I. -g -O2 -g -O2 -DDARWIN  
-DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp  
-I/Users/bdudney/Development/svn/apr/include  
-I/Users/bdudney/Development/svn/apr-util/include  
-I/usr/local/BerkeleyDB.4.2/include  
-I/Users/bdudney/Development/svn/apr-util/xml/expat/lib  
-I../../../../include -c SVNClient.cpp -MT SVNClient.lo -MD -MP -MF  
.deps/SVNClient.TPlo  -fno-common -DPIC -o .libs/SVNClient.o
In file included from SVNClient.cpp:22:
SVNClient.h:28:17: jni.h: No such file or directory


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: compile problems - javahl on OS X 10.3.2

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Thursday, March 4, 2004 7:14 AM -0700 Bill Dudney <bd...@mac.com> wrote:

> Hi Justin,
>
> Seems they broke something else as well. I had the dev package but no jni.h
> in /usr/include. After creating a link it worked like a charm.
>
> Thanks again!

FWIW, you shouldn't need to create this symlink.  It should be in 
/Library/Java/Home/include.  Part of the changes last night taught Subversion 
how to look in that directory.  -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: compile problems - javahl on OS X 10.3.2

Posted by Bill Dudney <bd...@mac.com>.
Hi Justin,

Seems they broke something else as well. I had the dev package but no 
jni.h in /usr/include. After creating a link it worked like a charm.

Thanks again!

-bd-

> It seems that you now need to download the 'Java 1.4.2 Developer 
> Package' from ADC in order to compile JNI apps at all.
>
> *sigh*


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: compile problems - javahl on OS X 10.3.2

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Wednesday, March 3, 2004 10:22 PM -0700 Bill Dudney <bd...@mac.com> 
wrote:

> ./configure --enable-javahl
> --with-jdk=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/ Home

I just checked and Apple purposely broke the JDK with 'Java 1.4.2' released on 
Feb. 2nd via Software Update.  They seem to have removed all of the JNI header 
files by default.

It seems that you now need to download the 'Java 1.4.2 Developer Package' from 
ADC in order to compile JNI apps at all.

*sigh*

Once you install that package, just do --with-jdk=/usr and it should work. 
You should not specify the Frameworks directory - let Subversion figure that 
out.  -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: compile problems - javahl on OS X 10.3.2

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Wednesday, March 3, 2004 10:22 PM -0700 Bill Dudney <bd...@mac.com> 
wrote:

> Thanks for the response! I tried the targets you suggested below and it
> appears that it is not making the  'subversion/bindings/java/javahl/classes'
> directory (specifically the  classes directory) before trying to put the
> java classes into it.

That should have been handled by mkdir-init.  Not sure why that's not working 
for you.

Regardless, as of the just-committed r8886, I did some cleanups on the build 
system.  Once you install the Java 1.4.2 Development kit from ADC to get the 
JNI headers, you can then run 'make javahl install-javahl' and ./configure 
will now emit warnings if the JDK installation isn't suitable for javahl.

Thanks!  -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: compile problems - javahl on OS X 10.3.2

Posted by Bill Dudney <bd...@mac.com>.
Hi Justin,

Thanks for the response! I tried the targets you suggested below and it  
appears that it is not making the  
'subversion/bindings/java/javahl/classes' directory (specifically the  
classes directory) before trying to put the java classes into it.

Also once I made the classes directory I got 'make javahl-javah  
javahl-java' to run successfully but the javahl-lib target fails with  
the following

breckenridge:~/Development/svn bdudney$ make javahl-lib/bin/sh  
/Users/bdudney/Development/svn/libtool --silent --mode=compile g++  
-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp  -g -O2  -g -O2  
   -I./subversion/include -I.  
-I/Users/bdudney/Development/svn/apr/include    
-I/Users/bdudney/Development/svn/apr-util/include  
-I/usr/local/BerkeleyDB.4.2/include  
-I/Users/bdudney/Development/svn/apr-util/xml/expat/lib  -o  
subversion/bindings/java/javahl/native/BlameCallback.lo -c  
/Users/bdudney/Development/svn/subversion/bindings/java/javahl/native/ 
BlameCallback.cpp
In file included from  
/Users/bdudney/Development/svn/subversion/bindings/java/javahl/native/ 
BlameCallback.cpp:22:
/Users/bdudney/Development/svn/subversion/bindings/java/javahl/native/ 
BlameCallback.h:28:17: jni.h: No such file or directory

Which looks a lot like the previous error.

Any pointers?

here is my configure line...

./configure --enable-javahl  
--with-jdk=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/ 
Home

Thanks!

-bd-


On Mar 3, 2004, at 4:45 PM, Justin Erenkrantz wrote:

> --On Wednesday, March 3, 2004 3:18 PM -0700 Bill Dudney  
> <bd...@mac.com> wrote:
>
>> I got the source for subversion and I'm trying to get the javahl  
>> stuff  to
>> compile.
>
> Yeah, the javahl configure scripts don't properly work on Darwin.
>
> But, the good news is if you are using the trunk, you don't need to  
> use a separate build system - it's all integrated now.  Just pass  
> --enable-javahl to the main Subversion configure and you can then run:
>
> 'make javahl-javah javahl-java javahl-lib'
> 'make install-javahl-javah install-javahl-java install-javahl-lib'
>
> This works for me on OS X.  We'll probably remove the separate javahl  
> build system for 1.1 and beyond.  -- justin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: compile problems - javahl on OS X 10.3.2

Posted by Bill Dudney <bd...@mac.com>.
$ glibtool --version
ltmain.sh (GNU libtool) 1.5 (1.1220 2003/04/05 19:32:58)

Did you provide any special config to get svn's make to use glibtool 
instead of apple's libtool? The fink website suggests 
--program-transform-name=s/libtool/glibtool/. In building fink stuff...

-bd-

On Mar 4, 2004, at 11:21 PM, Justin Erenkrantz wrote:

> --On Thursday, March 4, 2004 8:10 AM -0700 Bill Dudney 
> <bd...@mac.com> wrote:
>
>> mv: rename libsvnjavahl-1.0.dylib to libsvnjavahl-1.0.dylibU: No such 
>> file
>> or directory
>> libtool: install: error: relink `libsvnjavahl-1.la' with the above 
>> command
>> before installing it
>> make: *** [install-javahl-lib] Error 1
>
> That sounds like a libtool bug.  What version of libtool do you have?
>
> FWIW, I'm using:
>
> % glibtool --version
> ltmain.sh (GNU libtool) 1.5.2 (1.1220.2.60 2004/01/25 12:25:08)
>
> This is from Fink unstable.  -- justin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>

Re: compile problems - javahl on OS X 10.3.2

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Thursday, March 4, 2004 8:10 AM -0700 Bill Dudney <bd...@mac.com> wrote:

> mv: rename libsvnjavahl-1.0.dylib to libsvnjavahl-1.0.dylibU: No such file
> or directory
> libtool: install: error: relink `libsvnjavahl-1.la' with the above command
> before installing it
> make: *** [install-javahl-lib] Error 1

That sounds like a libtool bug.  What version of libtool do you have?

FWIW, I'm using:

% glibtool --version
ltmain.sh (GNU libtool) 1.5.2 (1.1220.2.60 2004/01/25 12:25:08)

This is from Fink unstable.  -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: compile problems - javahl on OS X 10.3.2

Posted by Bill Dudney <bd...@mac.com>.
Hi Justin,

Seems that I spoke too quickly. After the initial make I did a make 
install-javahl and got the following errors...

/Users/bdudney/Development/svn/ac-helpers/install-sh -c -d 
/usr/local/lib/svn-javahl
/Library/Java/Home/bin/jar cf 
subversion/bindings/java/javahl/svn-javahl.jar -C 
subversion/bindings/java/javahl/classes org; 
/Users/bdudney/Development/svn/ac-helpers/install-sh -c -m 644 
subversion/bindings/java/javahl/svn-javahl.jar 
/usr/local/lib/svn-javahl;
/Users/bdudney/Development/svn/ac-helpers/install-sh -c -d 
/usr/local/lib/svn-javahl/include
/Users/bdudney/Development/svn/ac-helpers/install-sh -c -d 
/usr/local/lib
cd subversion/bindings/java/javahl/native ; /bin/sh 
/Users/bdudney/Development/svn/libtool --mode=install 
/Users/bdudney/Development/svn/ac-helpers/install-sh -c 
libsvnjavahl-1.la /usr/local/lib/libsvnjavahl-1.la
libtool: install: warning: relinking `libsvnjavahl-1.la'
(cd 
/Users/bdudney/Development/svn/subversion/bindings/java/javahl/native; 
/bin/sh /Users/bdudney/Development/svn/libtool --mode=relink g++ -g -O2 
-g -O2 -L/usr/local/BerkeleyDB.4.2/lib 
-L/Users/bdudney/Development/svn/apr-util/xml/expat/lib -rpath 
/usr/local/lib -o libsvnjavahl-1.la BlameCallback.lo Inputer.lo 
JNIByteArray.lo JNICriticalSection.lo JNIMutex.lo JNIStackElement.lo 
JNIStringHolder.lo JNIThreadData.lo JNIUtil.lo MessageReceiver.lo 
Notify.lo Outputer.lo Path.lo Pool.lo Prompter.lo Revision.lo 
SVNAdmin.lo SVNBase.lo SVNClient.lo Targets.lo libsvnjavahl.la.lo 
org_tigris_subversion_javahl_SVNAdmin.lo 
org_tigris_subversion_javahl_SVNClient.lo 
../../../../../subversion/libsvn_client/libsvn_client-1.la 
../../../../../subversion/libsvn_wc/libsvn_wc-1.la 
../../../../../subversion/libsvn_ra/libsvn_ra-1.la 
../../../../../subversion/libsvn_delta/libsvn_delta-1.la 
../../../../../subversion/libsvn_subr/libsvn_subr-1.la 
/Users/bdudney/Development/svn/apr-util/libaprutil-1.la -ldb-4.2 
/Users/bdudney/Development/svn/apr-util/xml/expat/lib/libexpat.la 
-liconv /Users/bdudney/Development/svn/apr/libapr-1.la -lpthread )
libtool: link: warning: `/usr/lib//libiconv.la' seems to be moved
libtool: link: warning: `/usr/lib//libiconv.la' seems to be moved
libtool: link: warning: `/usr/lib//libiconv.la' seems to be moved
libtool: link: warning: `/usr/lib//libiconv.la' seems to be moved
libtool: link: warning: `/usr/lib//libiconv.la' seems to be moved
mv: rename libsvnjavahl-1.0.dylib to libsvnjavahl-1.0.dylibU: No such 
file or directory
libtool: install: error: relink `libsvnjavahl-1.la' with the above 
command before installing it
make: *** [install-javahl-lib] Error 1

Thanks again for your help!

-bd-


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: compile problems - javahl on OS X 10.3.2

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Wednesday, March 3, 2004 3:18 PM -0700 Bill Dudney <bd...@mac.com> 
wrote:

> I got the source for subversion and I'm trying to get the javahl stuff  to
> compile.

Yeah, the javahl configure scripts don't properly work on Darwin.

But, the good news is if you are using the trunk, you don't need to use a 
separate build system - it's all integrated now.  Just pass --enable-javahl to 
the main Subversion configure and you can then run:

'make javahl-javah javahl-java javahl-lib'
'make install-javahl-javah install-javahl-java install-javahl-lib'

This works for me on OS X.  We'll probably remove the separate javahl build 
system for 1.1 and beyond.  -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org