[build2] Uninstall fails for old version 0.8.0 on macOS. How to proceed?

Nikolaus Demmel nikolaus at nikolaus-demmel.de
Wed Apr 29 09:43:25 UTC 2020



> On 29. Apr 2020, at 10:51, Karen Arutyunov <karen at codesynthesis.com> wrote:
> 
> On 4/29/20 12:58 AM, Nikolaus Demmel wrote:
>> But unfortunately (probably due to the OS upgrade), the uninstall fails after longer compilation.
>> […]
>> c++ build2-toolchain-0.8/bpkg-0.8.0/bpkg/cxx{pkg-unpack}
>> ar build2-toolchain-0.8/build2-0.8.0/build2/libue{b}
>> ld build2-toolchain-0.8/build2-0.8.0/build2/exe{b}
>> Undefined symbols for architecture x86_64:
>>   "std::__1::__match_any_but_newline<build2::test::script::regex::line_char>::__exec(std::__1::__state<build2::test::script::regex::line_char>&) const", referenced from:
>>       vtable for std::__1::__match_any_but_newline<build2::test::script::regex::line_char> in libb.u.a(runner.o)
>> ld: symbol(s) not found for architecture x86_64
>> clang: error: linker command failed with exit code 1 (use -v to see invocation)
>> ld build2-toolchain-0.8/bpkg-0.8.0/bpkg/exe{bpkg}
>> info: failed to update (for uninstall) build2-toolchain-0.8/dir{build2-0.8.0/}
> 
> This likely to happen due to libc++ upgrade which disables one of its bug workarounds in the build2 code.
> 
> You can try to fix this prior to running `./build2-install-0.8.0.sh --uninstall` by editing the build2-toolchain-0.8/build2-0.8.0/build2/test/script/regex.hxx header and changing the libc++ version check in the line
> 
> #if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION <= 6000
> 
> to, for example,
> 
> #if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION <= 9000

That worked. It compiled and the uninstall script completed. Thanks a lot!
Best,
Nikolaus

PS: As a side note, I found out what caused the linker issues of my other projects (not build2) in the first place. After a QtCreator update it decided to enable a previously disabled option to “Add library search path to DYLD_LIBRARY_PATH and DYLD_FRAMEWORK_PATH”. /usr/local/lib must have ended up there for my cmake project. Not sure why. Disabling the option also resolved the immediate linker issue.

PPS: I’m fascinated by build2 and hope it gains traction. The two main reasons for me to stick with cmake for the most part at the moment is decent IDE integration and support from libraries that I use (although managing dependencies is a mess, which is exactly where I have high hopes for build2). This is just FYI, not criticism. I know both are very difficult-to-address topics and the focus for now is on the standalone workflow. Anyway, thanks to the devs for working on this project!


More information about the users mailing list