OSL 1.2 Compile errors on Ubuntu 12.04

943 views
Skip to first unread message

Thomas Dinges

unread,
Sep 1, 2012, 10:00:47 AM9/1/12
to osl...@googlegroups.com
Hi everyone,
Firt of all congratulations on the OSL 1.2 release! :)

I compiled OSL 1.1 Trunk in June on my Ubuntu 12.04 system and already then I had several issues. Back then I had to disable accum_test, testshade and shaders. Afterwards I got the libs at least to work with.
Was that not a good idea? If these 3 things are optional, it would be great if there would be a simple On/Of switch in cmake, I could not find one and had to comment several lines.

I tried to compile OSL 1.2 now and again have the same issues, here are the errors and my config:

Thanks in advance,
Thomas Dinges


Config:
platform=linux64, hw=x86_64
OSL_SITE = rio-grande
dist_dir = dist/linux64
INSTALLDIR = /home/thomas/blender_dev/code/trunk/lib/osl_12
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Project source dir = /home/thomas/blender_dev/code/trunk/lib/osl_12/src
-- Project build dir = /home/thomas/blender_dev/code/trunk/lib/osl_12/build/linux64
-- Using gcc 4.6 as the compiler
-- CMAKE_SYSTEM_NAME = Linux
-- CMAKE_SYSTEM_VERSION = 3.2.0-26-generic
-- CMAKE_SYSTEM_PROCESSOR = x86_64
-- Unix! Linux
-- platform = linux64
-- OPENIMAGEIOHOME = /home/thomas/blender_dev/code/trunk/lib/linux64/oiio/
-- OpenImageIO includes = /home/thomas/blender_dev/code/trunk/lib/linux64/oiio/include
-- OpenImageIO library = /home/thomas/blender_dev/code/trunk/lib/linux64/oiio/lib/libOpenImageIO.a
-- THIRD_PARTY_TOOLS_HOME = unknown
-- SPECIAL_COMPILE_FLAGS =
-- ILMBASE_VERSION = 1.0.1
-- ILMBASE_HOME = unknown
-- ILMBASE_INCLUDE_AREA = /usr/include
-- ILMBASE_LIBRARIES = /usr/lib/libImath.so;/usr/lib/libHalf.so;/usr/lib/libIlmThread.so;/usr/lib/libIex.so
-- OPENEXR_VERSION = 1.6.1
-- OPENEXR_VERSION_DIGITS = 010601
-- OPENEXR_HOME = unknown
-- OPENEXR_INCLUDE_AREA = /usr/include
-- OPENEXR_LIBRARY = /usr/lib/libIlmImf.so
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.3.4")
-- BOOST_ROOT
-- Boost version: 1.49.0
-- Found the following Boost libraries:
--   filesystem
--   regex
--   system
--   thread
-- Boost found TRUE
-- Boost include dirs /home/thomas/blender_dev/code/trunk/lib/linux64/boost/include
-- Boost library dirs /home/thomas/blender_dev/code/trunk/lib/linux64/boost/lib
-- Boost libraries    /home/thomas/blender_dev/code/trunk/lib/linux64/boost/lib/libboost_filesystem.a;/home/thomas/blender_dev/code/trunk/lib/linux64/boost/lib/libboost_regex.a;/home/thomas/blender_dev/code/trunk/lib/linux64/boost/lib/libboost_system.a;/home/thomas/blender_dev/code/trunk/lib/linux64/boost/lib/libboost_thread.a;pthread
-- OPENGL_FOUND= USE_OPENGL=
-- TBB_HOME = unknown
-- TBB includes = /home/thomas/blender_dev/code/trunk/lib/linux64/oiio/include/OpenImageIO
-- TBB library =
-- LLVM version  = 3.0
-- LLVM dir      = /usr/lib/llvm-3.0
-- LLVM includes = /usr/lib/llvm-3.0/include
-- LLVM library  = /usr/lib/x86_64-linux-gnu/libLLVM-3.0.so
-- LLVM lib dir  = /usr/lib/llvm-3.0/lib
-- LLVM OSL_LLVM_VERSION = 30
-- LLVM library  = /usr/lib/x86_64-linux-gnu/libLLVM-3.0.so
-- Looking for flex
-- Looking for flex -- /usr/bin/flex
-- Looking for bison
-- Looking for bison -- /usr/bin/bison
-- CMAKE_INSTALL_RPATH = /home/thomas/blender_dev/code/trunk/lib/osl_12/dist/linux64/lib
-- FLEX_BISON flex=osllex.l bison=oslgram.y prefix=osl
-- Flex include dir = /usr/include
-- FLEX_BISON flex=../liboslexec/osolex.l bison=../liboslexec/osogram.y prefix=oso
-- Flex include dir = /usr/include
-- FLEX_BISON flex=osolex.l bison=osogram.y prefix=oso
-- Flex include dir = /usr/include
-- LLVM_COMPILE in=llvm_ops.cpp
-- LLVM_COMPILE asm=/home/thomas/blender_dev/code/trunk/lib/osl_12/build/linux64/liboslexec/llvm_ops.s
-- LLVM_COMPILE bc=/home/thomas/blender_dev/code/trunk/lib/osl_12/build/linux64/liboslexec/llvm_ops.bc
-- LLVM_COMPILE cpp=/home/thomas/blender_dev/code/trunk/lib/osl_12/build/linux64/liboslexec/llvm_ops.bc.cpp
-- Current #defines are OPENEXR_VERSION=010601;USE_TBB=1;OSL_LLVM_VERSION=30
-- Using /usr/bin/clang++ to generate bitcode.


