qdtk / openshadinglanguage

Automatically exported from code.google.com/p/openshadinglanguage
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Link Errors Fedora 17 with OSL version 1.3 #66

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compiling & Linking Stages
2.
3.

What is the expected output? What do you see instead?
Osl 1.3 libraries in the OSLInstall Directory

What version of the product are you using? On what operating system?
Osl 1.3 
Using Git command -b Release-1.3.0 
git://github.com/imageworks/OpenShadingLanguage.git
Fedora 17 64Bit
Cmake Version 2.8.9
gcc (GCC) 4.7.2 20120921 (Red Hat 4.7.2-2)
llvm 3.1
Boost 1.5.3
OpenColorIO 1.0.8
OpenImageIO 1.1.6

Please provide any additional information below.
Trying to compile Osl 1.3 on Fedora 17 but it fails with the following output:

[ 77%] Building CXX object liboslexec/CMakeFiles/accum_test.dir/accum_test.cpp.o
Linking CXX executable accum_test
/usr/bin/ld: 
/home/terry/BLENDER-SVN/BUILDDIR/BOOST/BOOSTInstall/lib/libboost_thread-mt.a(thr
ead.o): undefined reference to symbol 'clock_gettime@@GLIBC_2.2.5'
/usr/bin/ld: note: 'clock_gettime@@GLIBC_2.2.5' is defined in DSO 
/lib64/librt.so.1 so try adding it to the linker command line
/lib64/librt.so.1: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [liboslexec/accum_test] Error 1
make[1]: *** [liboslexec/CMakeFiles/accum_test.dir/all] Error 2
make: *** [all] Error 2

---

I am using the following Cmake options to start the build:

-D CMAKE_INSTALL_PREFIX:STRING=${OSLBUILDDIR}/OSLInstall\
                                                                -D BOOST_INCLUDEDIR:STRING=${BOOSTBUILDDIR}/BOOSTInstall/include\
                                                                -D BOOST_LIBRARYDIR:STRING=${BOOSTBUILDDIR}/BOOSTInstall/lib\
                                                            -D LLVM_BC_GENERATOR:STRING=${LLVMCOLLECTIONBUILDIR}/LLVMInstall/bin/clang++\
                                                            -D LLVM_DIRECTORY:STRING=${LLVMCOLLECTIONBUILDIR}/LLVMInstall\
                                                            -D LLVM_LIBRARY:STRING=${LLVMCOLLECTIONBUILDIR}/LLVMInstall/lib/libLLVM-${LLVM_VERSION}.so\
                                                            -D LLVM_VERSION:STRING=${LLVM_VERSION}\
                                                            -D OPENIMAGEIO_INCLUDES:STRING=${OIIOBUILDDIR}/OIIOInstall/include\
                                                            -D OPENIMAGEIO_LIBRARY:STRING=${OIIOBUILDDIR}/OIIOInstall/lib/libOpenImageIO.so\
                                                            -D TBB_INCLUDES:STRING=${OIIOBUILDDIR}/OIIOInstall/include/OpenImageIO\
                                                            -D BUILDSTATIC:BOOL=ON\
                                                            -D LINKSTATIC:BOOL=ON\
                                                            -D BUILD_TESTING:BOOL=OFF

---

The above cmake commands result in a working osl build if I build against the 
following git source location:

-b blender-fixes https://github.com/mont29/OpenShadingLanguage.git

I use a script I wrote to build Blender which automates the building process. 
By default using the older version of osl my script gets a working Blender & 
osl.  If you comment line 67 and uncomment line 68 (so it tries to build 
against osl 1.3).  The build script fails.

I have attached the script, it's invoked with the following command:

./AutoCompileBlender.sh -o -b -f

running with:

./AutoCompileBlender.sh -o

Will just build the Blender with all the libraries required for Blender and Osl.

If you do run the script please run in a vm because it checks the fedora box 
for certain rpms and if not found will tell you what's missing and guide you 
through the process of installing them.

Full instructions on the script are here:

http://wiki.blender.org/index.php/User:Terrywallwork

I asked Thomas Dinges about the error, he never seen it before so suggested I 
post here.  Sorry for the rambling but not entirely sure what info you need so 
threw everything I have here.

Original issue reported on code.google.com by terrywal...@gmail.com on 16 Feb 2013 at 8:37

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
also I tried adding:

export CFLAGS=-lrt

and rerunning the script but it made no difference.

Original comment by terrywal...@gmail.com on 16 Feb 2013 at 8:48