build icon indicating copy to clipboard operation
build copied to clipboard

configure.builds and check-target-builds always build in debug mode

Open ledocc opened this issue 6 years ago • 6 comments

posted on boost.user mailing list 9 days ago, but no answerer so I try here ...

Hi,

I try to add icu support in boost conan package, but on windows with msvc, the build never use icu.

During icu detection in boost.locale, the has_icu.exe never build because configure.builds try to build in debug mode when I use property "variant=release" in b2 command line. I can see that in config.log written by b2 during build : b2 use icuucd.lib and icuind.lib instead of icuuc.lib and icuin.lib. So icu is not correctly detected, and so never used. If I bypass the has_icu test, boost locale build fine and have icu backend as expected.

This behaviors only fail builds that use different library in release and debug mode, like icu build with msvc.

Is it the correct behaviors ?

  • If yes this is a bad news for library with different library name in release and debug mode.
  • If no ... houston, we have a problem ... Can you give me some hint to fix this?

Best regards

ledocc avatar Jun 03 '19 12:06 ledocc

up

ledocc avatar Oct 16 '19 04:10 ledocc

The solution is to add to relevants features of "configure" module by calling feature.compose <configure> : <variant> <link> <runtime-link> <define> ; as suggested in src/build/configure.jam. But when I do this, an error occur:

source/boost/tools/build/src/build/feature.jam:690: in feature.compose from module feature error: components of already set: source/boost/tools/build/src/build/configure.jam:45: in load from module configure source/boost/tools/build/src/kernel/modules.jam:295: in import from module modules source/boost/tools/build/src/build-system.jam:14: in load from module build-system source/boost/tools/build/src/kernel/modules.jam:295: in import from module modules source/boost/tools/build/src/kernel/bootstrap.jam:139: in boost-build from module source/boost/boost-build.jam:17: in module scope from module

I found no way to add feature to "configure" module.

ledocc avatar Oct 28 '19 09:10 ledocc

I think, I can fix this with patch:

diff --git a/tools/build/src/build/configure.jam b/tools/build/src/build/configure.jam
index f9df172b..29c4884e 100644
--- a/tools/build/src/build/configure.jam
+++ b/tools/build/src/build/configure.jam
@@ -39,7 +39,7 @@ feature.feature configure : : composite optional ;
 # relevant features are also considered relevant.
 #
 feature.compose <configure> :
-    <target-os> <toolset> <address-model> <architecture> <cxxstd> ;
+    <target-os> <variant> <toolset> <address-model> <architecture> <cxxstd> ;

orangejuicy avatar Jan 10 '20 19:01 orangejuicy

I @orangejuicy, Here the patch I use on my side for now

--- a/tools/build/src/build/configure.jam       2019-08-14 14:03:50.000000000 +0200
+++ b/tools/build/src/build/configure.jam       2019-09-10 14:27:54.377625059 +0200
@@ -41,4 +41,4 @@
 # relevant features are also considered relevant.
 #
 feature.compose <configure> :
-    <target-os> <toolset> <address-model> <architecture> <cxxstd> ;
+    <target-os> <toolset> <address-model> <architecture> <cxxstd> <variant> <link> <runtime-link> <define> ;


 rule log-summary ( )

to properly build has_icu program test, we also need "link", "runtime-link", and "define" options

ledocc avatar Jan 13 '20 11:01 ledocc

up

ledocc avatar Feb 20 '20 10:02 ledocc

Thank you for your contributions. Main development of B2 has moved to https://github.com/bfgroup/b2 This issue has been automatically marked as "transition" to indicate the potential for needing transition to the new B2 development project.

stale[bot] avatar May 29 '21 18:05 stale[bot]