uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eddie Epstein <eaepst...@gmail.com>
Subject Re: [UIMA C++ Framework] making examples
Date Tue, 10 Aug 2010 11:51:26 GMT
Hi David,

The LD_LIBRARY_PATH should only include directories, not specific
files. Try removing DeSR.so from the path.

Eddie


On Tue, Aug 10, 2010 at 5:37 AM, David García
<david.garcian@barcelonamedia.org> wrote:
>  Hi,
>
> testing the C++ UIMA annotator I implemented in a UIMA pipeline with other
> Java UIMA components, I got following error, caused by a
> ResourceInitializationException:
>
>
> Caused by: org.apache.uima.uimacpp.UimacppException: null;
>        org.apache.uima.uimacpp.InternalTafException:
> Error number  : 2001
> Recoverable   : No
> Error         : Error loading annotator 'DeSR'.
> '/usr/local/share/uima/pipelines/DeSR/installed_pears/DeSR/DeSR.so:
> undefined symbol: _ZTVN4Tanl14MorphExtractorE'
>   While      : Error loading annotator '???'. '???'
>  (2001)
>        at
> org.apache.uima.uimacpp.UimacppEngine.throwJTafException(UimacppEngine.java:499)
>        at
> org.apache.uima.uimacpp.UimacppEngine.initialize(UimacppEngine.java:262)
>        at
> org.apache.uima.uimacpp.UimacppEngine.createJTafTAE(UimacppEngine.java:226)
>        at
> org.apache.uima.uimacpp.UimacppAnalysisComponent.initialize(UimacppAnalysisComponent.java:152)
>
>
> I have setted all the environment variables required by UIMA SDK:
>
> export UIMACPP_HOME=/home/d/uimacpp/uimacpp
> export PATH=$PATH:$UIMACPP_HOME/bin
> export LD_LIBRARY_PATH=$UIMACPP_HOME/lib
> export
> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/share/uima/pipelines/DeSR/installed_pears/DeSR/DeSR.so
>
>
> It seems the UIMA pipeline can't load the C++ component. Am I doing anything
> wrong?
>
>
> Regards,
> David
>
> El 06/08/2010 13:24, Eddie Epstein escribió:
>>
>> Hi David,
>>
>> A C++ annotator is intended to be fully interoperable with those
>> written in Java. That is, it can access feature structures found in
>> the CAS and create new FS in the CAS. The type system of the CAS is
>> the superset of types defined by all annotators, including any C++
>> components.
>>
>> So yes, you can use eclipse and integrate both java and c++ components.
>>
>> Regards,
>> Eddie
>>
>> On Fri, Aug 6, 2010 at 3:35 AM, David García
>> <david.garcian@barcelonamedia.org>  wrote:
>>>
>>>  Hi Eddie,
>>>
>>> this C++ UIMA annotator needs previous Java UIMA annotators annotations,
>>> as
>>> this C++ UIMA annotator needs them to work with.
>>> But this types are implemented by means of Java classes, as these
>>> previous
>>> UIMA annotators are implemented in Java.
>>> So my question is whether once I have developed this C++ UIMA annotator,
>>> generated the dynamic library, and composed the pipeline will work.
>>>
>>> Moreover, this C++ UIMA annotator has its own type, which should be
>>> implemented, and I neither know if this implementation could be done in
>>> Java
>>> or should be in C++.
>>>
>>> My idea is to develop the annotator in C++, and afterwards, generate its
>>> own
>>> type automatically from its descriptor in an Eclipse UIMA Java project.
>>> Is
>>> this correct?
>>>
>>>
>>> David
>>>
>>> El 05/08/2010 14:40, Eddie Epstein escribió:
>>>>
>>>> Hi David,
>>>>
>>>> Capabilities for any annotator should only declare the input types
>>>> needed by that annotator and the output types generated by that
>>>> annotator. Why would you need types from other annotators?
>>>>
>>>> Eddie
>>>>
>>>> On Thu, Aug 5, 2010 at 6:48 AM, David García
>>>> <david.garcian@barcelonamedia.org>    wrote:
>>>>>
>>>>>  Hi,
>>>>>
>>>>> I have a doubt regarding UIMA C++ annotator.
>>>>> I'm developing a C++ annotator to be combined within a UIMA pipeline
>>>>> with
>>>>> other Java annotators. The point is this C++ annotator requires, as
>>>>> input
>>>>> capabilities, another Java annotator annotations.
>>>>> My question is whether it is necessary to translate to C++ the input
>>>>> capability types defined in Java by the ohter Java annotators, as well
>>>>> as
>>>>> the C++ annotator types.
>>>>>
>>>>> My idea is to develop the C++ annotator, generating the dynamic
>>>>> library,
>>>>> and
>>>>> afterwards, create an Eclipse UIMA project by using the proper
>>>>> descriptor
>>>>> for the C++ UIMA annotator. Then, in this UIMA project, include the
>>>>> Java
>>>>> types required for the C++ UIMA annotator as well as its own types.
>>>>>
>>>>> Am I wrong, or would it be correct?
>>>>>
>>>>>
>>>>> David
>>>>>
>>>>> El 22/07/2010 10:02, David García escribió:
>>>>>>
>>>>>>   It was version problem. Now it works.
>>>>>>
>>>>>> Thank you Eddie.
>>>>>>
>>>>>>
>>>>>> David
>>>>>>
>>>>>> El 21/07/2010 20:34, Eddie Epstein escribió:
>>>>>>>
>>>>>>> Probably a mismatch between 32 and 64-bit versions.
>>>>>>>
>>>>>>> To confirm, use the "file" command on DaveDetector.o and on
>>>>>>> uimacpp/lib/libuima.so
>>>>>>>
>>>>>>> UIMACPP binary packages come in both flavors for Linux, so if
this is
>>>>>>> the problem, get the other one.
>>>>>>>
>>>>>>> One other solution if your OS is 64-bit and the uimacpp package
is
>>>>>>> 32-bit: modify uimacpp/lib/base.mak to force all compiles to
be
>>>>>>> 32-bit.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Eddie
>>>>>>>
>>>>>>> On Wed, Jul 21, 2010 at 4:00 AM, David García
>>>>>>> <david.garcian@barcelonamedia.org>       wrote:
>>>>>>>>
>>>>>>>>   Thanks for your answer Eddie. You are right, the include
>>>>>>>> of<memory>
>>>>>>>> must
>>>>>>>> be setted before "uima/api.hpp" include.
>>>>>>>>
>>>>>>>> Now when I make the DaveDetector example ( make -f DaveDetector.mak
>>>>>>>> )
>>>>>>>> I
>>>>>>>> get
>>>>>>>> following error message:
>>>>>>>>
>>>>>>>>
>>>>>>>> /usr/bin/ld: skipping incompatible
>>>>>>>> /home/david.garcian/uimacpp/uimacpp/lib/libuima.so when searching
>>>>>>>> for
>>>>>>>> -luima
>>>>>>>> /usr/bin/ld: cannot find -luima
>>>>>>>> collect2: ld returned 1 exit status
>>>>>>>> make: *** [DaveDetector.so] Error 1
>>>>>>>>
>>>>>>>>
>>>>>>>> It says libuima.so is icompatible. Does it have anything
to do with
>>>>>>>> the
>>>>>>>> version of Linux or gcc?
>>>>>>>>
>>>>>>>>
>>>>>>>> David
>>>>>>>>
>>>>>>>> El 19/07/2010 15:13, Eddie Epstein escribió:
>>>>>>>>>
>>>>>>>>> If you add the include to DaveDetector.cpp, it must be
before
>>>>>>>>> the include of uima/api.hpp. A better way to go would
be to
>>>>>>>>> put the include of<memory>         into
>>>>>>>>> lowlevel_internal_indexes.hpp
>>>>>>>>>
>>>>>>>>> Eddie
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Mon, Jul 19, 2010 at 3:01 AM, David García
>>>>>>>>> <david.garcian@barcelonamedia.org>        
wrote:
>>>>>>>>>>
>>>>>>>>>>   Hi Eddie,
>>>>>>>>>>
>>>>>>>>>> I have tried adding "#include<memory>", but
I've got the same
>>>>>>>>>> error
>>>>>>>>>> message.
>>>>>>>>>>
>>>>>>>>>> I've also tried using gcc version 4.3.4 and I've
also got the same
>>>>>>>>>> error.
>>>>>>>>>>
>>>>>>>>>> Regards,
>>>>>>>>>> David
>>>>>>>>>>
>>>>>>>>>> El 16/07/2010 19:44, Eddie Epstein escribió:
>>>>>>>>>>>
>>>>>>>>>>> Hi David,
>>>>>>>>>>>
>>>>>>>>>>> More recent versions of g++ are always getting
stricter.
>>>>>>>>>>> Try adding
>>>>>>>>>>> #include<memory>
>>>>>>>>>>> to DaveDetector.cpp.
>>>>>>>>>>>
>>>>>>>>>>> A goal for uimacpp annotators is that they be
portable, meaning
>>>>>>>>>>> that
>>>>>>>>>>> the annotator code and any non-standard dependencies
could be
>>>>>>>>>>> packaged
>>>>>>>>>>> together, and installed anyplace on a target
system.
>>>>>>>>>>> LD_LIBRARY_PATH
>>>>>>>>>>> is very useful for this.
>>>>>>>>>>>
>>>>>>>>>>> The alternative is to install uimacpp and it's
dependencies in
>>>>>>>>>>> some
>>>>>>>>>>> standard system directory, but this would require
root access.
>>>>>>>>>>>
>>>>>>>>>>> Regards,
>>>>>>>>>>> Eddie
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Jul 15, 2010 at 8:04 AM, David García
>>>>>>>>>>> <david.garcian@barcelonamedia.org>    
      wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>   Hi all,
