[liblouis-liblouisxml] Re: Pre-built Windows binaries: addressing jni.h for Greg

  • From: Cheryl Homiak <cahomiak@xxxxxxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Tue, 8 Sep 2015 12:54:07 -0500

I think it would be a good idea if you would post to the thread I've started
once you see it.

I have the jni.h problem in debian and haven't solved it there but I do not
have the problem in Mac OS. It's probable that your jni.h is in what the
configure program considers to be a nonstandard place. I kno that I actually
have a jni.h in debian and I haven't figured out how to either change the path
so configure sees it or install another version of java. Also I do know that
even if you have java installed you must be sure you have the headers. When I
have a moment I'll try to track down you what java I have on my Mac but the
issue isn't whether you can trace javac; the question is: Where is jni.h?

Here are the relevant lines from my config.log in my successful Mac install
(btw there should be no need to leave java bindings out and as you saw that
won';t circumvent this problem):
:
checking for javac
configure:15932: found /usr/bin/javac
configure:15945: result: /usr/bin/javac
configure:15960: checking symlink for /usr/bin/javac
configure:15968: result:
/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javac
configure:15986:
_JTOPDIR=/System/Library/Frameworks/JavaVM.framework/Versions/Current
configure:15987:
_JINC=/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers
configure:15993: checking for
/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/jni.h
configure:16007: result: yes
configure:16088:


So I googled: Yosemite what package do I need for jni.h

Here is one group of posts i got though this was referring to Lion:
Question:
3
I'm trying to build a JNI project, but I can't seem to find the JNI headers
(e.g. jni.h). I've installed "Java for Mac OS X 10.7 Developer Package" from
https://developer.apple.com/downloads/ <https://developer.apple.com/downloads/>.

Various online resources suggest the headers should be in locations such as
/System/Library/Frameworks/JavaVM.framework/Headers or
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/include, but I
can't find them anywhere -- the installer doesn't seem to be creating them.

I see other JDK components -- just for example,
/System/Library/Frameworks/JavaVM.framework/Commands/javah -- but not the JNI
headers. Any suggestions?

Answer:




Download the Java 8 JDK
fromhttp://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

<http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html>
Install it.

See where Oracle put it:

$/usr/libexec/java_home<br />
/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home
Symlink from there to where Apple used to put it:

$cd /System/Library/Frameworks/JavaVM.framework/Versions<br />
$sudo ln -nsf /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents
./CurrentJDK
Symlink to make a Headers directory in JavaVM.framewrk:

$cd /System/Library/Frameworks/JavaVM.framework<br />
$sudo ln -nsf Versions/CurrentJDK/Home/include/ ./Headers
This fixed things for me. I haven't bothered with defining JAVA_HOME yet
because I haven't need

I do recall installing the Oracle package - I think the jre but I have done no
extra symlinking. I also of course have XCode and its commandline tools
installed. Be sure to compare the paths in the thread I've pasted with what my
config.log shows. This same thread explains that there were some major changes
as far as the handling of java on the Mac and I would think that the problem
might be worse if you didn't do a clean install of Yosemite bu I'm not s of
this. Here's the link to the infrmation I have pasted.

http://stackoverflow.com/questions/9704376/how-to-install-java-native-development-headers-on-os-x-lion
--
Cheryl

Move forward by looking back!
"Above all, fear the Lord
and worship Him faithfully
with all your heart;
consider the great things He has done for you."
(1 Samuel 12:24, HCSb)



On Sep 8, 2015, at 9:53 AM, Gregory Kearney <gkearney@xxxxxxxxx> wrote:

OK, I'll give up on the pre-compiled binaries and set off yet again to build
liblouistdml so I run the following as I don't really need Java binding
anyway for what I am doing:

./configure --disable-java-bindings

Here is where ./configure stops with the following error messages. By the way
I do have the Java SE Development Kit 8u60 installed.


checking for javac... /usr/bin/javac
checking symlink for /usr/bin/javac...
/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javac
checking for
/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/jni.h...
no
checking for
/System/Library/Frameworks/JavaVM.framework/Versions/include/jni.h... no
configure: error: cannot find JDK header files

the standard ./configure with no options also fails at the same place. What
do I do now? Sorry for being such a pain about this. I know I have been a
real pest but I really want to keep my tools current with the distributions
of liblouis.


Commonwealth Braille & Talking Book Cooperative
Greg Kearney, General Manager
#320, 185-911 Yates Street
Victoria, BC V8V 4Y9
CANADA
Email: info@xxxxxxxxx

U.S. Address
21908 Almaden Av.
Cupertino, CA 95014
UNITED STATES
Email: gkearney@xxxxxxxxx




On Sep 8, 2015, at 6:12 AM, Greg Kearney <gkearney@xxxxxxxxx> wrote:

Can you share with me what you did to get this to work?

Sent from my iPhone

Greg Kearney

On Sep 7, 2015, at 5:25 PM, Cheryl Homiak <cahomiak@xxxxxxxxxxx> wrote:

Liblouis itself has never been a problem for me to install on the Mac. As
for liblouisutdml, I'm not even using homebrew and/or Macports any more and
with very little work was able to successfully install liblouisutdml 2.6.0.
Furthermore, this afternoon I once again updated my git downloads of
liblouis and liblouisutdml, as I have been doing periodically, and
successfully updated them with absolutely no problem using ./autogen.sh,
./configure, make and make install. I also had no problem separately
downloading the liblouis-2.6.4 tarball and installcompiling and installing
it on the Mac. And honestly, even when I was having the problems with
installing liblouisutdml, the problem was that i couldn't find the
solution; it really wasn't that I had to install all manner of odd packages.

I am sure there must be good reasons why homebrew still is using
liblouisutdml 2.5.0 but I would say that at this point it is not impossible
to install liblouisutdml on the Mac cleanly.

--
Cheryl

Move forward by looking back!
"Above all, fear the Lord
and worship Him faithfully
with all your heart;
consider the great things He has done for you."
(1 Samuel 12:24, HCSb)



On Sep 7, 2015, at 10:50 AM, Gregory Kearney <gkearney@xxxxxxxxx> wrote:

If we can not have pre-build binaries, a serious shortcoming that will
forever limit liblouis usefulness in my opinion, can we at an absolute
minimum insure we release liblouis, and more important libLouisutdml, in
distributions which we know can be configured (./configure), build (make)
and installed (make install) cleanly on every platform without demanding
that the user have all manner of odd packages installed?

As it stands now libLouisutdml is simply impossible to build on MacOS X
cleanly as evidenced by the fact that the homebrew install are still
installing version 2.5.0 the last version that sort of worked.


Commonwealth Braille & Talking Book Cooperative
Greg Kearney, General Manager
#320, 185-911 Yates Street
Victoria, BC V8V 4Y9
CANADA
Email: info@xxxxxxxxx

U.S. Address
21908 Almaden Av.
Cupertino, CA 95014
UNITED STATES
Email: gkearney@xxxxxxxxx


For a description of the software, to download it and links to
project pages go to http://liblouis.org

For a description of the software, to download it and links to
project pages go to http://liblouis.org

For a description of the software, to download it and links to
project pages go to http://liblouis.org

Other related posts:

  • » [liblouis-liblouisxml] Re: Pre-built Windows binaries: addressing jni.h for Greg - Cheryl Homiak