PiRSquared17 / alembic

Automatically exported from code.google.com/p/alembic
Other
0 stars 0 forks source link

Building as a shared lib fail on OSX #231

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
User reports seeing:

Linking CXX shared library libAlembicAbcCoreAbstract.dylib
cd 
/Users/simon/work/thirdparty/Alembic/alembic_build/lib/Alembic/AbcCoreAbstract 
&& "/Applications/CMake 2.8-5.app/Contents/bin/cmake" -E cmake_link_script 
CMakeFiles/AlembicAbcCoreAbstract.dir/link.txt --verbose=1
/usr/bin/c++  -O3 -DNDEBUG -dynamiclib -Wl,-headerpad_max_install_names   -o 
libAlembicAbcCoreAbstract.dylib -install_name 
/Users/simon/work/thirdparty/Alembic/alembic_build/lib/Alembic/AbcCoreAbstract/l
ibAlembicAbcCoreAbstract.dylib 
CMakeFiles/AlembicAbcCoreAbstract.dir/Foundation.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/TimeSampling.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/TimeSamplingType.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/ArraySample.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/ReadArraySampleCache.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/ScalarSample.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/BasePropertyWriter.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/ScalarPropertyWriter.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/ArrayPropertyWriter.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/CompoundPropertyWriter.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/ObjectWriter.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/ArchiveWriter.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/BasePropertyReader.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/ScalarPropertyReader.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/ArrayPropertyReader.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/CompoundPropertyReader.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/ObjectReader.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/ArchiveReader.cpp.o 
Undefined symbols:
  "half::_toFloat", referenced from:
      Alembic::AbcCoreAbstract::v1::TypedScalarSampleData<half>::equalEpsilon(void const*, double) constin ScalarSample.cpp.o
      Alembic::AbcCoreAbstract::v1::TypedScalarSampleData<half>::equalTo(void const*) constin ScalarSample.cpp.o
      Alembic::AbcCoreAbstract::v1::TypedScalarSampleData<half>::lessThan(void const*) constin ScalarSample.cpp.o
  "Alembic::Util::v1::MurmurHash3_x64_128(void const*, unsigned long, unsigned long, void*)", referenced from:
      Alembic::AbcCoreAbstract::v1::ArraySample::getKey() constin ArraySample.cpp.o
      Alembic::AbcCoreAbstract::v1::ArraySample::getKey() constin ArraySample.cpp.o
      Alembic::AbcCoreAbstract::v1::ArraySample::getKey() constin ArraySample.cpp.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [lib/Alembic/AbcCoreAbstract/libAlembicAbcCoreAbstract.dylib] 
Error 1
make[1]: *** 
[lib/Alembic/AbcCoreAbstract/CMakeFiles/AlembicAbcCoreAbstract.dir/all] Error 2
make: *** [all] Error 2

Original issue reported on code.google.com by miller.lucas on 14 Sep 2011 at 4:27

GoogleCodeExporter commented 9 years ago

Original comment by miller.lucas on 6 Oct 2011 at 1:33

GoogleCodeExporter commented 9 years ago

Original comment by miller.lucas on 15 Oct 2011 at 12:25

GoogleCodeExporter commented 9 years ago
I get a corresponding message:

Linking CXX shared library libAlembicAbcCoreAbstract.dylib
cd /Users/jens/Downloads/Alembic_1.1.5_2013041100/lib/Alembic/AbcCoreAbstract 
&& /usr/local/Cellar/cmake/2.8.11.1/bin/cmake -E cmake_link_script 
CMakeFiles/AlembicAbcCoreAbstract.dir/link.txt --verbose=1
/usr/bin/c++   -dynamiclib -Wl,-headerpad_max_install_names   -o 
libAlembicAbcCoreAbstract.dylib -install_name 
/Users/jens/Downloads/Alembic_1.1.5_2013041100/lib/Alembic/AbcCoreAbstract/libAl
embicAbcCoreAbstract.dylib 
CMakeFiles/AlembicAbcCoreAbstract.dir/Foundation.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/TimeSampling.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/TimeSamplingType.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/ArraySample.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/ReadArraySampleCache.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/ScalarSample.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/BasePropertyWriter.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/ScalarPropertyWriter.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/ArrayPropertyWriter.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/CompoundPropertyWriter.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/ObjectWriter.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/ArchiveWriter.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/BasePropertyReader.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/ScalarPropertyReader.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/ArrayPropertyReader.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/CompoundPropertyReader.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/ObjectReader.cpp.o 
CMakeFiles/AlembicAbcCoreAbstract.dir/ArchiveReader.cpp.o 
Undefined symbols for architecture x86_64:
  "half::_eLut", referenced from:
      half::half(float) in ScalarSample.cpp.o
  "half::convert(int)", referenced from:
      half::half(float) in ScalarSample.cpp.o
  "half::_toFloat", referenced from:
      half::operator float() const in ScalarSample.cpp.o
  "Alembic::Util::v5::MurmurHash3_x64_128(void const*, unsigned long, unsigned long, void*)", referenced from:
      Alembic::AbcCoreAbstract::v5::ArraySample::getKey() const in ArraySample.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]: *** [lib/Alembic/AbcCoreAbstract/libAlembicAbcCoreAbstract.dylib] 
Error 1
make[1]: *** 
[lib/Alembic/AbcCoreAbstract/CMakeFiles/AlembicAbcCoreAbstract.dir/all] Error 2
make: *** [all] Error 2

Original comment by cornelis.jens@gmail.com on 15 Jul 2013 at 2:12

GoogleCodeExporter commented 9 years ago
The half stuff comes from ILMBase, is that library being incorrectly linked in?

Original comment by miller.lucas on 15 Jul 2013 at 5:30

GoogleCodeExporter commented 9 years ago

Original comment by miller.lucas on 13 Sep 2013 at 6:18

GoogleCodeExporter commented 9 years ago

Original comment by miller.lucas on 11 Dec 2013 at 12:40

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I was able to solve this by linking not just to Alembic, but also to 
libHalf.dylib (from ilmbase).
I also had to include the ilmbase include path directly to solve a problem I 
had with the Alembic headers.

Original comment by marcel.r...@googlemail.com on 16 Dec 2013 at 9:47