>>>>>>>>>>>>
>>>>>>>>>>>> I am trying to use uimacpp, Linux version,
but I have got
>>>>>>>>>>>> problems
>>>>>>>>>>>> making
>>>>>>>>>>>> C++ examples.
>>>>>>>>>>>> I follow README instructions, and when I
do:
>>>>>>>>>>>>
>>>>>>>>>>>> make -f DaveDetector.mak
>>>>>>>>>>>>
>>>>>>>>>>>> I get following error:
>>>>>>>>>>>>
>>>>>>>>>>>> /uimacpp/include/uima/lowlevel_internal_indexes.hpp:
In member
>>>>>>>>>>>> function
>>>>>>>>>>>> ‘virtual void
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> uima::lowlevel::internal::CachedCompositeIndex<T>::clearAndFillCache()’:
>>>>>>>>>>>> /uimacpp/include/uima/lowlevel_internal_indexes.hpp:348:
error:
>>>>>>>>>>>> ‘auto_ptr’
>>>>>>>>>>>> was not declared in this scope
>>>>>>>>>>>> /uimacpp/include/uima/lowlevel_internal_indexes.hpp:348:
error:
>>>>>>>>>>>> expected
>>>>>>>>>>>> primary-expression before ‘>’ token
>>>>>>>>>>>> /uimacpp/include/uima/lowlevel_internal_indexes.hpp:348:
error:
>>>>>>>>>>>> there
>>>>>>>>>>>> are
>>>>>>>>>>>> no
>>>>>>>>>>>> arguments to ‘apit’ that depend on a
template parameter, so a
>>>>>>>>>>>> declaration
>>>>>>>>>>>> of
>>>>>>>>>>>> ‘apit’ must be available
>>>>>>>>>>>> /uimacpp/include/uima/lowlevel_internal_indexes.hpp:348:
note:
>>>>>>>>>>>> (if
>>>>>>>>>>>> you
>>>>>>>>>>>> use
>>>>>>>>>>>> ‘-fpermissive’, G++ will accept your
code, but allowing the use
>>>>>>>>>>>> of
>>>>>>>>>>>> an
>>>>>>>>>>>> undeclared name is deprecated)
>>>>>>>>>>>> /uimacpp/include/uima/lowlevel_internal_indexes.hpp:349:
error:
>>>>>>>>>>>> ‘apit’
>>>>>>>>>>>> was
>>>>>>>>>>>> not declared in this scope
>>>>>>>>>>>> make: *** [DaveDetector.o] Error 1
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> I am using gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9).
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Am I doing something wrong?
>>>>>>>>>>>> I have also found that it is not a good practise
to use
>>>>>>>>>>>> LD_LIBRARY_PATH
>>>>>>>>>>>> env
>>>>>>>>>>>> variable. Is this correct?
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks in advanced,
>>>>>>>>>>>>
>>>>>>>>>>>> David
>>>>>>>>>>>>
>

Mime
View raw message