Errors with default configuration:


[ 80%] Building CXX object liboslexec/CMakeFiles/accum_test.dir/accum_test.cpp.o
Linking CXX executable accum_test
liboslexec.so: undefined reference to `Imf::TiledInputFile::tileXSize() const'
liboslexec.so: undefined reference to `png_get_sRGB'
liboslexec.so: undefined reference to `png_get_valid'
liboslexec.so: undefined reference to `TIFFWriteTile'
liboslexec.so: undefined reference to `Imf::Header::insert(char const*, Imf::Attribute const&)'
liboslexec.so: undefined reference to `jpeg_write_coefficients'
liboslexec.so: undefined reference to `cio_tell'
liboslexec.so: undefined reference to `png_create_info_struct'
liboslexec.so: undefined reference to `opj_destroy_compress'
liboslexec.so: undefined reference to `png_read_row'
liboslexec.so: undefined reference to `Imf::TiledInputFile::header() const'
liboslexec.so: undefined reference to `png_get_tIME'
liboslexec.so: undefined reference to `png_set_expand'
liboslexec.so: undefined reference to `jpeg_resync_to_restart'
liboslexec.so: undefined reference to `Imf::TiledInputFile::readTiles(int, int, int, int, int, int)'
liboslexec.so: undefined reference to `png_read_info'
liboslexec.so: undefined reference to `png_get_interlace_type'
liboslexec.so: undefined reference to `png_sig_cmp'
liboslexec.so: undefined reference to `png_write_info'
liboslexec.so: undefined reference to `opj_set_event_mgr'
liboslexec.so: undefined reference to `Imf::Header::~Header()'
liboslexec.so: undefined reference to `Imf::Header::begin() const'
liboslexec.so: undefined reference to `Imf::InputFile::readPixels(int, int)'
liboslexec.so: undefined reference to `Imf::OutputFile::setFrameBuffer(Imf::FrameBuffer const&)'
liboslexec.so: undefined reference to `Imf::TypedAttribute<Imf::Envmap>::writeValueTo(Imf::OStream&, int) const'
liboslexec.so: undefined reference to `TIFFSetWarningHandler'
liboslexec.so: undefined reference to `jpeg_std_error'
liboslexec.so: undefined reference to `jpeg_CreateDecompress'
liboslexec.so: undefined reference to `jpeg_start_compress'
liboslexec.so: undefined reference to `TIFFSetField'
liboslexec.so: undefined reference to `Imf::TypedAttribute<Imath::Matrix44<float> >::writeValueTo(Imf::OStream&, int) const'
liboslexec.so: undefined reference to `Imf::TiledOutputFile::setFrameBuffer(Imf::FrameBuffer const&)'
liboslexec.so: undefined reference to `png_set_swap'
liboslexec.so: undefined reference to `jpeg_set_quality'
liboslexec.so: undefined reference to `jpeg_read_header'
liboslexec.so: undefined reference to `Imf::TiledInputFile::numYLevels() const'
liboslexec.so: undefined reference to `png_destroy_read_struct'
liboslexec.so: undefined reference to `TIFFClose'
liboslexec.so: undefined reference to `TIFFGetField'
liboslexec.so: undefined reference to `png_set_IHDR'
liboslexec.so: undefined reference to `png_destroy_write_struct'
liboslexec.so: undefined reference to `Imf::TypedAttribute<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::readValueFrom(Imf::IStream&, int, int)'
liboslexec.so: undefined reference to `Imf::TiledInputFile::TiledInputFile(char const*, int)'
liboslexec.so: undefined reference to `png_set_oFFs'
liboslexec.so: undefined reference to `opj_encode'
liboslexec.so: undefined reference to `png_set_text'
liboslexec.so: undefined reference to `Imf::TiledInputFile::levelMode() const'
liboslexec.so: undefined reference to `jpeg_destroy_decompress'
liboslexec.so: undefined reference to `Imf::TypedAttribute<Imath::Vec3<float> >::readValueFrom(Imf::IStream&, int, int)'
liboslexec.so: undefined reference to `png_init_io'
liboslexec.so: undefined reference to `Imf::TypedAttribute<Imf::Envmap>::staticTypeName()'
liboslexec.so: undefined reference to `Imf::TypedAttribute<Imath::Matrix44<float> >::readValueFrom(Imf::IStream&, int, int)'
liboslexec.so: undefined reference to `png_create_read_struct'
liboslexec.so: undefined reference to `Imf::InputFile::setFrameBuffer(Imf::FrameBuffer const&)'
liboslexec.so: undefined reference to `jpeg_save_markers'
liboslexec.so: undefined reference to `Imf::TiledInputFile::numLevels() const'
liboslexec.so: undefined reference to `Imf::OutputFile::writePixels(int)'
liboslexec.so: undefined reference to `png_set_sig_bytes'
liboslexec.so: undefined reference to `opj_cio_open'
liboslexec.so: undefined reference to `Imf::Header::setTileDescription(Imf::TileDescription const&)'
liboslexec.so: undefined reference to `jpeg_stdio_dest'
liboslexec.so: undefined reference to `png_get_channels'
liboslexec.so: undefined reference to `Imf::TypedAttribute<Imath::Vec3<float> >::writeValueTo(Imf::OStream&, int) const'
liboslexec.so: undefined reference to `opj_image_destroy'
liboslexec.so: undefined reference to `Imf::Header::displayWindow() const'
liboslexec.so: undefined reference to `inflate'
liboslexec.so: undefined reference to `png_set_packing'
liboslexec.so: undefined reference to `opj_set_default_encoder_parameters'
liboslexec.so: undefined reference to `opj_create_compress'
liboslexec.so: undefined reference to `TIFFWriteScanline'
liboslexec.so: undefined reference to `jpeg_finish_compress'
liboslexec.so: undefined reference to `Imf::globalThreadCount()'
liboslexec.so: undefined reference to `Imf::InputFile::InputFile(char const*, int)'
liboslexec.so: undefined reference to `Imf::FrameBuffer::insert(char const*, Imf::Slice const&)'
liboslexec.so: undefined reference to `inflateInit_'
liboslexec.so: undefined reference to `png_get_IHDR'
liboslexec.so: undefined reference to `png_set_gAMA'
liboslexec.so: undefined reference to `Imf::TiledOutputFile::writeTiles(int, int, int, int, int, int)'
liboslexec.so: undefined reference to `TIFFSetDirectory'
liboslexec.so: undefined reference to `png_set_compression_level'
liboslexec.so: undefined reference to `TIFFGetFieldDefaulted'
liboslexec.so: undefined reference to `Imf::Header::lineOrder()'
liboslexec.so: undefined reference to `Imf::TypedAttribute<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::staticTypeName()'
liboslexec.so: undefined reference to `jpeg_destroy_compress'
liboslexec.so: undefined reference to `Imf::isOpenExrFile(char const*, bool&)'
liboslexec.so: undefined reference to `opj_cio_close'
liboslexec.so: undefined reference to `TIFFIsTiled'
liboslexec.so: undefined reference to `TIFFReadScanline'
liboslexec.so: undefined reference to `jpeg_write_marker'
liboslexec.so: undefined reference to `inflateEnd'
liboslexec.so: undefined reference to `Imf::Header::Header(Imath::Box<Imath::Vec2<int> > const&, Imath::Box<Imath::Vec2<int> > const&, float, Imath::Vec2<float> const&, float, Imf::LineOrder, Imf::Compression)'
liboslexec.so: undefined reference to `Imf::TypedAttribute<Imath::Vec3<float> >::staticTypeName()'
liboslexec.so: undefined reference to `opj_set_default_decoder_parameters'
liboslexec.so: undefined reference to `jpeg_finish_decompress'
liboslexec.so: undefined reference to `png_set_sRGB_gAMA_and_cHRM'
liboslexec.so: undefined reference to `jpeg_set_defaults'
liboslexec.so: undefined reference to `png_get_pHYs'
liboslexec.so: undefined reference to `TIFFOpen'
liboslexec.so: undefined reference to `TIFFIsByteSwapped'
liboslexec.so: undefined reference to `png_write_end'
liboslexec.so: undefined reference to `png_write_row'
liboslexec.so: undefined reference to `Imf::Slice::Slice(Imf::PixelType, char*, unsigned long, unsigned long, int, int, double, bool, bool)'
liboslexec.so: undefined reference to `TIFFSetErrorHandler'
liboslexec.so: undefined reference to `jpeg_start_decompress'
liboslexec.so: undefined reference to `TIFFFindFieldInfo'
liboslexec.so: undefined reference to `Imf::OutputFile::OutputFile(char const*, Imf::Header const&, int)'
liboslexec.so: undefined reference to `Imf::InputFile::header() const'
liboslexec.so: undefined reference to `opj_setup_encoder'
liboslexec.so: undefined reference to `opj_destroy_decompress'
liboslexec.so: undefined reference to `Imf::setGlobalThreadCount(int)'
liboslexec.so: undefined reference to `Imf::Header::compression()'
liboslexec.so: undefined reference to `Imf::Attribute::Attribute()'
liboslexec.so: undefined reference to `opj_image_create'
liboslexec.so: undefined reference to `png_read_end'
liboslexec.so: undefined reference to `Imf::ChannelList::begin() const'
liboslexec.so: undefined reference to `Imf::TypedAttribute<float>::staticTypeName()'
liboslexec.so: undefined reference to `inflateReset'
liboslexec.so: undefined reference to `Imf::Attribute::~Attribute()'
liboslexec.so: undefined reference to `png_read_image'
liboslexec.so: undefined reference to `jpeg_write_scanlines'
liboslexec.so: undefined reference to `gzwrite'
liboslexec.so: undefined reference to `png_set_tIME'
liboslexec.so: undefined reference to `Imf::TypedAttribute<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::writeValueTo(Imf::OStream&, int) const'
liboslexec.so: undefined reference to `Imf::TypedAttribute<Imath::Matrix44<float> >::staticTypeName()'
liboslexec.so: undefined reference to `gzopen'
liboslexec.so: undefined reference to `TIFFReadEXIFDirectory'
liboslexec.so: undefined reference to `Imf::TypedAttribute<int>::staticTypeName()'
liboslexec.so: undefined reference to `png_create_write_struct'
liboslexec.so: undefined reference to `png_set_pHYs'
liboslexec.so: undefined reference to `png_get_bKGD'
liboslexec.so: undefined reference to `png_read_update_info'
liboslexec.so: undefined reference to `jpeg_abort_compress'
liboslexec.so: undefined reference to `Imf::Header::end() const'
liboslexec.so: undefined reference to `Imf::Header::channels()'
liboslexec.so: undefined reference to `Imf::ChannelList::end() const'
liboslexec.so: undefined reference to `Imf::TypedAttribute<Imf::Envmap>::readValueFrom(Imf::IStream&, int, int)'
liboslexec.so: undefined reference to `opj_create_decompress'
liboslexec.so: undefined reference to `Imf::Header::dataWindow() const'
liboslexec.so: undefined reference to `jpeg_CreateCompress'
liboslexec.so: undefined reference to `Imf::TiledInputFile::setFrameBuffer(Imf::FrameBuffer const&)'
liboslexec.so: undefined reference to `png_get_x_offset_pixels'
liboslexec.so: undefined reference to `jpeg_read_coefficients'
liboslexec.so: undefined reference to `TIFFReadTile'
liboslexec.so: undefined reference to `gzclose'
liboslexec.so: undefined reference to `jpeg_read_scanlines'
liboslexec.so: undefined reference to `opj_decode'
liboslexec.so: undefined reference to `TIFFCheckpointDirectory'
liboslexec.so: undefined reference to `Imf::ChannelList::insert(char const*, Imf::Channel const&)'
liboslexec.so: undefined reference to `Imf::TiledInputFile::numXLevels() const'
liboslexec.so: undefined reference to `typeinfo for Imf::Attribute'
liboslexec.so: undefined reference to `Imf::TiledInputFile::tileYSize() const'
liboslexec.so: undefined reference to `jpeg_copy_critical_parameters'
liboslexec.so: undefined reference to `Imf::TiledOutputFile::TiledOutputFile(char const*, Imf::Header const&, int)'
liboslexec.so: undefined reference to `png_get_pixel_aspect_ratio'
liboslexec.so: undefined reference to `Imf::TiledInputFile::levelRoundingMode() const'
liboslexec.so: undefined reference to `gzread'
liboslexec.so: undefined reference to `opj_setup_decoder'
liboslexec.so: undefined reference to `png_get_y_offset_pixels'
liboslexec.so: undefined reference to `TIFFSwabArrayOfLong'
liboslexec.so: undefined reference to `Imf::Header::channels() const'
liboslexec.so: undefined reference to `jpeg_stdio_src'
liboslexec.so: undefined reference to `png_get_text'
liboslexec.so: undefined reference to `png_get_gAMA'
liboslexec.so: undefined reference to `Imf::Channel::Channel(Imf::PixelType, int, int, bool)'
collect2: ld gab 1 als Ende-Status zurück
make[3]: *** [liboslexec/accum_test] Fehler 1
make[3]: Verlasse Verzeichnis '/home/thomas/blender_dev/code/trunk/lib/osl_12/build/linux64'
make[2]: *** [liboslexec/CMakeFiles/accum_test.dir/all] Fehler 2

