uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David García <david.garc...@barcelonamedia.org>
Subject Re: [UIMA C++ Framework] making examples
Date Thu, 05 Aug 2010 10:48:07 GMT
  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