On Mon, Feb 15, 2021 at 09:48:59AM +, Stuart Henderson wrote:
> On 2021/02/15 03:03, Dimitri Karamazov wrote:
> > I get an undefined symbol error during the linking
> > process even though it is defined in libOpenImageIO.so.
> >
> > Don't know what to make of this. Any help will be
> > appreciated. The full build log is below the update diff.
>
> If you have the old version installed, remove it and try again
>
> > -SHARED_LIBS += OpenImageIO 8.0 # 2.2.10
> > -SHARED_LIBS += OpenImageIO_Util4.0 # 2.2.10
> > +#SHARED_LIBS +=OpenImageIO 9.0 # 2.2.11
> > +#SHARED_LIBS +=OpenImageIO_Util5.0 # 2.2.11
>
> Better to not comment those out during an update, especially in a cmake port
>
I tried both and the issue still persisted. Though removing the old libraries
does indeed solves the problem. I guess this order below is the cause of it but
I
don't quite know how to edit this in cmake. I tried setting CMAKE_LIBRARY_PATH
but it doesn't help.
-L/usr/local/lib -L/usr/ports/pobj/openimageio-2.2.11.1/build-amd64/lib
[208/244] : && /usr/ports/pobj/openimageio-2.2.11.1/bin/c++ -O2 -pipe -DNDEBUG
src/iconvert/CMakeFiles/iconvert.dir/iconvert.cpp.o -o bin/iconvert
-L/usr/local/lib -L/usr/ports/pobj/openimageio-2.2.11.1/build-amd64/lib
-L/usr/lib
-Wl,-z,origin,-rpath,/usr/local/lib:/usr/ports/pobj/openimageio-2.2.11.1/build-amd64/lib:
-lOpenImageIO -lIlmImf-2_5 /usr/lib/libz.so.5.0 -lImath-2_5 -lIexMath-2_5
-lHalf-2_5 -lIlmThread-2_5 -lIex-2_5 -lIlmImf-2_5 -lImath-2_5 -lIex-2_5
-lHalf-2_5 -lIlmThread-2_5 -lz -lImath-2_5 -lIex-2_5 -lHalf-2_5
-lIlmThread-2_5 -lz -lpthread -Wl,-rpath-link,/usr/X11R6/lib:/usr/local/lib
&& :
FAILED: bin/iconvert
: && /usr/ports/pobj/openimageio-2.2.11.1/bin/c++ -O2 -pipe -DNDEBUG
src/iconvert/CMakeFiles/iconvert.dir/iconvert.cpp.o -o bin/iconvert
-L/usr/local/lib -L/usr/ports/pobj/openimageio-2.2.11.1/build-amd64/lib
-L/usr/lib
-Wl,-z,origin,-rpath,/usr/local/lib:/usr/ports/pobj/openimageio-2.2.11.1/build-amd64/lib:
-lOpenImageIO -lIlmImf-2_5 /usr/lib/libz.so.5.0 -lImath-2_5 -lIexMath-2_5
-lHalf-2_5 -lIlmThread-2_5 -lIex-2_5 -lIlmImf-2_5 -lImath-2_5 -lIex-2_5
-lHalf-2_5 -lIlmThread-2_5 -lz -lImath-2_5 -lIex-2_5 -lHalf-2_5
-lIlmThread-2_5 -lz -lpthread -Wl,-rpath-link,/usr/X11R6/lib:/usr/local/lib
&& :
ld: error: undefined symbol: OpenImageIO_v2_2::ArgParse::abort(bool)
>>> referenced by iconvert.cpp
>>> src/iconvert/CMakeFiles/iconvert.dir/iconvert.cpp.o:(main)
ld: error: undefined symbol: OpenImageIO_v2_2::ArgParse::aborted() const
>>> referenced by iconvert.cpp
>>> src/iconvert/CMakeFiles/iconvert.dir/iconvert.cpp.o:(main)
c++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
*** Error 1 in /usr/ports/graphics/openimageio
(/usr/ports/devel/cmake/cmake.port.mk:36 'do-build': @cd
/usr/ports/pobj/openimageio-2.2.11.1...)
*** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2928
'/usr/ports/pobj/openimageio-2.2.11.1/build-amd64/.build_done': @cd /usr/por...)
*** Error 2 in /usr/ports/graphics/openimageio
(/usr/ports/infrastructure/mk/bsd.port.mk:2591 'build':
@lock=openimageio-2.2.11.1; export _...)
regards,
Dimitri