[ome-users] C++ bindings : ticket #9705
Guy Blanchard
gb288 at cam.ac.uk
Wed Oct 24 09:46:06 BST 2012
Hi Josh,
I see that ticket #9705 is now closed, but I'm still getting the same error (pasted below) involving boost when trying to compile the bioformats C++ libraries, having followed the instructions for Mac on your website.
I'm using Mac OS 10.8.2 - not sure if this is the difference that is causing the problem.
Should I be doing anything differently now that ticket 9705 has been closed, for example all the port and maven commands are the same as on your website?
I synchronised git but how might I check that I have the new patched version?
I am very keen to use the C++ bindings to manage my image/movie input to a Cocoa application.
Thanks for your help
Guy
.......
[ 5%] Building CXX object CMakeFiles/jace.dir/jace/source/jace/StaticVmLoader.cpp.o
In file included from /Documents/bioformats/components/scifio/target/cppwrap/jace/source/jace/StaticVmLoader.cpp:2:
/Documents/bioformats/components/scifio/target/cppwrap/jace/include/jace/StaticVmLoader.h:57:14: warning: 'JNI_GetCreatedJavaVMs'
is deprecated [-Wdeprecated-declarations]
return JNI_GetCreatedJavaVMs( vmBuf, bufLen, nVMs );
^
/Documents/bioformats/components/scifio/target/cppwrap/jace/include/jace/StaticVmLoader.h:68:14: warning: 'JNI_CreateJavaVM' is
deprecated [-Wdeprecated-declarations]
return JNI_CreateJavaVM( pvm, env, args );
^
2 warnings generated.
[ 5%] Building CXX object CMakeFiles/jace.dir/jace/source/jace/UnixVmLoader.cpp.o
[ 5%] Building CXX object CMakeFiles/jace.dir/jace/source/jace/VmLoader.cpp.o
[ 5%] Building CXX object CMakeFiles/jace.dir/jace/source/jace/Win32VmLoader.cpp.o
[ 5%] Building CXX object CMakeFiles/jace.dir/jace/source/jace/WrapperVmLoader.cpp.o
Linking CXX shared library libjace.jnilib
Undefined symbols for architecture x86_64:
"boost::system::system_category()", referenced from:
___cxx_global_var_init3 in JArray.cpp.o
boost::thread_exception::thread_exception(int, char const*) in JArray.cpp.o
___cxx_global_var_init3 in JClassImpl.cpp.o
boost::thread_exception::thread_exception(int, char const*) in JClassImpl.cpp.o
___cxx_global_var_init3 in JNIHelper.cpp.o
boost::thread_exception::thread_exception(int, char const*) in JNIHelper.cpp.o
___cxx_global_var_init3 in JObject.cpp.o
...
"boost::system::generic_category()", referenced from:
___cxx_global_var_init1 in JArray.cpp.o
___cxx_global_var_init2 in JArray.cpp.o
___cxx_global_var_init1 in JClassImpl.cpp.o
___cxx_global_var_init2 in JClassImpl.cpp.o
___cxx_global_var_init1 in JNIHelper.cpp.o
___cxx_global_var_init2 in JNIHelper.cpp.o
___cxx_global_var_init1 in JObject.cpp.o
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libjace.jnilib] Error 1
make[1]: *** [CMakeFiles/jace.dir/all] Error 2
make: *** [all] Error 2
On 2 Oct 2012, at 08:43, Josh Moore <josh at glencoesoftware.com> wrote:
>
> On Oct 1, 2012, at 10:38 PM, Guy Blanchard wrote:
>
>> Hi,
>
> Hi Guy,
>
>> I've been trying to compile the C++ bindings, following your instructions on https://github.com/openmicroscopy/bioformats/blob/develop/components/scifio/cppwrap/readme.txt
>> and on the MacOS related page.
>
> I reproduced the same (or a very similar) error on Mac OSX 10.6 installing cmake and boost from Homebrew. By upping the cppwrap version number:
>
> $ git diff
> diff --git a/components/scifio/pom.xml b/components/scifio/pom.xml
> index 7f0ca3d..2e3c8a5 100644
> --- a/components/scifio/pom.xml
> +++ b/components/scifio/pom.xml
> @@ -104,7 +104,7 @@
> <plugin>
> <groupId>loci.maven.plugins</groupId>
> <artifactId>cppwrap-maven-plugin</artifactId>
> - <version>1.1.0</version>
> + <version>1.1.2-SNAPSHOT</version>
> <configuration>
> <headerFile>cppwrap/header.txt</headerFile>
> <conflictsFile>cppwrap/conflicts.txt</conflictsFile>
>
> I was able to continue compiling. I've filed a ticket to have this or a similar change applied to the develop branch (https://trac.openmicroscopy.org.uk/ome/ticket/9705)
>
> Cheers,
> ~Josh
>
>> I understand from some web discussions that it could be that gcc is being used instead of g++ but the cmake that you generate with your commands seems to know both these compilers and I don't know enough to chase down the error further.
>> Wondered if you'd been asked this before or have an obvious solution.
>>
>> I'm on Mac OS 10.7.4 (Lion) with x86_64 architecture:
>> Typing 'uname -a' gives:
>> Darwin mallis.home 11.4.0 Darwin Kernel Version 11.4.0: Mon Apr 9 19:32:15 PDT 2012; root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64
>>
>> Thanks for your help,
>> Guy
>>
>>
>> ====================
>> Dr Guy Blanchard
>> Dept Physiology, Development and Neuroscience
>> Downing Site
>> Cambridge CB2 3DY
>>
>> email: gb288 at cam.ac.uk
>> m: 07930 988145
>>
>
More information about the ome-users
mailing list