[Bf-blender-cvs] [1422284] master: Cleanup: remove completely all-static option, just too complex to support in modern linuxes!

Bastien Montagne noreply at git.blender.org
Tue Feb 4 16:52:25 CET 2014


Commit: 142228433a8bfb2476135427492a5ec74e9a3c01
Author: Bastien Montagne
Date:   Tue Feb 4 16:51:41 2014 +0100
https://developer.blender.org/rB142228433a8bfb2476135427492a5ec74e9a3c01

Cleanup: remove completely all-static option, just too complex to support in modern linuxes!

===================================================================

M	build_files/build_environment/install_deps.sh

===================================================================

diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh
index fc70cff..eaeb441 100755
--- a/build_files/build_environment/install_deps.sh
+++ b/build_files/build_environment/install_deps.sh
@@ -25,7 +25,7 @@
 ARGS=$( \
 getopt \
 -o s:i:t:h \
---long source:,install:,tmp:,threads:,help,with-all,with-opencollada,all-static,force-all,\
+--long source:,install:,tmp:,threads:,help,with-all,with-opencollada,force-all,\
 force-python,force-numpy,force-boost,force-ocio,force-oiio,force-llvm,force-osl,force-opencollada,\
 force-ffmpeg,skip-python,skip-numpy,skip-boost,skip-ocio,skip-oiio,skip-llvm,skip-osl,skip-ffmpeg,\
 skip-opencollada,required-numpy \
@@ -45,9 +45,6 @@ WITH_ALL=false
 # Do not yet enable opencollada, use --with-opencollada (or --with-all) option to try it.
 WITH_OPENCOLLADA=false
 
-# Try to link everything statically. Use this to produce portable versions of blender.
-ALL_STATIC=false
-
 THREADS=`cat /proc/cpuinfo | grep processor | wc -l`
 if [ -z "$THREADS" ]; then
   THREADS=1
@@ -61,9 +58,6 @@ or use --source/--install options, if you want to use other paths!
 Number of threads for building: \$THREADS (automatically detected, use --threads=<nbr> to override it).
 Full install: \$WITH_ALL (use --with-all option to enable it).
 Building OpenCOLLADA: \$WITH_OPENCOLLADA (use --with-opencollada option to enable it).
-All static linking: \$ALL_STATIC (use --all-static option to enable it).
-
-WARNING: Static build works fine with CMake, but with scons it may be tricky to get a valid Blender build!
 
 Example:
 Full install without OpenCOLLADA: --with-all --skip-opencollada
@@ -95,9 +89,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
     --with-opencollada
         Build and install the OpenCOLLADA libraries.
 
-    --all-static
-        *BROKEN CURRENTLY, do not use!* Build libraries as statically as possible, to create static builds of Blender.
-
     --force-all
         Force the rebuild of all built libraries.
 
@@ -351,9 +342,6 @@ while true; do
     --with-opencollada)
       WITH_OPENCOLLADA=true; shift; continue
     ;;
-    --all-static)
-      ALL_STATIC=true; shift; continue
-    ;;
     --force-all)
       PYTHON_FORCE_REBUILD=true
       NUMPY_FORCE_REBUILD=true
