You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Eddie Epstein <ea...@gmail.com> on 2008/06/25 17:20:50 UTC

Re: Building UIMA C++ on Linux

>
> I've had no problems building UIMA C++ for Windows in the past using the
> source obtained from UIMA SVN on Apache.


That's good news :)


> However I am unable to build UIMA C++ for Linux.  The documentation does
> not seem to be up-to-date: file
> README.4src in uimacpp/src
>

> Problem one.
>
> "The simplest way to resolve these dependencies is to use the copies
> included in the Apache UIMA C++ runtime package."


Even if you did have a binary package, README.4src did change recently,
removing the comment about "the simplest way...".


Even when managing to build the dependencies myself i.e. APR, ICU,
> XERCES and setting
> up environmental parameters APR_HOME, ICU_HOME, and XERCES_HOME
>
> make -f Makefile.unix install
>
> Continually says "cannot find APR headers".
>
> Can anyone please point me to idiot proof instructions for building UIMA
> C++ on Linux.


Unlike Windows, after building each dependent library on Linux, a "make
install" must be run. The default install target for APR, ICU and Xerces is
/usr/local. If it is not possible or desirable to install these things
there, use the following syntax:

DESTDIR=my_writable_directory make install

This will put the install images in my_writable_directory/usr/local.
Assuming this is APR, then

export APR_HOME = my_writable_directory/usr/local

Eddie

RE: Building UIMA C++ on Linux

Posted by "De Vries, Hugo" <Hu...@dsto.defence.gov.au>.
FYI: The problem here is that jni.h has an #include <jni_md.h>; that
file is located in a subdirectory linux\. 
This is the case on Fedora and FreeBSD, so possibly also on many other
distributions.
Copying the jni_md.h up fixed it, or
--with-jdk="/<path>/jdk<version>/include
-I/<path>/jdk<version>/include/linux".
Setting JAVA_INCLUDE to
    "/usr/java/path/include /usr/java/path/include/linux"
would probably also work.

Cheers
 
Hugo De Vries


-----Original Message-----
From: Eddie Epstein [mailto:eaepstein@gmail.com] 
Sent: Thursday, 26 June 2008 10:23 PM
To: uima-user@incubator.apache.org
Subject: Re: Building UIMA C++ on Linux

>
> Now it says cannot find JDK headers.
>
> Our JDK location is /usr/java/jdkxxx so now try
>
> configure --with-apr=/usr/local/apr --with-jdk=/usr/java/jdkxxx
>
> but configure script still says cannot find JDK headers.
>
>
--with-jdk is slightly confusing. The readme talks about JAVA_INCLUDE
pointing at the directory containing the header files. This was done
because on Mac OSX the Java headers are not found in $JRE/include.

Eddie

IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914.  If you have received this email in error, you are requested to contact the sender and delete the email.



Re: Building UIMA C++ on Linux

Posted by Eddie Epstein <ea...@gmail.com>.
>
> Now it says cannot find JDK headers.
>
> Our JDK location is /usr/java/jdkxxx so now try
>
> configure --with-apr=/usr/local/apr --with-jdk=/usr/java/jdkxxx
>
> but configure script still says cannot find JDK headers.
>
>
--with-jdk is slightly confusing. The readme talks about JAVA_INCLUDE
pointing at the directory containing the header files. This was done because
on Mac OSX the Java headers are not found in $JRE/include.

Eddie

RE: Building UIMA C++ on Linux

Posted by "Johansson, Justin (Contractor)" <Ju...@dsto.defence.gov.au>.
Thanks for fast reply Eddie.

Unfortunately the info you offered didn't get me any further.

My /usr/local is writable so I had no problems installing APR there.
After make-ing APR, I did "make install" and checked existence
/usr/local/apr okay.

I discovered that configure script in uimacpp/src needed

configure --with-apr=/usr/local/apr

and that got us past the APR check okay.

Now it says cannot find JDK headers.

Our JDK location is /usr/java/jdkxxx so now try

configure --with-apr=/usr/local/apr --with-jdk=/usr/java/jdkxxx

