Re: cannot find java include files (MacOSX 10.9)

Jan Wielemaker <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On 11/16/2013 09:11 AM, Jochem Liem wrote:
> Hi Paulo,
> 
> Thanks. With a JAVA_HOME set I can now compile the git version.
> However, the MacPorts version gives the same error. I did a 'sudo port
> clean --all swi-prolog' before compiling again.

The Macports version is the official 6.5.2 release, which detects
only Apple's Java.  As of 10.9, Apples's Java no longer ships with
the JNI infrastructure, so you need Oracle's Java ...  At least,
that is what I understand about the status.  The git version is
updated to work with Oracle's Java as configured for the Mac ...

If anyone is aware of a well maintained and working configure
script that finds java, javac, the include directories, the
library directories and linker flags needed to link to anya Java on
any platform, please share it.

The current config is based on such as script that I copied from
somewhere.  Since then various people submitted patches for some
configuration and I made many changes to hack around issues on
various platforms.  It is a nightmare :-(

	Cheers --- Jan

> Perhaps the installation process is searching for the java include
> files in the wrong place?
> 
> echo $JAVA_HOME
> /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home
> 
> 
> From the log file:
> :info:build checking for javac... (cached) /usr/bin/javac
> :info:build checking symlink for /usr/bin/javac...
> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javac
> :info:build configure: error: cannot find java include files
> :info:build make[1]: *** [configure] Error 1
> 
> Best regards,
> Jochem
> 
> On Fri, Nov 15, 2013 at 4:15 PM, Paulo Moura <[email protected]> wrote:
>> Hi Jochem,
>>
>> On 15/11/2013, at 13:12, Jochem Liem <[email protected]> wrote:
>>
>>> Dear all,
>>>
>>> I have a fresh install of MacOSX 10.9, but run into trouble compiling
>>> both the git version and the MacPorts version of SWI-Prolog. During
>>> 'configure' there is an error indicating that the java include files
>>> cannot be found (see below).
>>>
>>> I've installed the Java update from Apple and even the Java SDK from
>>> Oracle. It does not change anything. The java and javac commands are
>>> available from the command line.
>>>
>>> Any clue how I can resolve this?
>>
>> Install Oracle's latest JDK and set your JAVA_HOME environment variable pointing to it. Something like:
>>
>> export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home
>>
>> Cheers,
>>
>> Paulo
>>
>> -----------------------------------------------------------------
>> Paulo Moura
>> Logtalk developer
>>
>> Email: <mailto:[email protected]>
>> Web:   <http://logtalk.org/>
>> -----------------------------------------------------------------
>>
>>
>>
>>
>> _______________________________________________
>> SWI-Prolog mailing list
>> [email protected]
>> https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog
> 
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.