Buildbot: Support build in a newer chroot
authorSergey Sharybin <sergey.vfx@gmail.com>
Sat, 27 Feb 2016 12:09:12 +0000 (13:09 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sat, 27 Feb 2016 12:09:36 +0000 (13:09 +0100)
build_files/buildbot/config/blender_linux.cmake
build_files/buildbot/slave_compile.py

index eb80d9513ef162f68cb0da78c3f430e0fa94355d..ed5417c1c6e653e83f96fec3235cce9d9ed8b033 100644 (file)
@@ -2,6 +2,25 @@
 
 include("${CMAKE_CURRENT_LIST_DIR}/../../cmake/config/blender_full.cmake")
 
+# Detect which libc we'll be linking against.
+# Some of the paths will depend on this
+
+if (EXISTS "/lib/x86_64-linux-gnu/libc-2.19.so")
+       message(STATUS "Building in GLibc-2.19 environment")
+       set(GLIBC "2.19")
+       set(MULTILIB "/x86_64-linux-gnu")
+elseif (EXISTS "/lib/i386-linux-gnu//libc-2.19.so")
+       message(STATUS "Building in GLibc-2.19 environment")
+       set(GLIBC "2.19")
+       set(MULTILIB "/i386-linux-gnu")
+elseif (EXISTS "/lib/libc-2.11.3.so")
+       message(STATUS "Building in GLibc-2.11 environment")
+       set(GLIBC "2.11")
+       set(MULTILIB "")
+else()
+       message(FATAL_ERROR "Unknown build environment")
+endif()
+
 # Default to only build Blender, not the player
 set(WITH_BLENDER             ON  CACHE BOOL "" FORCE)
 set(WITH_PLAYER              OFF CACHE BOOL "" FORCE)
@@ -37,16 +56,16 @@ set(Boost_USE_STATIC_LIBS    ON CACHE BOOL "" FORCE)
 set(FFMPEG                   "/opt/lib/ffmpeg" CACHE STRING "" FORCE)
 set(FFMPEG_LIBRARIES
        avdevice avformat avcodec avutil avfilter swscale swresample
-       /usr/lib/libxvidcore.a
-       /usr/lib/libx264.a
-       /usr/lib/libmp3lame.a
-       /usr/lib/libvpx.a
-       /usr/lib/libvorbis.a
-       /usr/lib/libogg.a
-       /usr/lib/libvorbisenc.a
-       /usr/lib/libtheora.a
-       /usr/lib/libschroedinger-1.0.a
-       /usr/lib/liborc-0.4.a
+       /usr/lib${MULTILIB}/libxvidcore.a
+       /usr/lib${MULTILIB}/libx264.a
+       /usr/lib${MULTILIB}/libmp3lame.a
+       /usr/lib${MULTILIB}/libvpx.a
+       /usr/lib${MULTILIB}/libvorbis.a
+       /usr/lib${MULTILIB}/libogg.a
+       /usr/lib${MULTILIB}/libvorbisenc.a
+       /usr/lib${MULTILIB}/libtheora.a
+       /usr/lib${MULTILIB}/libschroedinger-1.0.a
+       /usr/lib${MULTILIB}/liborc-0.4.a
        CACHE STRING "" FORCE
 )
 
@@ -63,11 +82,11 @@ set(OPENAL_LIBRARY
 )
 
 # OpenCollada libraries
-set(OPENCOLLADA_UTF_LIBRARY   ""                   CACHE STRING "" FORCE)
-set(PCRE_INCLUDE_DIR          "/usr/include"       CACHE STRING "" FORCE)
-set(PCRE_LIBRARY              "/usr/lib/libpcre.a" CACHE STRING "" FORCE)
-set(XML2_INCLUDE_DIR          "/usr/include"       CACHE STRING "" FORCE)
-set(XML2_LIBRARY              "/usr/lib/libxml2.a" CACHE STRING "" FORCE)
+set(OPENCOLLADA_UTF_LIBRARY   ""                              CACHE STRING "" FORCE)
+set(PCRE_INCLUDE_DIR          "/usr/include"                  CACHE STRING "" FORCE)
+set(PCRE_LIBRARY              "/usr/lib${MULTILIB}/libpcre.a" CACHE STRING "" FORCE)
+set(XML2_INCLUDE_DIR          "/usr/include"                  CACHE STRING "" FORCE)
+set(XML2_LIBRARY              "/usr/lib${MULTILIB}/libxml2.a" CACHE STRING "" FORCE)
 
 # OpenColorIO libraries
 set(OPENCOLORIO_ROOT_DIR      "/opt/lib/ocio" CACHE STRING "" FORCE)
@@ -75,6 +94,18 @@ set(OPENCOLORIO_OPENCOLORIO_LIBRARY "${OPENCOLORIO_ROOT_DIR}/lib/libOpenColorIO.
 set(OPENCOLORIO_TINYXML_LIBRARY "${OPENCOLORIO_ROOT_DIR}/lib/libtinyxml.a"         CACHE STRING "" FORCE)
 set(OPENCOLORIO_YAML-CPP_LIBRARY "${OPENCOLORIO_ROOT_DIR}/lib/libyaml-cpp.a"       CACHE STRING "" FORCE)
 
+# OpenImageIO
+if(GLIBC EQUAL "2.19")
+       set(OPENIMAGEIO_LIBRARY
+               /opt/lib/oiio/lib/libOpenImageIO.a
+               /opt/lib/oiio/lib/libOpenImageIO_Util.a
+               /usr/lib${MULTILIB}/libwebp.a
+               /usr/lib${MULTILIB}/liblzma.a
+               /usr/lib${MULTILIB}/libjbig.a
+               CACHE STRING "" FORCE
+       )
+endif()
+
 # OpenSubdiv libraries
 set(OPENSUBDIV_ROOT_DIR "/opt/lib/opensubdiv" CACHE STRING "" FORCE)
 set(OPENSUBDIV_OSDCPU_LIBRARY "${OPENSUBDIV_ROOT_DIR}/lib/libosdCPU.a" CACHE STRING "" FORCE)
@@ -95,11 +126,11 @@ set(JEMALLOC_LIBRARY    "/opt/lib/jemalloc/lib/libjemalloc.a" CACHE STRING "" FO
 set(SPACENAV_ROOT_DIR       "/opt/lib/libspnav" CACHE STRING "" FORCE)
 
 # Force some system libraries to be static
-set(FFTW3_LIBRARY       "/usr/lib/libfftw3.a" CACHE STRING "" FORCE)
-set(JPEG_LIBRARY        "/usr/lib/libjpeg.a"  CACHE STRING "" FORCE)
-set(PNG_LIBRARY         "/usr/lib/libpng.a"   CACHE STRING "" FORCE)
-set(TIFF_LIBRARY        "/usr/lib/libtiff.a"  CACHE STRING "" FORCE)
-set(ZLIB_LIBRARY        "/usr/lib/libz.a"     CACHE STRING "" FORCE)
+set(FFTW3_LIBRARY       "/usr/lib${MULTILIB}/libfftw3.a" CACHE STRING "" FORCE)
+set(JPEG_LIBRARY        "/usr/lib${MULTILIB}/libjpeg.a"  CACHE STRING "" FORCE)
+set(PNG_LIBRARY         "/usr/lib${MULTILIB}/libpng.a"   CACHE STRING "" FORCE)
+set(TIFF_LIBRARY        "/usr/lib${MULTILIB}/libtiff.a"  CACHE STRING "" FORCE)
+set(ZLIB_LIBRARY        "/usr/lib${MULTILIB}/libz.a"     CACHE STRING "" FORCE)
 
 # OpenVDB
 set(OPENVDB_LIBRARY
index 6508e8e1bbb91e0ad23874fdbfaf972bec1fe71d..34774c30c1df577b16d17112f41a952b853eb41f 100644 (file)
@@ -84,16 +84,22 @@ if 'cmake' in builder:
             cmake_options.append(['-G', '"Visual Studio 12 2013"'])
 
     elif builder.startswith('linux'):
+        tokens = builder.split("_")
+        glibc = tokens[1]
+        if glibc == 'glibc219':
+            deb_name = "jessie"
+        elif glibc == 'glibc211':
+            deb_name = "squeeze"
         remove_install_dir = True
         cmake_config_file = "build_files/buildbot/config/blender_linux.cmake"
         cmake_player_config_file = "build_files/buildbot/config/blender_linux_player.cmake"
         if builder.endswith('x86_64_cmake'):
-            chroot_name = 'buildbot_squeeze_x86_64'
+            chroot_name = 'buildbot_' + deb_name + '_x86_64'
             targets = ['player', 'blender']
         elif builder.endswith('i386_cmake'):
             bits = 32
-            chroot_name = 'buildbot_squeeze_i686'
-            cuda_chroot_name = 'buildbot_squeeze_x86_64'
+            chroot_name = 'buildbot_' + deb_name + '_i686'
+            cuda_chroot_name = 'buildbot_' + deb_name + '_x86_64'
             targets = ['player', 'blender', 'cuda']
 
     cmake_options.append("-C" + os.path.join(blender_dir, cmake_config_file))