Errors after commenting Unit Tests in src/liboslexec/CMakeLists.txt:


[ 83%] Generating stdosl.h
[ 84%] Generating matte.oso
stdosl.h:493: error: No matching function call to 'area (unknown)'
    Candidates are:
    float area (point)
stdosl.h:495: error: No matching function call to 'cloth (normal, float, float, float, float, float, float, unknown, unknown, color, color, color, color, float, float, float, float, int, float, float, float, float, float)'
    Candidates are:
    closure color cloth (normal, float, float, float, float, float, float, float, vector, color, color, color, color, float, float, float, float, int, float, float, float, float, float, ...)
stdosl.h:495: error: Cannot return a 'unknown' from 'closure color cloth()'
stdosl.h:505: error: No matching function call to 'area (unknown)'
    Candidates are:
    float area (point)
stdosl.h:507: error: No matching function call to 'cloth (normal, float, float, float, float, float, float, unknown, unknown, color, color, color, color, float, float, float, float, int, float, float, float, float, float, string, string)'
    Candidates are:
    closure color cloth (normal, float, float, color, color, color, color, float, float, float, float, int, float, float, float, float, float)
    closure color cloth (normal, float, float, float, float, float, float, float, vector, color, color, color, color, float, float, float, float, int, float, float, float, float, float, ...)