but configure script still says cannot find JDK headers.

Okay we are a little bit further but now stuck on this.

Thanks for your help,

Justin Johansson

IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914.  If you have received this email in error, you are requested to contact the sender and delete the email.



Re: UIMACPP runtime problem on Linux

Posted by Burn Lewis <bu...@gmail.com>.
To build a 32-bit annotator on a 64-bit OS you can uncomment the FORCE_32
entry in base.mak.

But when building libuima.so the configure & automake steps should have
determined what your OS is and set the appropriate flags.  You could try
running file & ldd on the uima library and your annotator to check that
they're compatible and can find all their dependencies.

I think one of our test machines is 64-bit with a 32-bit OS.

Burn.

On Tue, Sep 2, 2008 at 10:51 PM, Johansson, Justin (Contractor) <
Justin.Johansson@dsto.defence.gov.au> wrote:

>
> Thanks for that Burn.  That put me on the right track.  Turns out that
> the libuima.so was a link to a non-existent target so technically
> speaking you were correct and libuima.so was not in the LD_LIBRARY_PATH.
>
> Having solved that one, the C++ annotator is now trying to load but we
> spit a different error message now about wrong ELFCLASS64 in respect of
> libuima.so.
>
> The box this is running on has an Athlon 64 bit processor but afaik the
> OS and installed software is all 32 bit.
>
> Sounds now like we need to explicitly build libuima.so as 32 bit.
> What/where is the configuration switch for that.
>
> Many thanks for your help.
>
> Justin Johansson
>
>
>
> -----Original Message-----
> From: Burn Lewis [mailto:burnlewis@gmail.com]
> Sent: Tuesday, 2 September 2008 21:47
> To: uima-user@incubator.apache.org
> Subject: Re: UIMACPP runtime problem on Linux
>
> Justin,
>
> I think this means that libuima.so is not in the LD_LIBRARY_PATH ... do
> you have $UIMACPP_HOME/lib there?
> If this is not the problem, have you been able to run the examples as
> described in the README?
>
> Burn.
>
> On Mon, Sep 1, 2008 at 3:02 AM, Johansson, Justin (Contractor) <
> Justin.Johansson@dsto.defence.gov.au> wrote:
>
> > Hi Eddie & others,
> >
> > I have previously run the UIMA CPE on Windows with a mix of Java and
> > C++ annotators with success.
> > Now having built same annotators for Linux, the UIMA CPE spits when
> > encountering the first C++ Annotator with message like:
> >
> > 'No uima on java.library.path'
> >
> > And a stack track indicating exceptions thrown by load (native)
> > library in java.
> >
> > I'm guessing this means uima cannot find libuima.so or such but that
> > is there in the same directory as the annotator .so
> >
> > Interestingly runAECpp MyCppAnnotatorDescriptor.xml works .. the
> > problem is just when trying to run the whole show.
> >
> > Seems like I must be missing something in the UIMA C++ setup for Unix
> > (Linux).
> >
> > Any ideas?
> >
> > Thanks in advance,
> >
> > Justin Johansson
> >
> >
> > IMPORTANT: This email remains the property of the Australian Defence
> > Organisation and is subject to the jurisdiction of section 70 of the
> > CRIMES ACT 1914.  If you have received this email in error, you are
> > requested to contact the sender and delete the email.
> >
> >
> >
>

RE: UIMACPP runtime problem on Linux

Posted by "Johansson, Justin (Contractor)" <Ju...@dsto.defence.gov.au>.
 
Thanks for that Burn.  That put me on the right track.  Turns out that
the libuima.so was a link to a non-existent target so technically
speaking you were correct and libuima.so was not in the LD_LIBRARY_PATH.

Having solved that one, the C++ annotator is now trying to load but we
spit a different error message now about wrong ELFCLASS64 in respect of
libuima.so.

The box this is running on has an Athlon 64 bit processor but afaik the
OS and installed software is all 32 bit.

Sounds now like we need to explicitly build libuima.so as 32 bit.
What/where is the configuration switch for that.

Many thanks for your help.

Justin Johansson



