Compilation issue ( v1.1.1 )


Gonzalo Garramuño
 

After installing OpenColorIO v2.0 without any problems, I am now trying to revert the change to OCIO v1.1.1.

However, on the linking phase of the utilities, I get a bunch of YAML missing reference symbols, like:

../../core/libOpenColorIO.so.1.1.1: reference to `YAML::Emitter::PostWriteStreamable(std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> > const&)' undefined

I am at a loss what to try next, as I made sure no other YAML library is present and the linking line seems fine:

/usr/bin/g++-4.8   -Wall -Wextra -Wshadow -Wconversion -Wcast-qual -Wformat=2 -msse2 -O3 -DNDEBUG  -rdynamic CMakeFiles/ociocheck.dir/main.cpp.o CMakeFiles/ociocheck.dir/__/share/argparse.cpp.o CMakeFiles/ociocheck.dir/__/share/pystring.cpp.o CMakeFiles/ociocheck.dir/__/share/strutil.cpp.o  -o ociocheck -Wl,-rpath,/home/gga/code/applications/mrv/dependencies/OpenColorIO-1.1.1/build-linux-3/src/core: ../../core/libOpenColorIO.so.1.1.1 ../../../ext/dist/lib/libtinyxml.a ../../../ext/dist/lib/libyaml-cpp.a


Gonzalo Garramuño
 

El 2/9/20 a las 18:37, Gonzalo Garramuño via lists.aswf.io escribió:
After installing OpenColorIO v2.0 without any problems, I am now trying to revert the change to OCIO v1.1.1.

However, on the linking phase of the utilities, I get a bunch of YAML missing reference symbols, like:

../../core/libOpenColorIO.so.1.1.1: reference to `YAML::Emitter::PostWriteStreamable(std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> > const&)' undefined

I am at a loss what to try next, as I made sure no other YAML library is present and the linking line seems fine:
Okay, I found out what is wrong.  The YAML library is getting compiled with std::cxx11 strings and libOpenColorIO is not. However I don't yet know how to force either of one to compile in the same abi as the other.   I've so far tried:

export CXXFLAGS=-std=cxx11
export LDFLAGS=-std=cxx++11

export CXXFLAGS=-std=gnu++11
export LDFLAGS=-std=gnu++11

export CXXFLAGS=-D_GLIBCXX_USE_CXX11_ABI=1

all with no success.


Michael Dolan
 

OCIO 1.1.1 does not support C++ 11. The RB-1.1 branch _can_ compile with C++ 11, but it is not officially supported. It was mostly updated to support linking against OIIO 2. OCIO 1.1.1 ships with a supported version of yaml-cpp, which should be built and linked automatically unless you're passing the  USE_EXTERNAL_YAML CMake option, but you will need to use the C++ 98. OCIO v2 supports C++ 11 and 14.


On Thu, Sep 3, 2020 at 3:58 PM Gonzalo Garramuño <ggarra13@...> wrote:

El 2/9/20 a las 18:37, Gonzalo Garramuño via lists.aswf.io escribió:
> After installing OpenColorIO v2.0 without any problems, I am now
> trying to revert the change to OCIO v1.1.1.
>
> However, on the linking phase of the utilities, I get a bunch of YAML
> missing reference symbols, like:
>
> ../../core/libOpenColorIO.so.1.1.1: reference to
> `YAML::Emitter::PostWriteStreamable(std::basic_stringstream<char,
> std::char_traits<char>, std::allocator<char> > const&)' undefined
>
> I am at a loss what to try next, as I made sure no other YAML library
> is present and the linking line seems fine:
>
Okay, I found out what is wrong.  The YAML library is getting compiled
with std::cxx11 strings and libOpenColorIO is not. However I don't yet
know how to force either of one to compile in the same abi as the
other.   I've so far tried:

export CXXFLAGS=-std=cxx11
export LDFLAGS=-std=cxx++11

export CXXFLAGS=-std=gnu++11
export LDFLAGS=-std=gnu++11

export CXXFLAGS=-D_GLIBCXX_USE_CXX11_ABI=1

all with no success.