stdosl.h:507: error: Cannot return a 'unknown' from 'closure color cloth()'
FAILED /home/thomas/blender_dev/code/trunk/lib/osl_12/src/shaders/matte.osl
make[3]: *** [shaders/matte.oso] Fehler 1

Larry Gritz

unread,
Sep 1, 2012, 11:35:52 AM9/1/12
to osl...@googlegroups.com
Can you do a full 

make nuke
make VERBOSE=1 > output.log

and forward that to me?

Also, which version of OIIO are you compiling against?



--
You received this message because you are subscribed to the Google Groups "OSL Developers" group.
To view this discussion on the web visit https://groups.google.com/d/msg/osl-dev/-/Jgo5Zv-LKSIJ.
To post to this group, send email to osl...@googlegroups.com.
To unsubscribe from this group, send email to osl-dev+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/osl-dev?hl=en.

--
Larry Gritz
l...@larrygritz.com


Thomas Dinges

unread,
Sep 1, 2012, 11:52:09 AM9/1/12
to osl...@googlegroups.com
Hi Larry,
sure, thank you.

Attached the output.log.

I am compiling against a OIIO Trunk revision from June 4th.

Regards,
Thomas
output.log

Thomas Dinges

unread,
Sep 1, 2012, 5:50:35 PM9/1/12
to osl...@googlegroups.com
Hi again,
after you asked for my OIIO version I compiled fresh libraries of OIIO from trunk. And it seems that fixes a lot! :)

