diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-08-28 20:15:08 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-08-28 20:15:08 +0300 |
commit | 871b7ba8922650c34b487fec29a9d677b1aeadfd (patch) | |
tree | a13c8635e43919aed3ad48afe096f6501bbeb9a2 /build_files/build_environment | |
parent | 55263c8a4c03c1add138e5191f98a8b68591289f (diff) | |
parent | 9fd0060c0f3458e53b38003d1388f16cb56f45d8 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'build_files/build_environment')
27 files changed, 460 insertions, 54 deletions
diff --git a/build_files/build_environment/CMakeLists.txt b/build_files/build_environment/CMakeLists.txt index 81810e3e457..5270a2e2b3d 100644 --- a/build_files/build_environment/CMakeLists.txt +++ b/build_files/build_environment/CMakeLists.txt @@ -137,4 +137,12 @@ if(NOT WIN32 OR ENABLE_MINGW64) endif() endif() +if(UNIX AND NOT APPLE) + include(cmake/bzip2.cmake) + include(cmake/ffi.cmake) + include(cmake/lzma.cmake) + include(cmake/ssl.cmake) + include(cmake/sqlite.cmake) +endif() + include(cmake/harvest.cmake) diff --git a/build_files/build_environment/cmake/alembic.cmake b/build_files/build_environment/cmake/alembic.cmake index 4c0caecf335..e6323d53661 100644 --- a/build_files/build_environment/cmake/alembic.cmake +++ b/build_files/build_environment/cmake/alembic.cmake @@ -26,6 +26,12 @@ if(ALEMBIC_HDF5) endif() endif() +if(WIN32) + set(ALEMBIC_ILMBASE ${LIBDIR}/openexr) +else() + set(ALEMBIC_ILMBASE ${LIBDIR}/ilmbase) +endif() + set(ALEMBIC_EXTRA_ARGS -DBUILDSTATIC=ON -DLINKSTATIC=ON @@ -38,13 +44,13 @@ set(ALEMBIC_EXTRA_ARGS -DBoost_DEBUG=ON -DBOOST_ROOT=${LIBDIR}/boost -DBoost_NO_SYSTEM_PATHS=ON - -DILMBASE_ROOT=${LIBDIR}/openexr - -DALEMBIC_ILMBASE_INCLUDE_DIRECTORY=${LIBDIR}/openexr/include/OpenEXR - -DALEMBIC_ILMBASE_HALF_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT} - -DALEMBIC_ILMBASE_IMATH_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT} - -DALEMBIC_ILMBASE_ILMTHREAD_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT} - -DALEMBIC_ILMBASE_IEX_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT} - -DALEMBIC_ILMBASE_IEXMATH_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}IexMath${ILMBASE_VERSION_POSTFIX}${LIBEXT} + -DILMBASE_ROOT=${ALEMBIC_ILMBASE} + -DALEMBIC_ILMBASE_INCLUDE_DIRECTORY=${ALEMBIC_ILMBASE}/include/OpenEXR + -DALEMBIC_ILMBASE_HALF_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT} + -DALEMBIC_ILMBASE_IMATH_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT} + -DALEMBIC_ILMBASE_ILMTHREAD_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT} + -DALEMBIC_ILMBASE_IEX_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT} + -DALEMBIC_ILMBASE_IEXMATH_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}IexMath${ILMBASE_VERSION_POSTFIX}${LIBEXT} -DUSE_PYILMBASE=0 -DUSE_PYALEMBIC=0 -DUSE_ARNOLD=0 diff --git a/build_files/build_environment/cmake/blosc.cmake b/build_files/build_environment/cmake/blosc.cmake index b0a0460aa94..18f258357c9 100644 --- a/build_files/build_environment/cmake/blosc.cmake +++ b/build_files/build_environment/cmake/blosc.cmake @@ -26,6 +26,7 @@ set(BLOSC_EXTRA_ARGS -DPTHREAD_LIBS=${LIBDIR}/pthreads/lib/pthreadVC2.lib -DPTHREAD_INCLUDE_DIR=${LIBDIR}/pthreads/inc -DDEACTIVATE_SNAPPY=ON + -DCMAKE_POSITION_INDEPENDENT_CODE=ON ) if(WIN32) diff --git a/build_files/build_environment/cmake/bzip2.cmake b/build_files/build_environment/cmake/bzip2.cmake new file mode 100644 index 00000000000..6c515d10d61 --- /dev/null +++ b/build_files/build_environment/cmake/bzip2.cmake @@ -0,0 +1,39 @@ +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# ***** END GPL LICENSE BLOCK ***** + +set(BZIP2_PREFIX "${LIBDIR}/bzip2") +set(BZIP2_CONFIGURE_ENV echo .) +set(BZIP2_CONFIGURATION_ARGS) + +if(UNIX AND NOT APPLE) + set(BZIP2_LDFLAGS "-Wl,--as-needed") + set(BZIP2_CFLAGS "-fPIC -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64") + set(BZIP2_CONFIGURE_ENV ${BZIP2_CONFIGURE_ENV} && export LDFLAGS=${BZIP2_LDFLAGS} && export CFLAGS=${BZIP2_CFLAGS} + && export PREFIX=${BZIP2_PREFIX}) +endif() + +ExternalProject_Add(external_bzip2 + URL ${BZIP2_URI} + DOWNLOAD_DIR ${DOWNLOAD_DIR} + URL_HASH SHA256=${BZIP2_HASH} + PREFIX ${BUILD_DIR}/bzip2 + CONFIGURE_COMMAND echo . + BUILD_COMMAND ${BZIP2_CONFIGURE_ENV} && cd ${BUILD_DIR}/bzip2/src/external_bzip2/ && make CFLAGS=${BZIP2_CFLAGS} LDFLAGS=${BZIP2_LDFLAGS} -j${MAKE_THREADS} + INSTALL_COMMAND ${BZIP2_CONFIGURE_ENV} && cd ${BUILD_DIR}/bzip2/src/external_bzip2/ && make CFLAGS=${BZIP2_CFLAGS} LDFLAGS=${BZIP2_LDFLAGS} PREFIX=${BZIP2_PREFIX} install + INSTALL_DIR ${LIBDIR}/bzip2 +) diff --git a/build_files/build_environment/cmake/ffi.cmake b/build_files/build_environment/cmake/ffi.cmake new file mode 100644 index 00000000000..18531fd7906 --- /dev/null +++ b/build_files/build_environment/cmake/ffi.cmake @@ -0,0 +1,38 @@ +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# ***** END GPL LICENSE BLOCK ***** + +ExternalProject_Add(external_ffi + URL ${FFI_URI} + URL_HASH SHA256=${FFI_HASH} + DOWNLOAD_DIR ${DOWNLOAD_DIR} + PREFIX ${BUILD_DIR}/ffi + CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ffi + --enable-shared=no + --enable-static=yes + --with-pic + BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && make -j${MAKE_THREADS} + INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && make install + INSTALL_DIR ${LIBDIR}/ffi +) + +if (UNIX AND NOT APPLE) + ExternalProject_Add_Step(external_ffi after_install + COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/ffi/lib/libffi.a ${LIBDIR}/ffi/lib/libffi_pic.a + DEPENDEES install + ) +endif() diff --git a/build_files/build_environment/cmake/ffmpeg.cmake b/build_files/build_environment/cmake/ffmpeg.cmake index b1e69b794df..5c8347cd40e 100644 --- a/build_files/build_environment/cmake/ffmpeg.cmake +++ b/build_files/build_environment/cmake/ffmpeg.cmake @@ -18,13 +18,6 @@ set(FFMPEG_CFLAGS "-I${mingw_LIBDIR}/lame/include -I${mingw_LIBDIR}/openjpeg/include/ -I${mingw_LIBDIR}/ogg/include -I${mingw_LIBDIR}/vorbis/include -I${mingw_LIBDIR}/theora/include -I${mingw_LIBDIR}/vpx/include -I${mingw_LIBDIR}/x264/include -I${mingw_LIBDIR}/xvidcore/include -I${mingw_LIBDIR}/zlib/include") set(FFMPEG_LDFLAGS "-L${mingw_LIBDIR}/lame/lib -L${mingw_LIBDIR}/openjpeg/lib -L${mingw_LIBDIR}/ogg/lib -L${mingw_LIBDIR}/vorbis/lib -L${mingw_LIBDIR}/theora/lib -L${mingw_LIBDIR}/vpx/lib -L${mingw_LIBDIR}/x264/lib -L${mingw_LIBDIR}/xvidcore/lib -L${mingw_LIBDIR}/zlib/lib") -if(UNIX AND NOT APPLE) - # OpenJpeg is compiled with pthread support on Linux, which is all fine and is what we - # want for maximum runtime performance, but due to static nature of that library we - # need to force FFpeg to link against pthread, otherwise test program used by autoconf - # will fail. - set(FFMPEG_LDFLAGS "${FFMPEG_LDFLAGS} -lpthread") -endif() set(FFMPEG_EXTRA_FLAGS --pkg-config-flags=--static --extra-cflags=${FFMPEG_CFLAGS} --extra-ldflags=${FFMPEG_LDFLAGS}) set(FFMPEG_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/openjpeg/lib/pkgconfig:${mingw_LIBDIR}/x264/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR}) @@ -38,6 +31,12 @@ if(WIN32) --disable-pthreads --enable-libopenjpeg ) + if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4") + set(FFMPEG_EXTRA_FLAGS + ${FFMPEG_EXTRA_FLAGS} + --x86asmexe=yasm + ) + endif() else() set(FFMPEG_EXTRA_FLAGS ${FFMPEG_EXTRA_FLAGS} @@ -58,6 +57,11 @@ ExternalProject_Add(external_ffmpeg URL ${FFMPEG_URI} DOWNLOAD_DIR ${DOWNLOAD_DIR} URL_HASH MD5=${FFMPEG_HASH} + # OpenJpeg is compiled with pthread support on Linux, which is all fine and is what we + # want for maximum runtime performance, but due to static nature of that library we + # need to force ffmpeg to link against pthread, otherwise test program used by autoconf + # will fail. This patch does that in a way that is compatible with multiple distributions. + PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/ffmpeg/src/external_ffmpeg < ${PATCH_DIR}/ffmpeg.diff PREFIX ${BUILD_DIR}/ffmpeg CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && diff --git a/build_files/build_environment/cmake/harvest.cmake b/build_files/build_environment/cmake/harvest.cmake index 57b76fdd1bd..e79bab3354a 100644 --- a/build_files/build_environment/cmake/harvest.cmake +++ b/build_files/build_environment/cmake/harvest.cmake @@ -31,9 +31,6 @@ if(BUILD_MODE STREQUAL Release) COMMAND # jpeg rename libfile + copy include ${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib && ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpg/include/ ${HARVEST_TARGET}/jpeg/include/ && - # pthreads, rename include dir - ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/inc/ ${HARVEST_TARGET}/pthreads/include/ && - ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/lib/ ${HARVEST_TARGET}/pthreads/lib && # OpenImageIO ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/include ${HARVEST_TARGET}/OpenImageIO/include && ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/lib ${HARVEST_TARGET}/OpenImageIO/lib && diff --git a/build_files/build_environment/cmake/lcms.cmake b/build_files/build_environment/cmake/lcms.cmake index f67a85c3721..852d2b8d04c 100644 --- a/build_files/build_environment/cmake/lcms.cmake +++ b/build_files/build_environment/cmake/lcms.cmake @@ -29,10 +29,3 @@ ExternalProject_Add(external_lcms CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/lcms ${DEFAULT_CMAKE_FLAGS} ${LCMS_EXTRA_ARGS} INSTALL_DIR ${LIBDIR}/lcms ) - -#if(BUILD_MODE STREQUAL Release AND WIN32) - #ExternalProject_Add_Step(external_freetype after_install - # COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freetype ${HARVEST_TARGET}/freetype - # DEPENDEES install - #) -#endif() diff --git a/build_files/build_environment/cmake/llvm.cmake b/build_files/build_environment/cmake/llvm.cmake index 7390b1bf011..1aa31bc9d32 100644 --- a/build_files/build_environment/cmake/llvm.cmake +++ b/build_files/build_environment/cmake/llvm.cmake @@ -47,9 +47,7 @@ if(MSVC) set(LLVM_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/ ${HARVEST_TARGET}/llvm/ ) else() set(LLVM_HARVEST_COMMAND - ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ && - ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/bin/ ${HARVEST_TARGET}/llvm/debug/bin/ && - ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/include/ ${HARVEST_TARGET}/llvm/debug/include/ + ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ ) endif() ExternalProject_Add_Step(ll after_install diff --git a/build_files/build_environment/cmake/lzma.cmake b/build_files/build_environment/cmake/lzma.cmake new file mode 100644 index 00000000000..ef8adde2930 --- /dev/null +++ b/build_files/build_environment/cmake/lzma.cmake @@ -0,0 +1,32 @@ +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# ***** END GPL LICENSE BLOCK ***** + +set(LZMA_PATCH_CMD echo .) + +ExternalProject_Add(external_lzma + URL ${LZMA_URI} + DOWNLOAD_DIR ${DOWNLOAD_DIR} + URL_HASH SHA256=${LZMA_HASH} + PREFIX ${BUILD_DIR}/lzma + PATCH_COMMAND ${LZMA_PATCH_CMD} + CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lzma + --disable-shared + BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && make -j${MAKE_THREADS} + INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && make install + INSTALL_DIR ${LIBDIR}/lzma +) diff --git a/build_files/build_environment/cmake/openvdb.cmake b/build_files/build_environment/cmake/openvdb.cmake index a9533a89b1b..a550ed5decb 100644 --- a/build_files/build_environment/cmake/openvdb.cmake +++ b/build_files/build_environment/cmake/openvdb.cmake @@ -60,6 +60,12 @@ if(WIN32) -DOPENEXR_NAMESPACE_VERSIONING=OFF -DEXTRA_LIBS:FILEPATH=${LIBDIR}/pthreads/lib/pthreadVC2.lib ) + if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4") + set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS} + -DCMAKE_SHARED_LINKER_FLAGS="/safeseh:no" + -DCMAKE_EXE_LINKER_FLAGS="/safeseh:no" + ) + endif() endif() ExternalProject_Add(openvdb diff --git a/build_files/build_environment/cmake/options.cmake b/build_files/build_environment/cmake/options.cmake index b8efb1bda95..7bf971208ae 100644 --- a/build_files/build_environment/cmake/options.cmake +++ b/build_files/build_environment/cmake/options.cmake @@ -59,7 +59,7 @@ if(WIN32) if(MSVC_VERSION GREATER 1909) set(COMMON_MSVC_FLAGS "/Wv:18") #some deps with warnings as error aren't quite ready for dealing with the new 2017 warnings. endif() - + set(COMMON_MSVC_FLAGS "${COMMON_MSVC_FLAGS} /bigobj") if(WITH_OPTIMIZED_DEBUG) set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS") else() @@ -147,13 +147,13 @@ else() endif() if(WITH_OPTIMIZED_DEBUG) - set(BLENDER_CMAKE_C_FLAGS_DEBUG "-O2 -DNDEBUG") + set(BLENDER_CMAKE_C_FLAGS_DEBUG "-O2 -DNDEBUG ${PLATFORM_CFLAGS}") else() - set(BLENDER_CMAKE_C_FLAGS_DEBUG "-g") + set(BLENDER_CMAKE_C_FLAGS_DEBUG "-g ${PLATFORM_CFLAGS}") endif() - set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG") - set(BLENDER_CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG") - set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG") + set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG ${PLATFORM_CFLAGS}") + set(BLENDER_CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG ${PLATFORM_CFLAGS}") + set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG ${PLATFORM_CFLAGS}") if(WITH_OPTIMIZED_DEBUG) set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}") diff --git a/build_files/build_environment/cmake/osl.cmake b/build_files/build_environment/cmake/osl.cmake index ab9027fedb7..469f0eee69d 100644 --- a/build_files/build_environment/cmake/osl.cmake +++ b/build_files/build_environment/cmake/osl.cmake @@ -73,17 +73,23 @@ set(OSL_EXTRA_ARGS -DUSE_LLVM_BITCODE=OFF -DUSE_PARTIO=OFF ${OSL_SIMD_FLAGS} - -DPUGIXML_HOME=${LIBDIR}/pugixml -DPARTIO_LIBRARIES= ) +if(WIN32) +set(OSL_EXTRA_ARGS + ${OSL_EXTRA_FLAGS} + -DPUGIXML_HOME=${LIBDIR}/pugixml +) +endif() + ExternalProject_Add(external_osl URL ${OSL_URI} DOWNLOAD_DIR ${DOWNLOAD_DIR} LIST_SEPARATOR ^^ URL_HASH MD5=${OSL_HASH} PREFIX ${BUILD_DIR}/osl - PATCH_COMMAND ${PATCH_CMD} -p 3 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl.diff + PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl.diff # ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl_simd_oiio.diff CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/osl -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ${DEFAULT_CMAKE_FLAGS} ${OSL_EXTRA_ARGS} INSTALL_DIR ${LIBDIR}/osl diff --git a/build_files/build_environment/cmake/pthreads.cmake b/build_files/build_environment/cmake/pthreads.cmake index c93f0866aa9..66246c5ee90 100644 --- a/build_files/build_environment/cmake/pthreads.cmake +++ b/build_files/build_environment/cmake/pthreads.cmake @@ -43,4 +43,13 @@ if(WIN32) ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/semaphore.h ${LIBDIR}/pthreads/inc/semaphore.h INSTALL_DIR ${LIBDIR}/pthreads ) + + if(BUILD_MODE STREQUAL Release) + ExternalProject_Add_Step(external_pthreads after_install + COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/inc/ ${HARVEST_TARGET}/pthreads/include/ + COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/lib/ ${HARVEST_TARGET}/pthreads/lib + DEPENDEES install + ) + endif() + endif() diff --git a/build_files/build_environment/cmake/python.cmake b/build_files/build_environment/cmake/python.cmake index 3fbf3a40868..cf928ecd794 100644 --- a/build_files/build_environment/cmake/python.cmake +++ b/build_files/build_environment/cmake/python.cmake @@ -88,9 +88,19 @@ else() set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python.exe) #set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_apple.diff) set(PYTHON_PATCH echo .) + set(PYTHON_CONFIGURE_EXTRA_ENV echo .) + set(PYTHON_CONFIGURE_EXTRA_ARGS) else() + set(PYTHON_CONFIGURE_EXTRA_ARGS "--with-openssl=${LIBDIR}/ssl") set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV}) + set(PYTHON_CFLAGS "-I${LIBDIR}/sqlite/include -I${LIBDIR}/bzip2/include -I${LIBDIR}/lzma/include -I${LIBDIR}/zlib/include") + set(PYTHON_LDFLAGS "-L${LIBDIR}/sqlite/lib -L${LIBDIR}/bzip2/lib -L${LIBDIR}/lzma/lib -L${LIBDIR}/zlib/lib") + set(PYTHON_CONFIGURE_EXTRA_ENV + export CFLAGS=${PYTHON_CFLAGS} && + export CPPFLAGS=${PYTHON_CFLAGS} && + export LDFLAGS=${PYTHON_LDFLAGS}) set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python) + set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_linux.diff) endif() ExternalProject_Add(external_python @@ -99,7 +109,7 @@ else() URL_HASH MD5=${PYTHON_HASH} PREFIX ${BUILD_DIR}/python PATCH_COMMAND ${PYTHON_PATCH} - CONFIGURE_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/python + CONFIGURE_COMMAND ${PYTHON_CONFIGURE_ENV} && ${PYTHON_CONFIGURE_EXTRA_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/python ${PYTHON_CONFIGURE_EXTRA_ARGS} BUILD_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make -j${MAKE_THREADS} INSTALL_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make install INSTALL_DIR ${LIBDIR}/python) @@ -162,3 +172,15 @@ if(MSVC) ) add_custom_target(Make_Python_Environment ALL DEPENDS ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe Package_Python) endif() + +if(UNIX AND NOT APPLE) + add_dependencies( + external_python + external_bzip2 + external_ffi + external_lzma + external_ssl + external_sqlite + external_zlib + ) +endif() diff --git a/build_files/build_environment/cmake/python.map b/build_files/build_environment/cmake/python.map new file mode 100644 index 00000000000..1c11c33011d --- /dev/null +++ b/build_files/build_environment/cmake/python.map @@ -0,0 +1,9 @@ +{ +global: + Py*; + _Py*; + _py*; +local: + *; +}; + diff --git a/build_files/build_environment/cmake/setup_mingw32.cmake b/build_files/build_environment/cmake/setup_mingw32.cmake index ece12ddc179..afb44e8e88d 100644 --- a/build_files/build_environment/cmake/setup_mingw32.cmake +++ b/build_files/build_environment/cmake/setup_mingw32.cmake @@ -49,7 +49,7 @@ if(NOT EXISTS "${DOWNLOAD_DIR}/mingw") endif() # extract mingw32 -if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/mingw32env.cmd") AND (EXISTS "${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z")) +if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/ming32sh.cmd") AND (EXISTS "${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z")) message("Extracting mingw32") execute_process( COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z diff --git a/build_files/build_environment/cmake/sqlite.cmake b/build_files/build_environment/cmake/sqlite.cmake new file mode 100644 index 00000000000..e5aa124a414 --- /dev/null +++ b/build_files/build_environment/cmake/sqlite.cmake @@ -0,0 +1,57 @@ +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# ***** END GPL LICENSE BLOCK ***** + +set(SQLITE_CONFIGURE_ENV echo .) +set(SQLITE_CONFIGURATION_ARGS) + +if(UNIX AND NOT APPLE) + set(SQLITE_LDFLAGS -Wl,--as-needed) + set(SQLITE_CFLAGS + "-DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_COLUMN_METADATA \ + -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS \ + -DSQLITE_ENABLE_RTREE=1 -DSQLITE_SOUNDEX=1 \ + -DSQLITE_ENABLE_UNLOCK_NOTIFY \ + -DSQLITE_OMIT_LOOKASIDE=1 -DSQLITE_ENABLE_DBSTAT_VTAB \ + -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 \ + -DSQLITE_ENABLE_LOAD_EXTENSION \ + -DSQLITE_ENABLE_JSON1 \ + -DSQLITE_LIKE_DOESNT_MATCH_BLOBS \ + -DSQLITE_THREADSAFE=1 \ + -DSQLITE_ENABLE_FTS3_TOKENIZER=1 \ + -DSQLITE_MAX_SCHEMA_RETRY=25 \ + -DSQLITE_ENABLE_PREUPDATE_HOOK \ + -DSQLITE_ENABLE_SESSION \ + -DSQLITE_ENABLE_STMTVTAB \ + -DSQLITE_MAX_VARIABLE_NUMBER=250000 \ + -fPIC") + set(SQLITE_CONFIGURE_ENV ${SQLITE_CONFIGURE_ENV} && export LDFLAGS=${SQLITE_LDFLAGS} && export CFLAGS=${SQLITE_CFLAGS}) + set(SQLITE_CONFIGURATION_ARGS ${SQLITE_CONFIGURATION_ARGS} --enable-threadsafe --enable-load-extension --enable-json1 --enable-fts4 --enable-fts5 + --enable-shared=no) +endif() + +ExternalProject_Add(external_sqlite + URL ${SQLITE_URI} + DOWNLOAD_DIR ${DOWNLOAD_DIR} + URL_HASH SHA1=${SQLITE_HASH} + PREFIX ${BUILD_DIR}/sqlite + PATCH_COMMAND ${SQLITE_PATCH_CMD} + CONFIGURE_COMMAND ${SQLITE_CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/sqlite ${SQLITE_CONFIGURATION_ARGS} + BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make -j${MAKE_THREADS} + INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make install + INSTALL_DIR ${LIBDIR}/sqlite +) diff --git a/build_files/build_environment/cmake/ssl.cmake b/build_files/build_environment/cmake/ssl.cmake new file mode 100644 index 00000000000..dd1b9957cc2 --- /dev/null +++ b/build_files/build_environment/cmake/ssl.cmake @@ -0,0 +1,44 @@ +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# ***** END GPL LICENSE BLOCK ***** + +set(SSL_CONFIGURE_COMMAND ./Configure) +set(SSL_PATCH_CMD echo .) + +if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") + set(SSL_EXTRA_ARGS enable-ec_nistp_64_gcc_128) + set(SSL_OS_COMPILER "blender-x86_64") +else() + set(SSL_OS_COMPILER "blender-x86") +endif() + +ExternalProject_Add(external_ssl + URL ${SSL_URI} + DOWNLOAD_DIR ${DOWNLOAD_DIR} + URL_HASH SHA256=${SSL_HASH} + PREFIX ${BUILD_DIR}/ssl + PATCH_COMMAND ${SSL_PATCH_CMD} + CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && ${SSL_CONFIGURE_COMMAND} --prefix=${LIBDIR}/ssl + --openssldir=${LIBDIR}/ssl + no-shared + no-idea no-mdc2 no-rc5 no-zlib no-ssl3 enable-unit-test no-ssl3-method enable-rfc3779 enable-cms + --config=${CMAKE_CURRENT_SOURCE_DIR}/cmake/ssl.conf + ${SSL_OS_COMPILER} + BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && make -j${MAKE_THREADS} + INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && make install + INSTALL_DIR ${LIBDIR}/ssl +) diff --git a/build_files/build_environment/cmake/ssl.conf b/build_files/build_environment/cmake/ssl.conf new file mode 100644 index 00000000000..a9534e56291 --- /dev/null +++ b/build_files/build_environment/cmake/ssl.conf @@ -0,0 +1,10 @@ +%targets = ( + "blender-x86" => { + inherit_from => [ "linux-x86" ], + cflags => add("-fPIC"), + }, + "blender-x86_64" => { + inherit_from => [ "linux-x86_64" ], + cflags => add("-fPIC"), + }, +); diff --git a/build_files/build_environment/cmake/tinyxml.cmake b/build_files/build_environment/cmake/tinyxml.cmake index fb28e7cce2f..9c7d0397c78 100644 --- a/build_files/build_environment/cmake/tinyxml.cmake +++ b/build_files/build_environment/cmake/tinyxml.cmake @@ -29,10 +29,3 @@ ExternalProject_Add(external_tinyxml CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tinyxml ${DEFAULT_CMAKE_FLAGS} ${TINYXML_EXTRA_ARGS} INSTALL_DIR ${LIBDIR}/tinyxml ) - -#if(BUILD_MODE STREQUAL Release AND WIN32) - #ExternalProject_Add_Step(external_freetype after_install - # COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freetype ${HARVEST_TARGET}/freetype - # DEPENDEES install - #) -#endif() diff --git a/build_files/build_environment/cmake/versions.cmake b/build_files/build_environment/cmake/versions.cmake index 594aa990d31..7ede80a2be9 100644 --- a/build_files/build_environment/cmake/versions.cmake +++ b/build_files/build_environment/cmake/versions.cmake @@ -274,3 +274,27 @@ set(PUGIXML_HASH 9346ca1dce2c48f1748c12fdac41a714) set(FLEXBISON_VERSION 2.5.5) set(FLEXBISON_URI http://prdownloads.sourceforge.net/winflexbison//win_flex_bison-2.5.5.zip) set(FLEXBISON_HASH d87a3938194520d904013abef3df10ce) + +# Libraries to keep Python modules static on Linux. + +# NOTE: bzip.org domain does no longer belong to BZip 2 project, so we download +# sources from Debian packaging. +set(BZIP2_VERSION 1.0.6) +set(BZIP2_URI http://http.debian.net/debian/pool/main/b/bzip2/bzip2_${BZIP2_VERSION}.orig.tar.bz2) +set(BZIP2_HASH d70a9ccd8bdf47e302d96c69fecd54925f45d9c7b966bb4ef5f56b770960afa7) + +set(FFI_VERSION 3.2.1) +set(FFI_URI ftp://sourceware.org/pub/libffi/libffi-${FFI_VERSION}.tar.gz) +set(FFI_HASH d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37) + +set(LZMA_VERSION 5.2.4) +set(LZMA_URI https://tukaani.org/xz/xz-${LZMA_VERSION}.tar.bz2) +set(LZMA_HASH 3313fd2a95f43d88e44264e6b015e7d03053e681860b0d5d3f9baca79c57b7bf) + +set(SSL_VERSION 1.1.0i) +set(SSL_URI https://www.openssl.org/source/openssl-${SSL_VERSION}.tar.gz) +set(SSL_HASH ebbfc844a8c8cc0ea5dc10b86c9ce97f401837f3fa08c17b2cdadc118253cf99) + +set(SQLITE_VERSION 3.24.0) +set(SQLITE_URI https://www.sqlite.org/2018/sqlite-src-3240000.zip) +set(SQLITE_HASH fb558c49ee21a837713c4f1e7e413309aabdd9c7) diff --git a/build_files/build_environment/cmake/yamlcpp.cmake b/build_files/build_environment/cmake/yamlcpp.cmake index 308f7d88361..617158ff40a 100644 --- a/build_files/build_environment/cmake/yamlcpp.cmake +++ b/build_files/build_environment/cmake/yamlcpp.cmake @@ -32,10 +32,3 @@ ExternalProject_Add(external_yamlcpp CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/yamlcpp ${DEFAULT_CMAKE_FLAGS} ${YAMLCPP_EXTRA_ARGS} INSTALL_DIR ${LIBDIR}/yamlcpp ) - -#if(BUILD_MODE STREQUAL Release AND WIN32) - #ExternalProject_Add_Step(external_freetype after_install - # COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freetype ${HARVEST_TARGET}/freetype - # DEPENDEES install - #) -#endif() diff --git a/build_files/build_environment/cmake/zlib.cmake b/build_files/build_environment/cmake/zlib.cmake index b768293487a..7bf1c45e359 100644 --- a/build_files/build_environment/cmake/zlib.cmake +++ b/build_files/build_environment/cmake/zlib.cmake @@ -46,4 +46,10 @@ else() DEPENDEES install ) endif() + if (UNIX AND NOT APPLE) + ExternalProject_Add_Step(external_zlib after_install + COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/libz.a ${LIBDIR}/zlib/lib/libz_pic.a + DEPENDEES install + ) + endif() endif() diff --git a/build_files/build_environment/patches/ffmpeg.diff b/build_files/build_environment/patches/ffmpeg.diff new file mode 100644 index 00000000000..960728ae980 --- /dev/null +++ b/build_files/build_environment/patches/ffmpeg.diff @@ -0,0 +1,11 @@ +--- a/configure 2018-08-27 13:46:41.071106150 +0200 ++++ b/configure 2018-08-27 13:46:28.162765762 +0200 +@@ -6013,7 +6013,7 @@ + require_pkg_config libopencv opencv opencv/cxcore.h cvCreateImageHeader; } + enabled libopenh264 && require_pkg_config libopenh264 openh264 wels/codec_api.h WelsGetCodecVersion + enabled libopenjpeg && { check_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version || +- { require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } } ++ { require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version "-DOPJ_STATIC $pthreads_extralibs $libm_extralibs" && add_cppflags "-DOPJ_STATIC $pthreads_extralibs $libm_extralibs"; } } + enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++" + enabled libopus && { + enabled libopus_decoder && { diff --git a/build_files/build_environment/patches/osl.diff b/build_files/build_environment/patches/osl.diff index fcb5ec4165f..36cda06f394 100644 --- a/build_files/build_environment/patches/osl.diff +++ b/build_files/build_environment/patches/osl.diff @@ -1,6 +1,6 @@ -diff -Naur osl/src/external_osl/src/cmake/flexbison.cmake osl_bak/src/external_osl/src/cmake/flexbison.cmake ---- osl/src/external_osl//src/cmake/flexbison.cmake 2016-01-29 11:15:22 -0700 -+++ osl_bak/src/external_osl/src/cmake/flexbison.cmake 2016-02-29 21:26:26 -0700 +diff -Naur OpenShadingLanguage-Release-1.9.9/src/cmake/flexbison.cmake external_osl/src/cmake/flexbison.cmake +--- OpenShadingLanguage-Release-1.9.9/src/cmake/flexbison.cmake 2018-05-01 16:39:02 -0600 ++++ external_osl/src/cmake/flexbison.cmake 2018-08-23 15:42:27 -0600 @@ -77,7 +77,7 @@ DEPENDS ${${compiler_headers}} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) @@ -10,3 +10,65 @@ diff -Naur osl/src/external_osl/src/cmake/flexbison.cmake osl_bak/src/external_o MAIN_DEPENDENCY ${flexsrc} DEPENDS ${${compiler_headers}} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) +diff -Naur OpenShadingLanguage-Release-1.9.9/src/cmake/flexbison.cmake.rej external_osl/src/cmake/flexbison.cmake.rej +--- OpenShadingLanguage-Release-1.9.9/src/cmake/flexbison.cmake.rej 1969-12-31 17:00:00 -0700 ++++ external_osl/src/cmake/flexbison.cmake.rej 2018-08-24 17:42:11 -0600 +@@ -0,0 +1,11 @@ ++--- src/cmake/flexbison.cmake 2018-05-01 16:39:02 -0600 +++++ src/cmake/flexbison.cmake 2018-08-24 10:24:03 -0600 ++@@ -77,7 +77,7 @@ ++ DEPENDS ${${compiler_headers}} ++ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) ++ ADD_CUSTOM_COMMAND ( OUTPUT ${flexoutputcxx} ++- COMMAND ${FLEX_EXECUTABLE} -o ${flexoutputcxx} "${CMAKE_CURRENT_SOURCE_DIR}/${flexsrc}" +++ COMMAND ${FLEX_EXECUTABLE} ${FLEX_EXTRA_OPTIONS} -o ${flexoutputcxx} "${CMAKE_CURRENT_SOURCE_DIR}/${flexsrc}" ++ MAIN_DEPENDENCY ${flexsrc} ++ DEPENDS ${${compiler_headers}} ++ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) +diff -Naur OpenShadingLanguage-Release-1.9.9/src/include/OSL/llvm_util.h external_osl/src/include/OSL/llvm_util.h +--- OpenShadingLanguage-Release-1.9.9/src/include/OSL/llvm_util.h 2018-05-01 16:39:02 -0600 ++++ external_osl/src/include/OSL/llvm_util.h 2018-08-25 14:05:00 -0600 +@@ -33,6 +33,8 @@ + + #include <vector> + ++#define OSL_HAS_BLENDER_CLEANUP_FIX ++ + #ifdef LLVM_NAMESPACE + namespace llvm = LLVM_NAMESPACE; + #endif +@@ -487,6 +489,7 @@ + std::string func_name (llvm::Function *f); + + static size_t total_jit_memory_held (); ++ static void Cleanup (); + + private: + class MemoryManager; +diff -Naur OpenShadingLanguage-Release-1.9.9/src/include/OSL/oslnoise.h external_osl/src/include/OSL/oslnoise.h +--- OpenShadingLanguage-Release-1.9.9/src/include/OSL/oslnoise.h 2018-05-01 16:39:02 -0600 ++++ external_osl/src/include/OSL/oslnoise.h 2018-08-24 17:42:11 -0600 +@@ -762,7 +762,7 @@ + // packed into a float4. We assume T is float and VECTYPE is float4, + // but it also works if T is Dual2<float> and VECTYPE is Dual2<float4>. + template<typename T, typename VECTYPE> +-OIIO_FORCEINLINE T bilerp (VECTYPE abcd, T u, T v) { ++OIIO_FORCEINLINE T bilerp (VECTYPE& abcd, T u, T v) { + VECTYPE xx = OIIO::lerp (abcd, OIIO::simd::shuffle<1,1,3,3>(abcd), u); + return OIIO::simd::extract<0>(OIIO::lerp (xx,OIIO::simd::shuffle<2>(xx), v)); + } +diff -Naur OpenShadingLanguage-Release-1.9.9/src/liboslexec/llvm_util.cpp external_osl/src/liboslexec/llvm_util.cpp +--- OpenShadingLanguage-Release-1.9.9/src/liboslexec/llvm_util.cpp 2018-05-01 16:39:02 -0600 ++++ external_osl/src/liboslexec/llvm_util.cpp 2018-08-25 14:04:27 -0600 +@@ -140,7 +140,10 @@ + }; + + +- ++void LLVM_Util::Cleanup () ++{ ++ jitmm_hold.clear(); ++} + + size_t + LLVM_Util::total_jit_memory_held () diff --git a/build_files/build_environment/patches/python_linux.diff b/build_files/build_environment/patches/python_linux.diff new file mode 100644 index 00000000000..24d625c7ceb --- /dev/null +++ b/build_files/build_environment/patches/python_linux.diff @@ -0,0 +1,38 @@ +diff --git a/setup.py.orig b/setup.py +index a97a755..07ce853 100644 +--- a/setup.py.orig ++++ b/setup.py +@@ -1422,13 +1422,13 @@ class PyBuildExt(build_ext): + version = line.split()[2] + break + if version >= version_req: +- if (self.compiler.find_library_file(lib_dirs, 'z')): ++ if (self.compiler.find_library_file(lib_dirs, 'z_pic')): + if host_platform == "darwin": + zlib_extra_link_args = ('-Wl,-search_paths_first',) + else: + zlib_extra_link_args = () + exts.append( Extension('zlib', ['zlibmodule.c'], +- libraries = ['z'], ++ libraries = ['z_pic'], + extra_link_args = zlib_extra_link_args)) + have_zlib = True + else: +@@ -1442,7 +1442,7 @@ class PyBuildExt(build_ext): + # crc32 if we have it. Otherwise binascii uses its own. + if have_zlib: + extra_compile_args = ['-DUSE_ZLIB_CRC32'] +- libraries = ['z'] ++ libraries = ['z_pic'] + extra_link_args = zlib_extra_link_args + else: + extra_compile_args = [] +@@ -1991,7 +1991,7 @@ class PyBuildExt(build_ext): + print('Header file {} does not exist'.format(ffi_h)) + ffi_lib = None + if ffi_inc is not None: +- for lib_name in ('ffi', 'ffi_pic'): ++ for lib_name in ('ffi_pic', ): + if (self.compiler.find_library_file(lib_dirs, lib_name)): + ffi_lib = lib_name + break |