Dependencies Builder: disable LINKSTATIC for OIIO
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 29 Nov 2012 08:22:02 +0000 (08:22 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 29 Nov 2012 08:22:02 +0000 (08:22 +0000)
It'll likely give issues with system boost libraries in ubuntu/debian due
to this distros doesn't like static linking and not building static libs
with -fPIC flag.

Disabling LINKSTATIC should be quite painless since blender requires the
same image libraries as oiio does.

build_files/build_environment/install_deps.sh

index 9d01ed744c0272a34dcfe80bb9f67c94305dfeb6..f8cef63f30175b7a46ed4cc81f3159cffcd9cd21 100755 (executable)
@@ -456,12 +456,16 @@ EOF
     cmake_d="$cmake_d -D CMAKE_PREFIX_PATH=$_inst"
     cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
     cmake_d="$cmake_d -D BUILDSTATIC=ON"
-    cmake_d="$cmake_d -D LINKSTATIC=ON"
+
+    # linking statically could give issues on Debian/Ubuntu (and probably other distros
+    # which doesn't like static linking) when linking shared oiio library due to missing
+    # text symbols (static libs should be compiled with -fPIC)
+    # cmake_d="$cmake_d -D LINKSTATIC=ON"
 
     if [ -d $INST/boost ]; then
       cmake_d="$cmake_d -D BOOST_ROOT=$INST/boost -D Boost_NO_SYSTEM_PATHS=ON"
       if $ALL_STATIC; then
-        cmake_d="$cmake_d -D Boost_USE_STATIC_LIBS=ON"        
+        cmake_d="$cmake_d -D Boost_USE_STATIC_LIBS=ON"
       fi
     fi