But I am getting these errors now, any idea here? I already found this https://github.com/OpenImageIO/oiio/issues/421 but not sure where to add this -ldl flag, tried in cmake of osl (Linker Flags) but no improvement.

Best regards,
Thomas

Scanning dependencies of target accum_test
Scanning dependencies of target closure_test
Scanning dependencies of target oslc
Scanning dependencies of target libtestshade

make[3]: Verlasse Verzeichnis '/home/thomas/blender_dev/code/trunk/lib/osl_12/build/linux64'
make[3]: Betrete Verzeichnis '/home/thomas/blender_dev/code/trunk/lib/osl_12/build/linux64'
[ 82%] make[3]: Verlasse Verzeichnis '/home/thomas/blender_dev/code/trunk/lib/osl_12/build/linux64'
Building CXX object liboslexec/CMakeFiles/accum_test.dir/accum_test.cpp.o

make[3]: Verlasse Verzeichnis '/home/thomas/blender_dev/code/trunk/lib/osl_12/build/linux64'
make[3]: Verlasse Verzeichnis '/home/thomas/blender_dev/code/trunk/lib/osl_12/build/linux64'
make[3]: Betrete Verzeichnis '/home/thomas/blender_dev/code/trunk/lib/osl_12/build/linux64'
make[3]: Betrete Verzeichnis '/home/thomas/blender_dev/code/trunk/lib/osl_12/build/linux64'
[ 83%] Building CXX object testshade/CMakeFiles/libtestshade.dir/testshade.cpp.o
[ 84%] Building CXX object oslc/CMakeFiles/oslc.dir/oslcmain.cpp.o
make[3]: Betrete Verzeichnis '/home/thomas/blender_dev/code/trunk/lib/osl_12/build/linux64'
[ 85%] Building CXX object liboslexec/CMakeFiles/closure_test.dir/closure_test.cpp.o
Linking CXX executable accum_test

