Closed randomphrase closed 4 months ago
It may be related to https://github.com/boostorg/stacktrace/issues/163
I'll send a hotfix to always set BOOST_STACKTRACE_LIBCXX_RUNTIME_MAY_CAUSE_MEMORY_LEAK
Users still can disable stacktrace.from_exception
Description
Building boost 1.85.0 on macOS with GCC, we get a compilation error as follows:
Note that the Conan recipe will define this symbol, according to the following logic in the recipe:
To me this seems backwards: the memory leak exists only in the libc++ runtime, hence if anything we should define the symbol (and hence allow compilation) only if we are not using that runtime. As it stands we can only compile against the problematic runtime.
Package and Environment Details
Conan profile
[settings] arch=armv8 build_type=Release compiler=gcc compiler.cppstd=23 compiler.libcxx=libstdc++11 compiler.version=13.2 os=Macos [buildenv] CC=/opt/homebrew/bin/gcc-13 CXX=/opt/homebrew/bin/g++-13
Steps to reproduce
conan install . --output-folder=build.dbg --build=missing --profile gcc13
Logs
Click to expand log
``` alastair@Alastairs-MBP ~/h/instru> conan install . --output-folder=build.dbg --build=missing --profile gcc13 main!? ======== Input profiles ======== Profile host: [settings] arch=armv8 build_type=Release compiler=gcc compiler.cppstd=23 compiler.libcxx=libstdc++11 compiler.version=13.2 os=Macos [buildenv] CC=/opt/homebrew/bin/gcc-13 CXX=/opt/homebrew/bin/g++-13 Profile build: [settings] arch=armv8 build_type=Release compiler=apple-clang compiler.cppstd=gnu98 compiler.libcxx=libc++ compiler.version=14 os=Macos ======== Computing dependency graph ======== boost/1.85.0: Not found in local cache, looking in remotes... boost/1.85.0: Checking remote: conancenter boost/1.85.0: Downloaded recipe revision 14265ec82b25d91305bbb3b30d3357f8 Graph root conanfile.txt: /Users/alastair/hack/instru/conanfile.txt Requirements boost/1.85.0#14265ec82b25d91305bbb3b30d3357f8 - Downloaded (conancenter) bzip2/1.0.8#457c272f7da34cb9c67456dd217d36c4 - Cache fmt/10.2.1#9199a7a0611866dea5c8849a77467b25 - Cache libbacktrace/cci.20210118#ec1aa63bbc10145c6a299e68e711670c - Cache libiconv/1.17#73fefc1b696e069df90fd1d18aa63edd - Cache zlib/1.2.11#ffa77daf83a57094149707928bdce823 - Cache Build requirements b2/4.10.1#a41eecb267963ddf518e3c177eae60e1 - Cache Resolved version ranges zlib/[>=1.2.11 <2]: zlib/1.2.11 ======== Computing necessary packages ======== boost/1.85.0: Checking 7 compatible configurations boost/1.85.0: Compatible configurations not found in cache, checking servers boost/1.85.0: '6c44415c04624beb77358a994e3b610f705dba29': compiler.cppstd=14 boost/1.85.0: '7519fba830f908915b53fa0095283586e981b30a': compiler.cppstd=gnu14 boost/1.85.0: '900219c7140413985f8d97de5f33e2f751525318': compiler.cppstd=17 boost/1.85.0: '0a560c3f3d2092b9e24f538ed65a0945cdd1d197': compiler.cppstd=gnu17 boost/1.85.0: 'ea7e47fe3f2437aa22e683b7a2d903c6c0805d11': compiler.cppstd=20 boost/1.85.0: 'e041c9e24f7dc3051d045a0bfa93526fb848edee': compiler.cppstd=gnu20 boost/1.85.0: 'cd2df2714a55433a8985684b08d123f9306158d0': compiler.cppstd=gnu23 Requirements boost/1.85.0#14265ec82b25d91305bbb3b30d3357f8:de08c5993c7efbb1095cecb2eb62217158cf8e97 - Build bzip2/1.0.8#457c272f7da34cb9c67456dd217d36c4:41e400a6004e9dc630aa4516fa67fc2fff3868b1#36051151b68d53b7ef131c12dde41da2 - Cache fmt/10.2.1#9199a7a0611866dea5c8849a77467b25:1800c08c5ff16dcba4bf4e494a9341ca82ea630b#72a813b9f19aada4a905b801c6204568 - Cache libbacktrace/cci.20210118#ec1aa63bbc10145c6a299e68e711670c:36b0287c08dbeb6d80d3ccef68e9d84d12418a4e#cad455dac83db10ebca5bf60356cb847 - Cache libiconv/1.17#73fefc1b696e069df90fd1d18aa63edd:36b0287c08dbeb6d80d3ccef68e9d84d12418a4e#24aba7639b661a4bf965245d03e8e2cb - Cache zlib/1.2.11#ffa77daf83a57094149707928bdce823:36b0287c08dbeb6d80d3ccef68e9d84d12418a4e#199e1bf9b43a05f5ec0bb843e8b5bdb8 - Cache Build requirements b2/4.10.1#a41eecb267963ddf518e3c177eae60e1:ef52fcb08b72f88cd87dade69f7b5e49a93b591a#80caca9407086ca720e34846ed71bf51 - Cache ======== Installing packages ======== b2/4.10.1: Already installed! (1 of 7) bzip2/1.0.8: Already installed! (2 of 7) fmt/10.2.1: Already installed! (3 of 7) libbacktrace/cci.20210118: Already installed! (4 of 7) libiconv/1.17: Already installed! (5 of 7) zlib/1.2.11: Already installed! (6 of 7) boost/1.85.0: Sources downloaded from 'conancenter' boost/1.85.0: Calling source() in /Users/alastair/.conan2/p/boost77e71cb2729fd/s/src boost/1.85.0: Downloading 124.0MB boost_1_85_0.tar.bz2 boost/1.85.0: Downloaded 48.7MB 39% boost_1_85_0.tar.bz2 boost/1.85.0: Downloaded 83.6MB 67% boost_1_85_0.tar.bz2 boost/1.85.0: Downloaded 121.2MB 97% boost_1_85_0.tar.bz2 boost/1.85.0: Apply patch (conan): Optional flag to specify iconv from either libc of libiconv -------- Installing package boost/1.85.0 (7 of 7) -------- boost/1.85.0: Building from source boost/1.85.0: Package boost/1.85.0:de08c5993c7efbb1095cecb2eb62217158cf8e97 boost/1.85.0: Building your package in /Users/alastair/.conan2/p/b/boost1fab7c85a2cf6/b boost/1.85.0: Calling generate() boost/1.85.0: Generators folder: /Users/alastair/.conan2/p/b/boost1fab7c85a2cf6/b/build-release/conan boost/1.85.0: Generating aggregated env files boost/1.85.0: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] boost/1.85.0: Calling build() boost/1.85.0: WARN: replace_in_file didn't find pattern '/* thread_local */' in '/Users/alastair/.conan2/p/boost77e71cb2729fd/s/src/boost/stacktrace/detail/libbacktrace_impls.hpp' file. boost/1.85.0: WARN: replace_in_file didn't find pattern '/* static __thread */' in '/Users/alastair/.conan2/p/boost77e71cb2729fd/s/src/boost/stacktrace/detail/libbacktrace_impls.hpp' file. boost/1.85.0: WARN: replace_in_file didn't find pattern 'local generic-os = [ set.difference $(all-os) : aix darwin vxworks solaris osf hpux ] ;' in '/Users/alastair/.conan2/p/boost77e71cb2729fd/s/src/tools/build/src/tools/gcc.jam' file. boost/1.85.0: WARN: replace_in_file didn't find pattern 'local no-threading = android beos haiku sgi darwin vxworks ;' in '/Users/alastair/.conan2/p/boost77e71cb2729fd/s/src/tools/build/src/tools/gcc.jam' file. boost/1.85.0: WARN: Patching user-config.jam boost/1.85.0: WARN: using zlib : 1.2.11 :