-----Original Message-----
From: Burn Lewis [mailto:burnlewis@gmail.com] 
Sent: Tuesday, 2 September 2008 21:47
To: uima-user@incubator.apache.org
Subject: Re: UIMACPP runtime problem on Linux

Justin,

I think this means that libuima.so is not in the LD_LIBRARY_PATH ... do
you have $UIMACPP_HOME/lib there?
If this is not the problem, have you been able to run the examples as
described in the README?

Burn.

On Mon, Sep 1, 2008 at 3:02 AM, Johansson, Justin (Contractor) <
Justin.Johansson@dsto.defence.gov.au> wrote:

> Hi Eddie & others,
>
> I have previously run the UIMA CPE on Windows with a mix of Java and 
> C++ annotators with success.
> Now having built same annotators for Linux, the UIMA CPE spits when 
> encountering the first C++ Annotator with message like:
>
> 'No uima on java.library.path'
>
> And a stack track indicating exceptions thrown by load (native) 
> library in java.
>
> I'm guessing this means uima cannot find libuima.so or such but that 
> is there in the same directory as the annotator .so
>
> Interestingly runAECpp MyCppAnnotatorDescriptor.xml works .. the 
> problem is just when trying to run the whole show.
>
> Seems like I must be missing something in the UIMA C++ setup for Unix 
> (Linux).
>
> Any ideas?
>
> Thanks in advance,
>
> Justin Johansson
>
>
> IMPORTANT: This email remains the property of the Australian Defence 
> Organisation and is subject to the jurisdiction of section 70 of the 
> CRIMES ACT 1914.  If you have received this email in error, you are 
> requested to contact the sender and delete the email.
>
>
>

Re: UIMACPP runtime problem on Linux

Posted by Burn Lewis <bu...@gmail.com>.
Justin,

I think this means that libuima.so is not in the LD_LIBRARY_PATH ... do you
have $UIMACPP_HOME/lib there?
If this is not the problem, have you been able to run the examples as
described in the README?

Burn.

On Mon, Sep 1, 2008 at 3:02 AM, Johansson, Justin (Contractor) <
Justin.Johansson@dsto.defence.gov.au> wrote:

> Hi Eddie & others,
>
> I have previously run the UIMA CPE on Windows with a mix of Java and C++
> annotators with success.
> Now having built same annotators for Linux, the UIMA CPE spits when
> encountering the first C++
> Annotator with message like:
>
> 'No uima on java.library.path'
>
> And a stack track indicating exceptions thrown by load (native) library
> in java.
>
> I'm guessing this means uima cannot find libuima.so or such but that is
> there in the same directory as the annotator .so
>
> Interestingly runAECpp MyCppAnnotatorDescriptor.xml works .. the problem
> is just when trying to run the whole show.
>
> Seems like I must be missing something in the UIMA C++ setup for Unix
> (Linux).
>
> Any ideas?
>
> Thanks in advance,
>
> Justin Johansson
>
>
> IMPORTANT: This email remains the property of the Australian Defence
> Organisation and is subject to the jurisdiction of section 70 of the CRIMES
> ACT 1914.  If you have received this email in error, you are requested to
> contact the sender and delete the email.
>
>
>

UIMACPP runtime problem on Linux

Posted by "Johansson, Justin (Contractor)" <Ju...@dsto.defence.gov.au>.
Hi Eddie & others,

I have previously run the UIMA CPE on Windows with a mix of Java and C++
annotators with success.
Now having built same annotators for Linux, the UIMA CPE spits when
encountering the first C++
Annotator with message like:

'No uima on java.library.path'

And a stack track indicating exceptions thrown by load (native) library
in java.

I'm guessing this means uima cannot find libuima.so or such but that is
there in the same directory as the annotator .so

Interestingly runAECpp MyCppAnnotatorDescriptor.xml works .. the problem
is just when trying to run the whole show.

Seems like I must be missing something in the UIMA C++ setup for Unix
(Linux).

Any ideas?

Thanks in advance,

Justin Johansson


IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914.  If you have received this email in error, you are requested to contact the sender and delete the email.