diff options
| author | yurybura <yurybura@gmail.com> | 2020-03-02 21:41:27 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-02 10:41:27 -0800 |
| commit | 1c414f9192e49963c15bd64cdc2eb308cd046194 (patch) | |
| tree | 0a3d9b95298e2d6fa94817bfc4211bc13aa641ae | |
| parent | 1e697e97daf199ac52b5e154bbb9b1a6511aaf2e (diff) | |
| download | vcpkg-1c414f9192e49963c15bd64cdc2eb308cd046194.tar.gz vcpkg-1c414f9192e49963c15bd64cdc2eb308cd046194.zip | |
[boost-python] Try to fix build issue on Linux (#9780)
* [boost-python] Try to fix build issue on Linux
* Update baseline: enable boost-python:x64-linux
* Fix number of processor detection on Linux: use CMake module
* Fix user-config.jam configuration on Linux
* Update baseline: enable boost-mpi:x64-linux
* Fix build boost-regex[icu] on Linux, issue #4962
| -rw-r--r-- | ports/boost-modular-build-helper/CMakeLists.txt | 13 | ||||
| -rw-r--r-- | ports/boost-modular-build-helper/boost-modular-build.cmake | 40 | ||||
| -rw-r--r-- | ports/boost-modular-build-helper/user-config.jam | 41 | ||||
| -rw-r--r-- | ports/boost-python/CONTROL | 4 | ||||
| -rw-r--r-- | ports/boost-python/portfile.cmake | 13 | ||||
| -rw-r--r-- | scripts/boost/generate-ports.ps1 | 6 | ||||
| -rw-r--r-- | scripts/boost/post-source-stubs/python.cmake | 13 | ||||
| -rw-r--r-- | scripts/ci.baseline.txt | 2 |
8 files changed, 76 insertions, 56 deletions
diff --git a/ports/boost-modular-build-helper/CMakeLists.txt b/ports/boost-modular-build-helper/CMakeLists.txt index dfdd6374e..8c91184a4 100644 --- a/ports/boost-modular-build-helper/CMakeLists.txt +++ b/ports/boost-modular-build-helper/CMakeLists.txt @@ -122,17 +122,8 @@ endif() configure_file(${CMAKE_CURRENT_LIST_DIR}/user-config.jam ${CMAKE_CURRENT_BINARY_DIR}/user-config.jam @ONLY)
-set(NUMBER_OF_PROCESSORS 1)
-if(DEFINED ENV{NUMBER_OF_PROCESSORS})
- set(NUMBER_OF_PROCESSORS $ENV{NUMBER_OF_PROCESSORS})
-elseif(CMAKE_HOST_LINUX)
- execute_process(
- COMMAND nproc
- OUTPUT_VARIABLE NUMBER_OF_PROCESSORS
- )
- string(REPLACE "\n" "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}")
- string(REPLACE " " "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}")
-endif()
+include(ProcessorCount)
+ProcessorCount(NUMBER_OF_PROCESSORS)
if(NOT NUMBER_OF_PROCESSORS)
set(NUMBER_OF_PROCESSORS 1)
endif()
diff --git a/ports/boost-modular-build-helper/boost-modular-build.cmake b/ports/boost-modular-build-helper/boost-modular-build.cmake index d5529c127..f254cb5a3 100644 --- a/ports/boost-modular-build-helper/boost-modular-build.cmake +++ b/ports/boost-modular-build-helper/boost-modular-build.cmake @@ -75,17 +75,35 @@ function(boost_modular_build) # endif()
if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ set(configure_option)
if(DEFINED _bm_BOOST_CMAKE_FRAGMENT)
- set(fragment_option "-DBOOST_CMAKE_FRAGMENT=${_bm_BOOST_CMAKE_FRAGMENT}")
+ list(APPEND configure_option "-DBOOST_CMAKE_FRAGMENT=${_bm_BOOST_CMAKE_FRAGMENT}")
+ endif()
+ if(DEFINED VCPKG_PYTHON_EXECUTABLE)
+ list(APPEND configure_option "-DVCPKG_PYTHON_EXECUTABLE=${VCPKG_PYTHON_EXECUTABLE}")
+ endif()
+ if(DEFINED VCPKG_PYTHON_INCLUDE)
+ list(APPEND configure_option "-DVCPKG_PYTHON_INCLUDE=${VCPKG_PYTHON_INCLUDE}")
+ endif()
+ if(DEFINED VCPKG_PYTHON_LIBS_RELEASE)
+ list(APPEND configure_option "-DVCPKG_PYTHON_LIBS_RELEASE=${VCPKG_PYTHON_LIBS_RELEASE}")
+ endif()
+ if(DEFINED VCPKG_PYTHON_LIBS_DEBUG)
+ list(APPEND configure_option "-DVCPKG_PYTHON_LIBS_DEBUG=${VCPKG_PYTHON_LIBS_DEBUG}")
+ endif()
+ if(DEFINED VCPKG_PYTHON_VERSION)
+ list(APPEND configure_option "-DVCPKG_PYTHON_VERSION=${VCPKG_PYTHON_VERSION}")
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${CURRENT_INSTALLED_DIR}/share/boost-build
PREFER_NINJA
OPTIONS
+ "-DPORT=${PORT}"
+ "-DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR}"
"-DB2_EXE=${B2_EXE}"
"-DSOURCE_PATH=${_bm_SOURCE_PATH}"
"-DBOOST_BUILD_PATH=${BOOST_BUILD_PATH}"
- ${fragment_option}
+ ${configure_option}
)
vcpkg_install_cmake()
@@ -126,15 +144,10 @@ function(boost_modular_build) ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
)
- if(DEFINED ENV{NUMBER_OF_PROCESSORS})
- set(NUMBER_OF_PROCESSORS $ENV{NUMBER_OF_PROCESSORS})
- else()
- execute_process(
- COMMAND nproc
- OUTPUT_VARIABLE NUMBER_OF_PROCESSORS
- )
- string(REPLACE "\n" "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}")
- string(REPLACE " " "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}")
+ include(ProcessorCount)
+ ProcessorCount(NUMBER_OF_PROCESSORS)
+ if(NOT NUMBER_OF_PROCESSORS)
+ set(NUMBER_OF_PROCESSORS 1)
endif()
######################
@@ -195,7 +208,6 @@ function(boost_modular_build) list(APPEND _bm_OPTIONS_DBG "cxxflags=${VCPKG_CXX_FLAGS_DEBUG}")
endif()
-
if(VCPKG_C_FLAGS)
list(APPEND _bm_OPTIONS "cflags=${VCPKG_C_FLAGS}")
endif()
@@ -208,7 +220,6 @@ function(boost_modular_build) list(APPEND _bm_OPTIONS_DBG "cflags=${VCPKG_C_FLAGS_DEBUG}")
endif()
-
if(VCPKG_LINKER_FLAGS)
list(APPEND _bm_OPTIONS "linkflags=${VCPKG_LINKER_FLAGS}")
endif()
@@ -221,7 +232,6 @@ function(boost_modular_build) list(APPEND _bm_OPTIONS_DBG "linkflags=${VCPKG_LINKER_FLAGS_DEBUG}")
endif()
-
# Add build type specific options
if(VCPKG_CRT_LINKAGE STREQUAL "dynamic")
list(APPEND _bm_OPTIONS runtime-link=shared)
@@ -246,7 +256,7 @@ function(boost_modular_build) endif()
file(TO_CMAKE_PATH "${_bm_DIR}/nothing.bat" NOTHING_BAT)
- set(TOOLSET_OPTIONS " <cxxflags>/EHsc <compileflags>-Zm800 <compileflags>-nologo")
+ set(TOOLSET_OPTIONS "<cxxflags>/EHsc <compileflags>-Zm800 <compileflags>-nologo")
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
if(NOT VCPKG_PLATFORM_TOOLSET MATCHES "v140")
find_path(PATH_TO_CL cl.exe)
diff --git a/ports/boost-modular-build-helper/user-config.jam b/ports/boost-modular-build-helper/user-config.jam index 78677c0ab..9f485fee2 100644 --- a/ports/boost-modular-build-helper/user-config.jam +++ b/ports/boost-modular-build-helper/user-config.jam @@ -2,10 +2,11 @@ import toolset ; if "@VCPKG_PLATFORM_TOOLSET@" != "external"
{
- using msvc : : cl.exe :
- <setup>"@NOTHING_BAT@"
- @TOOLSET_OPTIONS@
- ;
+ using msvc : : cl.exe
+ :
+ <setup>"@NOTHING_BAT@"
+ @TOOLSET_OPTIONS@
+ ;
}
else
{
@@ -23,8 +24,8 @@ else if "@PORT@" = "boost-python"
{
- using python : @PYTHON_VERSION@ : : "@PYTHON_INCLUDE_PATH@" : "@PYTHONLIBS_RELEASE@" ;
- using python : @PYTHON_VERSION@ : : "@PYTHON_INCLUDE_PATH@" : "@PYTHONLIBS_DEBUG@" : <python-debugging>on ;
+ using python : @VCPKG_PYTHON_VERSION@ : "@VCPKG_PYTHON_EXECUTABLE@" : "@VCPKG_PYTHON_INCLUDE@" : "@VCPKG_PYTHON_LIBS_RELEASE@" ;
+ using python : @VCPKG_PYTHON_VERSION@ : "@VCPKG_PYTHON_EXECUTABLE@" : "@VCPKG_PYTHON_INCLUDE@" : "@VCPKG_PYTHON_LIBS_DEBUG@" : <python-debugging>on ;
}
if "@PORT@" = "boost-mpi"
@@ -37,16 +38,30 @@ if "@PORT@" = "boost-mpi" project user-config : ;
-lib advapi32 ;
+if "@VCPKG_PLATFORM_TOOLSET@" != "external"
+{
+ lib advapi32 ;
+
+ lib icuuc : : <file>"@CURRENT_INSTALLED_DIR@/lib/icuuc.lib" <variant>release : : <library>advapi32 ;
+ lib icuuc : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/icuucd.lib" <variant>debug : : <library>advapi32 ;
-lib icuuc : : <file>"@CURRENT_INSTALLED_DIR@/lib/icuuc.lib" <variant>release : : <library>advapi32 ;
-lib icuuc : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/icuucd.lib" <variant>debug : : <library>advapi32 ;
+ lib icuin : : <file>"@CURRENT_INSTALLED_DIR@/lib/icuin.lib" <variant>release : : ;
+ lib icuin : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/icuind.lib" <variant>debug : : ;
-lib icuin : : <file>"@CURRENT_INSTALLED_DIR@/lib/icuin.lib" <variant>release : : ;
-lib icuin : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/icuind.lib" <variant>debug : : ;
+ lib icudt : : <file>"@CURRENT_INSTALLED_DIR@/lib/icudt.lib" <variant>release : : ;
+ lib icudt : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/icudtd.lib" <variant>debug : : ;
+}
+else
+{
+ lib icuuc : : <file>"@CURRENT_INSTALLED_DIR@/lib/libicuuc.a" <variant>release : : ;
+ lib icuuc : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/libicuuc.a" <variant>debug : : ;
-lib icudt : : <file>"@CURRENT_INSTALLED_DIR@/lib/icudt.lib" <variant>release : : ;
-lib icudt : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/icudtd.lib" <variant>debug : : ;
+ lib icuin : : <file>"@CURRENT_INSTALLED_DIR@/lib/libicui18n.a" <variant>release : : ;
+ lib icuin : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/libicui18n.a" <variant>debug : : ;
+
+ lib icudt : : <file>"@CURRENT_INSTALLED_DIR@/lib/libicudata.a" <variant>release : : ;
+ lib icudt : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/libicudata.a" <variant>debug : : ;
+}
lib iconv : : <file>"@LIBICONV_LIBRARY@" <link>shared <runtime-link>shared <variant>release : : ;
lib iconv : : <file>"@LIBICONV_LIBRARY@" <link>shared <runtime-link>shared <variant>debug : : ;
diff --git a/ports/boost-python/CONTROL b/ports/boost-python/CONTROL index 84e4434a2..b1e0cba23 100644 --- a/ports/boost-python/CONTROL +++ b/ports/boost-python/CONTROL @@ -1,6 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-python
-Version: 1.72.0
-Build-Depends: boost-bind, boost-compatibility, boost-config, boost-conversion, boost-core, boost-detail, boost-foreach, boost-function, boost-graph, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-numeric-conversion, boost-preprocessor, boost-property-map, boost-smart-ptr, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers, python3 (!osx&!linux)
+Version: 1.72.0-1
+Build-Depends: boost-bind, boost-compatibility, boost-config, boost-conversion, boost-core, boost-detail, boost-foreach, boost-function, boost-graph, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-numeric-conversion, boost-preprocessor, boost-property-map, boost-smart-ptr, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers, python3
Homepage: https://github.com/boostorg/python
Description: Boost python module
diff --git a/ports/boost-python/portfile.cmake b/ports/boost-python/portfile.cmake index ec1f706a0..d81d6889c 100644 --- a/ports/boost-python/portfile.cmake +++ b/ports/boost-python/portfile.cmake @@ -10,11 +10,14 @@ vcpkg_from_github( HEAD_REF master
)
-# Find Python. Can't use find_package here, but we already know where everything is
-file(GLOB PYTHON_INCLUDE_PATH "${CURRENT_INSTALLED_DIR}/include/python3.*")
-set(PYTHONLIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib")
-set(PYTHONLIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib")
-string(REGEX REPLACE ".*python([0-9\.]+)$" "\\1" PYTHON_VERSION "${PYTHON_INCLUDE_PATH}")
+# Find Python3 executable
+vcpkg_find_acquire_program(PYTHON3)
+set(VCPKG_PYTHON_EXECUTABLE "${PYTHON3}")
+# Find Python3 libraries. Can't use find_package here, but we already know where everything is
+file(GLOB VCPKG_PYTHON_INCLUDE "${CURRENT_INSTALLED_DIR}/include/python3.*")
+set(VCPKG_PYTHON_LIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib")
+set(VCPKG_PYTHON_LIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib")
+string(REGEX REPLACE ".*python([0-9\.]+).*" "\\1" VCPKG_PYTHON_VERSION "${VCPKG_PYTHON_INCLUDE}")
include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake)
boost_modular_build(SOURCE_PATH ${SOURCE_PATH})
include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake)
diff --git a/scripts/boost/generate-ports.ps1 b/scripts/boost/generate-ports.ps1 index 36ddfe66e..ec32e53fb 100644 --- a/scripts/boost/generate-ports.ps1 +++ b/scripts/boost/generate-ports.ps1 @@ -46,9 +46,9 @@ function Generate() $controlDeps = ($Depends | sort) -join ", "
$versionSuffix = ""
- if ($Name -eq "iostreams")
+ if ($PortName -eq "iostreams" -or $PortName -eq "python")
{
- $versionsuffix = "-1"
+ $versionSuffix = "-1"
}
mkdir "$portsDir/boost-$PortName" -erroraction SilentlyContinue | out-null
@@ -363,7 +363,7 @@ foreach ($library in $libraries) if ($library -eq "python")
{
- $deps += @("python3 (!osx&!linux)")
+ $deps += @("python3")
$needsBuild = $true
}
elseif ($library -eq "iostreams")
diff --git a/scripts/boost/post-source-stubs/python.cmake b/scripts/boost/post-source-stubs/python.cmake index 5610c489d..5e2ae2b76 100644 --- a/scripts/boost/post-source-stubs/python.cmake +++ b/scripts/boost/post-source-stubs/python.cmake @@ -1,5 +1,8 @@ -# Find Python. Can't use find_package here, but we already know where everything is
-file(GLOB PYTHON_INCLUDE_PATH "${CURRENT_INSTALLED_DIR}/include/python3.*")
-set(PYTHONLIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib")
-set(PYTHONLIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib")
-string(REGEX REPLACE ".*python([0-9\.]+)$" "\\1" PYTHON_VERSION "${PYTHON_INCLUDE_PATH}")
+# Find Python3 executable
+vcpkg_find_acquire_program(PYTHON3)
+set(VCPKG_PYTHON_EXECUTABLE "${PYTHON3}")
+# Find Python3 libraries. Can't use find_package here, but we already know where everything is
+file(GLOB VCPKG_PYTHON_INCLUDE "${CURRENT_INSTALLED_DIR}/include/python3.*")
+set(VCPKG_PYTHON_LIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib")
+set(VCPKG_PYTHON_LIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib")
+string(REGEX REPLACE ".*python([0-9\.]+).*" "\\1" VCPKG_PYTHON_VERSION "${VCPKG_PYTHON_INCLUDE}")
diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 2d51cf546..6c459506b 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -171,8 +171,6 @@ boost-locale:arm-uwp=fail boost-locale:x64-uwp=fail
boost-log:arm-uwp=fail
boost-log:x64-uwp=fail
-boost-python:x64-linux=ignore
-boost-mpi:x64-linux=fail
boost-mpi:x64-osx=fail
boost-stacktrace:arm-uwp=fail
boost-stacktrace:x64-uwp=fail
|