@@ -936,11 +924,7 @@ compile_ILMBASE() {
     cmake_d="-D CMAKE_BUILD_TYPE=Release"
     cmake_d="$cmake_d -D CMAKE_PREFIX_PATH=$_inst"
     cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
-    if [ $ALL_STATIC == true ]; then
-      cmake_d="$cmake_d -D BUILD_SHARED_LIBS=OFF"
-    else
-      cmake_d="$cmake_d -D BUILD_SHARED_LIBS=ON"
-    fi
+    cmake_d="$cmake_d -D BUILD_SHARED_LIBS=ON"
 
     if file /bin/cp | grep -q '32-bit'; then
       cflags="-fPIC -m32 -march=i686"
@@ -1043,11 +1027,7 @@ compile_OPENEXR() {
     cmake_d="$cmake_d -D CMAKE_PREFIX_PATH=$_inst"
     cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
     cmake_d="$cmake_d -D ILMBASE_PACKAGE_PREFIX=$_ilmbase_inst"
-    if [ $ALL_STATIC == true ]; then
-      cmake_d="$cmake_d -D BUILD_SHARED_LIBS=OFF"
-    else
-      cmake_d="$cmake_d -D BUILD_SHARED_LIBS=ON"
-    fi
+    cmake_d="$cmake_d -D BUILD_SHARED_LIBS=ON"
 
     if file /bin/cp | grep -q '32-bit'; then
       cflags="-fPIC -m32 -march=i686"
@@ -1059,9 +1039,6 @@ compile_OPENEXR() {
 
     make -j$THREADS && make install
 
-    # Force linking against static libs
-#    rm -f $_inst/lib/*.so*
-
     make clean
 
     if [ -d $_inst ]; then
@@ -1152,13 +1129,8 @@ compile_OIIO() {
     cmake_d="$cmake_d -D CMAKE_PREFIX_PATH=$_inst"
     cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
     cmake_d="$cmake_d -D STOP_ON_WARNING=OFF"
-    if [ $ALL_STATIC == true ]; then
-      cmake_d="$cmake_d -D BUILDSTATIC=ON"
-      cmake_d="$cmake_d -D LINKSTATIC=ON"
-    else
-      cmake_d="$cmake_d -D BUILDSTATIC=OFF"
-      cmake_d="$cmake_d -D LINKSTATIC=OFF"
-    fi
+    cmake_d="$cmake_d -D BUILDSTATIC=OFF"
+    cmake_d="$cmake_d -D LINKSTATIC=OFF"
 
     if [ $_with_built_openexr == true ]; then
       cmake_d="$cmake_d -D ILMBASE_HOME=$INST/openexr"
@@ -1176,17 +1148,8 @@ compile_OIIO() {
     #cmake_d="$cmake_d -D CMAKE_EXPORT_COMPILE_COMMANDS=ON"
     #cmake_d="$cmake_d -D CMAKE_VERBOSE_MAKEFILE=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"
-      # XXX Does not work (looks like static boost are built without fPIC :/ ).
-      #if $ALL_STATIC; then
-        #cmake_d="$cmake_d -D Boost_USE_STATIC_LIBS=ON"
-      #fi
     fi
 
     # Looks like we do not need ocio in oiio for now...
@@ -1395,11 +1358,7 @@ compile_OSL() {
     cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
     cmake_d="$cmake_d -D BUILD_TESTING=OFF"
     cmake_d="$cmake_d -D STOP_ON_WARNING=OFF"
-    if [ $ALL_STATIC == true ]; then
-      cmake_d="$cmake_d -D BUILDSTATIC=ON"
-    else
-      cmake_d="$cmake_d -D BUILDSTATIC=OFF"
-    fi
+    cmake_d="$cmake_d -D BUILDSTATIC=OFF"
 
     if [ $_with_built_openexr == true ]; then
       cmake_d="$cmake_d -D ILMBASE_HOME=$INST/openexr"
@@ -1408,9 +1367,6 @@ compile_OSL() {
 
     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"        
-      fi
     fi
 
     if [ -d $INST/oiio ]; then
@@ -1504,11 +1460,7 @@ compile_OpenCOLLADA() {
     cmake_d="$cmake_d -D USE_EXPAT=OFF"
     cmake_d="$cmake_d -D USE_LIBXML=ON"
     # XXX Does not work!
-#    if [ $ALL_STATIC == true ]; then
-#      cmake_d="$cmake_d -D USE_STATIC=ON"
-#    else
-#      cmake_d="$cmake_d -D USE_STATIC=OFF"
-#    fi
+#    cmake_d="$cmake_d -D USE_STATIC=OFF"
     cmake_d="$cmake_d -D USE_STATIC=ON"
 
     cmake $cmake_d ../
@@ -2757,24 +2709,14 @@ install_ARCH() {
 #### Printing User Info ####
 
 print_info_ffmpeglink_DEB() {
-  if $ALL_STATIC; then
-    dpkg -L $_packages | grep -e ".*\/lib[^\/]\+\.a" | gawk '{ printf(nlines ? "'"$_ffmpeg_list_sep"'%s" : "%s", $0); nlines++ }'
-  else
-    dpkg -L $_packages | grep -e ".*\/lib[^\/]\+\.so" | gawk '{ printf(nlines ? "'"$_ffmpeg_list_sep"'%s" : "%s", gensub(/.*lib([^\/]+)\.so/, "\\1", "g", $0)); nlines++ }'
-  fi
+  dpkg -L $_packages | grep -e ".*\/lib[^\/]\+\.so" | gawk '{ printf(nlines ? "'"$_ffmpeg_list_sep"'%s" : "%s", gensub(/.*lib([^\/]+)\.so/, "\\1", "g", $0)); nlines++ }'
 }
 
 print_info_ffmpeglink_RPM() {
-#  # XXX No static libs...
-#  if $ALL_STATIC; then
-#    rpm -ql $_packages | grep -e ".*\/lib[^\/]\+\.a" | gawk '{ printf(nlines ? "'"$_ffmpeg_list_sep"'%s" : "%s", $0); nlines++ }'
-#  else
   rpm -ql $_packages | grep -e ".*\/lib[^\/]\+\.so" | gawk '{ printf(nlines ? "'"$_ffmpeg_list_sep"'%s" : "%s", gensub(/.*lib([^\/]+)\.so/, "\\1", "g", $0)); nlines++ }'
-#  fi
 }
 
 print_info_ffmpeglink_ARCH() {
-# No static libs...
   pacman -Ql $_packages | grep -e ".*\/lib[^\/]\+\.so$" | gawk '{ printf(nlines ? "'"$_ffmpeg_list_sep"'%s" : "%s", gensub(/.*lib([^\/]+)\.so/, "\\1", $0)); nlines++ }'
 }
 
@@ -2845,21 +2787,6 @@ print_info() {
 
   _buildargs=""
 
-  if $ALL_STATIC; then
-    _1="-D WITH_STATIC_LIBS=ON"
-    # XXX Force linking with shared SDL lib!
-    _2="-D SDL_LIBRARY='libSDL.so;-lpthread'"
-    PRINT "  $_1"
-    PRINT "  $_2"
-    _buildargs="$_buildargs $_1 $_2"
-    # XXX Arch linux needs to link freetype dynamically...
-    if [ "$DISTRO" = "ARCH" ]; then
-      _1="-D FREETYPE_LIBRARY=/usr/lib/libfreetype.so"
-      PRINT "  $_1"
-      _buildargs="$_buildargs $_1"
-    fi
-  fi
-
   if [ -d $INST/python-$PYTHON_VERSION_MIN ]; then
     _1="-D PYTHON_ROOT_DIR=$INST/python-$PYTHON_VERSION_MIN"
     PRINT "  $_1"
@@ -2872,28 +2799,6 @@ print_info() {
     PRINT "  $_1"
     PRINT "  $_2"
     _buildargs="$_buildargs $_1 $_2"
-  elif $ALL_STATIC; then
-    _1="-D WITH_BOOST_ICU=ON"
-    PRINT "  $_1"
-    _buildargs="$_buildargs $_1"
-    # XXX Arch linux fails static linking without these...
-    if [ "$DISTRO" = "ARCH" ]; then
-      _1="-D ICU_LIBRARY_DATA=/usr/lib/libicudata.so"
-      _2="-D ICU_LIBRARY_I18N=/usr/lib/libicui18n.so"
-      _3="-D ICU_LIBRARY_IO=/usr/lib/libicuio.so"
-      _4="-D ICU_LIBRARY_LE=/usr/lib/libicule.so"
-      _5="-D ICU_LIBRARY_LX=/usr/lib/libiculx.so"
-      _6="-D ICU_LIBRARY_TU=/usr/lib/libicutu.so"
-      _7="-D ICU_LIBRARY_UC=/usr/lib/libicuuc.so"
-      PRINT "  $_1"
-      PRINT "  $_2"
-      PRINT "  $_3"
-      PRINT "  $_4"
-      PRINT "  $_5"
-      PRINT "  $_6"
-      PRINT "  $_7"
-      _buildargs="$_buildargs $_1 $_2 $_3 $_4 $_5 $_6 $_7"
-    fi
   fi
 
   if [ -d $INST/ocio ]; then
@@ -2938,11 +2843,6 @@ print_info() {
     _1="-D WITH_OPENCOLLADA=ON"
     PRINT "  $_1"
     _buildargs="$_buildargs $_1"
-    if $ALL_STATIC; then
-      _1="-D XML2_LIBRARY=$_XML2_LIB"
-      PRINT "  $_1"
-      _buildargs="$_buildargs $_1"
-    fi
   fi
 
   _1="-D WITH_CODEC_FFMPEG=ON"
@@ -2967,17 +2867,11 @@ print_info() {
     PRINT "BF_PYTHON = '$INST/python-$PYTHON_VERSION_MIN'"
     PRINT "BF_PYTHON_ABI_FLAGS = 'm'"
   fi
-  if $ALL_STATIC; then
-    PRINT "WITH_BF_STATICPYTHON = True"
-  fi
 
   PRINT "WITH_BF_OCIO = True"
   if [ -d $INST/ocio ]; then
     PRINT "BF_OCIO = '$INST/ocio'"
   fi
-  if $ALL_STATIC; then
-    PRINT "WITH_BF_STATICOCIO = True"
-  fi
 
   if [ -d $INST/openexr ]; then
     PRINT "BF_OPENEXR = '$INST/openexr'"
@@ -2988,17 +2882,9 @@ print_info() {
       _ilm_libs_ext=`echo $OPENEXR_VERSION | sed -r 's/([0-9]+)\.([0-9]+).*/-\1_\2/'`
     fi
     PRINT "BF_OPENEXR_LIB = 'Half IlmImf$_ilm_libs_ext Iex$_ilm_libs_ext Imath$_ilm_libs_ext '"
-    if $ALL_STATIC; then
-      PRINT "BF_OPENEXR_LIB_STATIC = '\${BF_OPENEXR}/lib/libHalf.a \${BF_OPENEXR}/lib/libIlmImf$_ilm_libs_ext.a \${BF_OPENEXR}/lib/libIex$_ilm_libs_ext.a \${BF_OPENEXR}/lib/libImath$_ilm_libs_ext.a \${BF_OPENEXR}/lib/libIlmThread$_ilm_libs_ext.a'"
-    else
-      # BF_OPENEXR_LIB does not work, things lik

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list