make[3]: Verlasse Verzeichnis '/home/thomas/blender_dev/code/trunk/lib/osl_12/build/linux64'
[ 85%] Built target accum_test
make[3]: Betrete Verzeichnis '/home/thomas/blender_dev/code/trunk/lib/osl_12/build/linux64'
Scanning dependencies of target testshade

make[3]: Verlasse Verzeichnis '/home/thomas/blender_dev/code/trunk/lib/osl_12/build/linux64'
make[3]: Betrete Verzeichnis '/home/thomas/blender_dev/code/trunk/lib/osl_12/build/linux64'
[ 86%] Linking CXX executable oslc
Building CXX object testshade/CMakeFiles/testshade.dir/testshade.cpp.o
/home/thomas/blender_dev/code/trunk/lib/linux64/oiio/lib/libOpenImageIO.so: undefined reference to `dlopen'
/home/thomas/blender_dev/code/trunk/lib/linux64/oiio/lib/libOpenImageIO.so: undefined reference to `dlclose'
/home/thomas/blender_dev/code/trunk/lib/linux64/oiio/lib/libOpenImageIO.so: undefined reference to `dlerror'
/home/thomas/blender_dev/code/trunk/lib/linux64/oiio/lib/libOpenImageIO.so: undefined reference to `dlsym'

collect2: ld gab 1 als Ende-Status zurück
make[3]: *** [oslc/oslc] Fehler 1

make[3]: Verlasse Verzeichnis '/home/thomas/blender_dev/code/trunk/lib/osl_12/build/linux64'
make[2]: *** [oslc/CMakeFiles/oslc.dir/all] Fehler 2
make[2]: *** Warte auf noch nicht beendete Prozesse...
[ 87%] Building CXX object testshade/CMakeFiles/testshade.dir/simplerend.cpp.o
Linking CXX executable closure_test
[ 88%] Building CXX object testshade/CMakeFiles/libtestshade.dir/simplerend.cpp.o

make[3]: Verlasse Verzeichnis '/home/thomas/blender_dev/code/trunk/lib/osl_12/build/linux64'
[ 88%] Built target closure_test
[ 89%] Building CXX object testshade/CMakeFiles/testshade.dir/testshademain.cpp.o
Linking CXX executable testshade

