From c6b74d0683c7209fb7cf6f18130b4371672ce21d Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 26 Sep 2020 09:01:23 -0500 Subject: [PATCH 01/10] Add missing BOOST_ROOT to boot strap search. When the Jambase got ported we lost also searching BOOST_ROOT for the bootstrap file. This is strictly a backward compatibility fix for Boost. fixes #622 --- src/engine/startup.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/engine/startup.cpp b/src/engine/startup.cpp index f58625408..e7ab9438d 100644 --- a/src/engine/startup.cpp +++ b/src/engine/startup.cpp @@ -200,10 +200,12 @@ bool b2::startup::bootstrap(FRAME *frame) b2_file_path = path; } - // Check the BOOST_BUILD_PATH paths. + // Check the BOOST_BUILD_PATH (and BOOST_ROOT) paths. if (b2_file_path.empty()) { b2::jam::list BOOST_BUILD_PATH = b2::jam::variable{"BOOST_BUILD_PATH"}; + // For back-compat with Boost we also search in the BOOST_ROOT location. + BOOST_BUILD_PATH.append(b2::jam::list(b2::jam::variable{"BOOST_ROOT"})); for (auto search_path: BOOST_BUILD_PATH) { std::string path = b2::jam::object{search_path}; From 57f2b8602cf8f88b78c0036a792b2c506ff6eea1 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 26 Sep 2020 15:10:10 -0500 Subject: [PATCH 02/10] Extend tests to check bootstrap install. --- azure-pipelines.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e10e8ce88..6bb008ec6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -86,7 +86,11 @@ stages: CXX_PATH=`which ${CXX}` echo "using ${TEST_TOOLSET} : : ${CXX_PATH} ;" > ${HOME}/user-config.jam ./bootstrap.sh ${TOOLSET} - ./b2 --prefix=./.b2 install ${TEST_TOOLSET} + ./b2 --prefix=$HOME/temp/.b2 install ${TEST_TOOLSET} + rm ./b2 + export PATH=$HOME/temp/.b2/bin:$PATH + b2 -b + b2 --help displayName: Bootstrap - job: 'Windows' @@ -123,7 +127,11 @@ stages: $env:path += ';' + $env:CXX_PATH echo "using" $env:TEST_TOOLSET ":" ":" $env:CXX ";" > $env:HOME/user-config.jam ./bootstrap.bat $env:TOOLSET - ./b2.exe --debug-configuration --prefix=./.b2 install toolset=$env:TEST_TOOLSET + ./b2.exe --debug-configuration --prefix=$env:HOME/temp/.b2 install toolset=$env:TEST_TOOLSET + Remove-Item ./b2.exe + $env:path += $env:HOME/temp/.b2/bin ';' + $env:PATH + b2 -v + b2 --help displayName: Bootstrap - job: 'macOS' @@ -177,7 +185,11 @@ stages: CXX_PATH=`which ${CXX}` echo "using ${TEST_TOOLSET} : : ${CXX_PATH} ;" > ${HOME}/user-config.jam ./bootstrap.sh ${TOOLSET} - ./b2 --prefix=./.b2 install ${TEST_TOOLSET} + ./b2 --prefix=$HOME/temp/.b2 install ${TEST_TOOLSET} + rm ./b2 + export PATH=$HOME/temp/.b2/bin:$PATH + b2 -b + b2 --help displayName: Bootstrap - stage: Boost From f3e0a4d14af6d2ad8d404c4852528ade1ad32e81 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 26 Sep 2020 15:36:18 -0500 Subject: [PATCH 03/10] Fix some (power)shell syntax. --- azure-pipelines.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6bb008ec6..bdda3deb2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -89,8 +89,8 @@ stages: ./b2 --prefix=$HOME/temp/.b2 install ${TEST_TOOLSET} rm ./b2 export PATH=$HOME/temp/.b2/bin:$PATH - b2 -b - b2 --help + b2 -v + b2 -n --debug-configuration displayName: Bootstrap - job: 'Windows' @@ -112,26 +112,26 @@ stages: - powershell: | $env:HOME = $env:HOMEDRIVE + $env:HOMEPATH cd test - echo "using" $env:TEST_TOOLSET ":" ":" $env:CXX ";" > $env:HOME/user-config.jam + echo "using" $env:TEST_TOOLSET ":" ":" $env:CXX ";" > ${env:HOME}/user-config.jam python test_all.py $env:TEST_TOOLSET cd .. displayName: Test - powershell: | $env:HOME = $env:HOMEDRIVE + $env:HOMEPATH $env:path += ';' + $env:CXX_PATH - echo "using" $env:TEST_TOOLSET ":" ":" $env:CXX ";" > $env:HOME/user-config.jam + echo "using" $env:TEST_TOOLSET ":" ":" $env:CXX ";" > ${env:HOME}/user-config.jam ./src/engine/b2.exe --debug-configuration b2 warnings-as-errors=on variant=debug,release toolset=$env:TEST_TOOLSET displayName: "No Warnings" - powershell: | $env:HOME = $env:HOMEDRIVE + $env:HOMEPATH $env:path += ';' + $env:CXX_PATH - echo "using" $env:TEST_TOOLSET ":" ":" $env:CXX ";" > $env:HOME/user-config.jam + echo "using" $env:TEST_TOOLSET ":" ":" $env:CXX ";" > ${env:HOME}/user-config.jam ./bootstrap.bat $env:TOOLSET - ./b2.exe --debug-configuration --prefix=$env:HOME/temp/.b2 install toolset=$env:TEST_TOOLSET + ./b2.exe --debug-configuration --prefix=${env:HOME}/temp/.b2 install toolset=$env:TEST_TOOLSET Remove-Item ./b2.exe - $env:path += $env:HOME/temp/.b2/bin ';' + $env:PATH + $env:path += ${env:HOME}/temp/.b2/bin ';' + $env:PATH b2 -v - b2 --help + b2 -n --debug-configuration displayName: Bootstrap - job: 'macOS' @@ -188,8 +188,8 @@ stages: ./b2 --prefix=$HOME/temp/.b2 install ${TEST_TOOLSET} rm ./b2 export PATH=$HOME/temp/.b2/bin:$PATH - b2 -b - b2 --help + b2 -v + b2 -n --debug-configuration displayName: Bootstrap - stage: Boost From 1f352e0d14ee0561bde1f8ed3eaa8519ee758d98 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 26 Sep 2020 16:36:26 -0500 Subject: [PATCH 04/10] Another powershell syntax issue fixed. --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index bdda3deb2..63a499842 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -129,7 +129,7 @@ stages: ./bootstrap.bat $env:TOOLSET ./b2.exe --debug-configuration --prefix=${env:HOME}/temp/.b2 install toolset=$env:TEST_TOOLSET Remove-Item ./b2.exe - $env:path += ${env:HOME}/temp/.b2/bin ';' + $env:PATH + $env:path += $env:HOME + '/temp/.b2/bin' + ';' + $env:PATH b2 -v b2 -n --debug-configuration displayName: Bootstrap From b29603fa88a614835359168e70b5a44eae8e642c Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 26 Sep 2020 18:02:59 -0500 Subject: [PATCH 05/10] Fix path to bootstrap for back compat. fixes #650 --- azure-pipelines.yml | 3 +++ src/engine/startup.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 63a499842..f7719d8bb 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -89,6 +89,7 @@ stages: ./b2 --prefix=$HOME/temp/.b2 install ${TEST_TOOLSET} rm ./b2 export PATH=$HOME/temp/.b2/bin:$PATH + cd $HOME b2 -v b2 -n --debug-configuration displayName: Bootstrap @@ -130,6 +131,7 @@ stages: ./b2.exe --debug-configuration --prefix=${env:HOME}/temp/.b2 install toolset=$env:TEST_TOOLSET Remove-Item ./b2.exe $env:path += $env:HOME + '/temp/.b2/bin' + ';' + $env:PATH + cd $env:HOME b2 -v b2 -n --debug-configuration displayName: Bootstrap @@ -188,6 +190,7 @@ stages: ./b2 --prefix=$HOME/temp/.b2 install ${TEST_TOOLSET} rm ./b2 export PATH=$HOME/temp/.b2/bin:$PATH + cd $HOME b2 -v b2 -n --debug-configuration displayName: Bootstrap diff --git a/src/engine/startup.cpp b/src/engine/startup.cpp index e7ab9438d..d21f27af6 100644 --- a/src/engine/startup.cpp +++ b/src/engine/startup.cpp @@ -195,7 +195,7 @@ bool b2::startup::bootstrap(FRAME *frame) { const std::string path{ b2::paths::normalize( - b2_exe_path + "/../../share/boost-build/" + boost_build_jam)}; + b2_exe_path + "/../../share/boost-build/src/kernel/" + boost_build_jam)}; if (b2::filesys::is_file(path)) b2_file_path = path; } From 2f7f2922e372e7a172275be593e370c5ce087919 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 27 Sep 2020 12:24:37 -0500 Subject: [PATCH 06/10] Create empty build file to check if install works. --- azure-pipelines.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f7719d8bb..560d376b4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -90,6 +90,7 @@ stages: rm ./b2 export PATH=$HOME/temp/.b2/bin:$PATH cd $HOME + touch build.jam b2 -v b2 -n --debug-configuration displayName: Bootstrap @@ -132,6 +133,7 @@ stages: Remove-Item ./b2.exe $env:path += $env:HOME + '/temp/.b2/bin' + ';' + $env:PATH cd $env:HOME + echo $null >> build.jam b2 -v b2 -n --debug-configuration displayName: Bootstrap @@ -191,6 +193,7 @@ stages: rm ./b2 export PATH=$HOME/temp/.b2/bin:$PATH cd $HOME + touch build.jam b2 -v b2 -n --debug-configuration displayName: Bootstrap From 0b06096db752367ec30fd4d7f5f6df71561b13cc Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Sun, 11 Oct 2020 18:15:36 +0200 Subject: [PATCH 07/10] Fix encoding in copyright headers. (#662) --- src/tools/quickbook.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/quickbook.jam b/src/tools/quickbook.jam index 9870e9e41..72c8e609a 100644 --- a/src/tools/quickbook.jam +++ b/src/tools/quickbook.jam @@ -1,5 +1,5 @@ # -# Copyright (c) 2005 Joćo Abecasis +# Copyright (c) 2005 JoĆ£o Abecasis # Copyright (c) 2005 Vladimir Prus # Copyright (c) 2006 Rene Rivera # From 482c25f3a26171073c7e6c59f0427f2259a63fec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Ferdinand=20Rivera=20Morell?= Date: Thu, 22 Oct 2020 21:04:49 -0500 Subject: [PATCH 08/10] Minor fix for py3 compat. --- test/TestCmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/TestCmd.py b/test/TestCmd.py index 7b53e9f40..1a9907a7f 100644 --- a/test/TestCmd.py +++ b/test/TestCmd.py @@ -362,7 +362,7 @@ class TestCmd: directories to be preserved for all conditions. """ - if conditions is (): + if conditions == (): conditions = ('pass_test', 'fail_test', 'no_result') for cond in conditions: self._preserve[cond] = 1 From aea65c9c7a2303cbb40906e1d093728e52506a0d Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 14 Nov 2020 17:12:53 -0600 Subject: [PATCH 09/10] Update xcode test versions on AZP. --- azure-pipelines.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 560d376b4..be9086f38 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -147,9 +147,7 @@ stages: Xcode 11.4.1: {TOOLSET: clang, TEST_TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_11.4.1.app, VM_IMAGE: 'macOS-10.15'} Xcode 11.3.1: {TOOLSET: clang, TEST_TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_11.3.1.app, VM_IMAGE: 'macOS-10.15'} Xcode 11.3: {TOOLSET: clang, TEST_TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_11.3.app, VM_IMAGE: 'macOS-10.15'} - Xcode 11.2: {TOOLSET: clang, TEST_TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_11.2.app, VM_IMAGE: 'macOS-10.15'} - Xcode 11.1: {TOOLSET: clang, TEST_TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_11.1.app, VM_IMAGE: 'macOS-10.15'} - Xcode 11.0: {TOOLSET: clang, TEST_TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_11.app, VM_IMAGE: 'macOS-10.15'} + Xcode 11.2.1: {TOOLSET: clang, TEST_TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_11.2.1.app, VM_IMAGE: 'macOS-10.15'} Xcode 10.2.1: {TOOLSET: clang, TEST_TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_10.2.1.app, VM_IMAGE: 'macOS-10.14'} Xcode 10.2: {TOOLSET: clang, TEST_TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_10.2.app, VM_IMAGE: 'macOS-10.14'} Xcode 10.1: {TOOLSET: clang, TEST_TOOLSET: clang, CXX: clang++, XCODE_APP: /Applications/Xcode_10.1.app, VM_IMAGE: 'macOS-10.14'} From 550f99c84634539243e70931fb41a59b38743992 Mon Sep 17 00:00:00 2001 From: Miroslaw Stein Date: Sun, 15 Nov 2020 04:22:19 +0100 Subject: [PATCH 10/10] Fix memory leak in startup::bootstrap (boostorg#668) (#669) The executable_path allocates a string (strdup) which was never released Tested with ASAN and valgrind Co-authored-by: Miroslaw Stein --- src/engine/startup.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/engine/startup.cpp b/src/engine/startup.cpp index d21f27af6..64738a13c 100644 --- a/src/engine/startup.cpp +++ b/src/engine/startup.cpp @@ -155,7 +155,12 @@ bool b2::startup::bootstrap(FRAME *frame) } } - const std::string b2_exe_path{executable_path(saved_argv0)}; + char *b2_exe_path_pchar = executable_path(saved_argv0); + const std::string b2_exe_path{b2_exe_path_pchar}; + if (b2_exe_path_pchar) + { + free(b2_exe_path_pchar); + } const std::string boost_build_jam{"boost-build.jam"}; std::string b2_file_path;