Re: static library linking issues


Jeremy Selan <jeremy...@...>
 

Ugh!

Sorry to hear you've having trouble with static linking.

Can you post the shell command you're using to build OCIO with?

(At SPI we happen to only use OCIO in a dynamically linked context so we havent run into this error yet).

In the latest OCIO release (1.0.7) we bumped the internal yaml-cpp dependency to 0.3.0. I presume you're building 1.0.7?

A few ideas to test:
- Can you confirm that you're using a clean build?  It's possible that if you have old .o files lying around-  built against a prior OCIO - it could cause weirdness.

- Is it possible that another part of your codebase is statically linking against a different OCIO version? (If you have another part of the code statically links to 0.2.X yaml-cpp, I could imagine a yaml-cpp symbol clash)

-- Jeremy


On Tue, May 1, 2012 at 11:35 AM, Piotr Stanczyk <piotr.s...@...> wrote:
Hi All,


So far I've been using the .so's to link against. However, I've run
into an issue with building a binary that links against the static
libs with a sleuth of errors (see below).
I don't think I did anything unusual in the building of this. I'll
start digging into what could be causing this, but if anyone has any
pointers that would be most welcome.

Cheers

Piotr




/var/tmp-ssd/doNotRemove/builds/zeno3_ssd/RHEL5_AMD64_OPT/lib/libOpenColorIO.a(Config.cpp.o):
In function `OpenColorIO::v1::Config::serialize(std::basic_ostrea
m<char, std::char_traits<char> >&) const':
/home/ewimmer/ewimmer_importlibs/importlibs/src/OpenColorIO/imageworks-OpenColorIO-a16d9ac/src/core/Config.cpp:1591:
undefined reference to `YAML::Emitter::Emi
tter()'
/var/tmp-ssd/doNotRemove/builds/zeno3_ssd/RHEL5_AMD64_OPT/lib/libOpenColorIO.a(Config.cpp.o):
In function `operator<<':
/home/ewimmer/ewimmer_importlibs/importlibs/src/OpenColorIO/imageworks-OpenColorIO-a16d9ac/build/ext/dist/include/yaml-cpp/emitter.h:152:
undefined reference t
o `YAML::Emitter::SetLocalValue(YAML::EMITTER_MANIP)'
/var/tmp-ssd/doNotRemove/builds/zeno3_ssd/RHEL5_AMD64_OPT/lib/libOpenColorIO.a(Config.cpp.o):
In function `operator<<':
/home/ewimmer/ewimmer_importlibs/importlibs/src/OpenColorIO/imageworks-OpenColorIO-a16d9ac/src/core/Config.cpp:1594:
undefined reference to `YAML::Emitter::Set
LocalValue(YAML::EMITTER_MANIP)'
/home/ewimmer/ewimmer_importlibs/importlibs/src/OpenColorIO/imageworks-OpenColorIO-a16d9ac/src/core/Config.cpp:1594:
undefined reference to `YAML::Emitter::Set
LocalValue(YAML::EMITTER_MANIP)'
/var/tmp-ssd/doNotRemove/builds/zeno3_ssd/RHEL5_AMD64_OPT/lib/libOpenColorIO.a(Config.cpp.o):
In function `operator<<':
/home/ewimmer/ewimmer_importlibs/importlibs/src/OpenColorIO/imageworks-OpenColorIO-a16d9ac/build/ext/dist/include/yaml-cpp/emitter.h:152:
undefined reference t
o `YAML::Emitter::SetLocalValue(YAML::EMITTER_MANIP)'
/var/tmp-ssd/doNotRemove/builds/zeno3_ssd/RHEL5_AMD64_OPT/lib/libOpenColorIO.a(Config.cpp.o):
In function `WriteIntegralType<int>':
/home/ewimmer/ewimmer_importlibs/importlibs/src/OpenColorIO/imageworks-OpenColorIO-a16d9ac/build/ext/dist/include/yaml-cpp/emitter.h:104:
undefined reference t
o `YAML::Emitter::good() const'
/home/ewimmer/ewimmer_importlibs/importlibs/src/OpenColorIO/imageworks-OpenColorIO-a16d9ac/build/ext/dist/include/yaml-cpp/emitter.h:108:
undefined reference t
o `YAML::Emitter::PreWriteIntegralType(std::basic_stringstream<char,
std::char_traits<char>, std::allocator<char> >&)'
/home/ewimmer/ewimmer_importlibs/importlibs/src/OpenColorIO/imageworks-OpenColorIO-a16d9ac/build/ext/dist/include/yaml-cpp/emitter.h:110:
undefined reference t
o `YAML::Emitter::PostWriteIntegralType(std::basic_stringstream<char,
std::char_traits<char>, std::allocator<char> > const&)'
/var/tmp-ssd/doNotRemove/builds/zeno3_ssd/RHEL5_AMD64_OPT/lib/libOpenColorIO.a(Config.cpp.o):
In function `operator<<':
/home/ewimmer/ewimmer_importlibs/importlibs/src/OpenColorIO/imageworks-OpenColorIO-a16d9ac/build/ext/dist/include/yaml-cpp/emitter.h:152:
undefined reference t
o `YAML::Emitter::SetLocalValue(YAML::EMITTER_MANIP)'
/home/ewimmer/ewimmer_importlibs/importlibs/src/OpenColorIO/ima
....

Join ocio-dev@lists.aswf.io to automatically receive all group messages.