make[3]: Verlasse Verzeichnis '/home/thomas/blender_dev/code/trunk/lib/osl_12/build/linux64'
[ 89%] Built target testshade
Linking CXX shared library libtestshade.so

make[3]: Verlasse Verzeichnis '/home/thomas/blender_dev/code/trunk/lib/osl_12/build/linux64'
[ 89%] Built target libtestshade
make[2]: Verlasse Verzeichnis '/home/thomas/blender_dev/code/trunk/lib/osl_12/build/linux64'
make[1]: *** [all] Fehler 2
make[1]: Verlasse Verzeichnis '/home/thomas/blender_dev/code/trunk/lib/osl_12/build/linux64'
make: *** [cmake] Fehler 2

Konrad Kleine

unread,
Sep 2, 2012, 4:07:47 AM9/2/12
to osl...@googlegroups.com
Hi, Thomas!

Regarding your "undefined reference to" problem, here's a stripped down
example of how to fix this error in any CMake project:
https://gist.github.com/3595733

I would avoid adding -ldl manually to the linker flags. CMake can do
this for your in a platform independent manner.

I hope this helps.

Best regards,
Konrad

Am Samstag, den 01.09.2012, 14:50 +0200 schrieb Thomas Dinges
<ble...@dingto.org>:
> /home/thomas/blender_dev/code/trunk/lib/linux64/oiio/lib/.slibOpenImageIOo:
> --
> You received this message because you are subscribed to the Google
> Groups "OSL Developers" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/osl-dev/-/qtAHuqhvOtQJ [1].
> To post to this group, send email to osl...@googlegroups.com.
> To unsubscribe from this group, send email to
> osl-dev+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/osl-dev?hl=en.
>
>
> Links:
> ------
> [1] https://groups.google.com/d/msg/osl-dev/-/qtAHuqhvOtQJ

Thomas Dinges

unread,
Sep 2, 2012, 7:09:38 AM9/2/12
to osl...@googlegroups.com
Hi Konrad,
thanks for the link! I managed to compile osl now, thanks a lot!

OSL already has a bunch of these ${CMAKE_DL_LIBS} flags in cmake, but
there was one missing:

src/liboslcomp/CMakeLists.txt, I had to add the ${CMAKE_DL_LIBS} here too.

Larry would that be something to fix in osl itself, or is it platform
specific?

Best regards,
Thomas
>> collect2: ld gab 1 als Ende-Status zur�ck
--
Thomas Dinges
Blender Developer, Artist and Musician

www.dingto.org

Paolo Berto

unread,
Sep 1, 2012, 9:00:16 PM9/1/12
to osl...@googlegroups.com
On Sun, Sep 2, 2012 at 5:50 AM, Thomas Dinges <ble...@dingto.org> wrote:
> Hi again,
> after you asked for my OIIO version I compiled fresh libraries of OIIO from
> trunk. And it seems that fixes a lot! :)
>
> But I am getting these errors now, any idea here?


You have to edit the following CMakeLists.txt files to add the dynamic
linker target:


diff --git a/src/oslc/CMakeLists.txt b/src/oslc/CMakeLists.txt

-TARGET_LINK_LIBRARIES ( oslc oslcomp oslexec ${OPENIMAGEIO_LIBRARY}
${Boost_LIBRARIES} ${CMAKE_DL_LIB
===============================================================
+TARGET_LINK_LIBRARIES ( oslc oslcomp oslexec dl
${OPENIMAGEIO_LIBRARY} ${Boost_LIBRARIES} ${CMAKE_DL_INSTALL ( TARGETS
oslc RUNTIME DESTINATION bin )



diff --git a/src/libOpenImageIO/CMakeLists.txt
b/src/libOpenImageIO/CMakeLists.txt

-target_link_libraries (OpenImageIO ${Boost_LIBRARIES})
=============================================
+target_link_libraries (OpenImageIO dl ${Boost_LIBRARIES})


Paolo
> --
> You received this message because you are subscribed to the Google Groups
> "OSL Developers" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/osl-dev/-/qtAHuqhvOtQJ.
>
> To post to this group, send email to osl...@googlegroups.com.
> To unsubscribe from this group, send email to
> osl-dev+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/osl-dev?hl=en.



--
paolo berto durante
space cowboy
jupiter jazz limited, hong kong
http://jupiter-jazz.com
https://atomkraft.hk
Reply all
Reply to author
Forward
0 new messages