[odb-users] Dependency issue with build2 0.12 and odb 2.5
Vincent
chere.loque at gmail.com
Fri Nov 22 11:00:05 EST 2019
Thanks to your instructions, I managed to find out what happened!
We build/install build2 and odb libs in a subdirectory of our Jenkins
workspace, and all the calls to 'bpkg' from the makefiles use the
absolute path (I have not mentioned in my transcript for the sake of
clarity).
However, I found out that we also had 'bpkg' and 'b' binaries version
0.10 installed in the /usr/local/bin directory of the build machine.
Removing them solved the issue.
So, it seems that calling 'bpkg' in a specific path stills make
uses/calls of binaries installed at the system level (on the PATH), somehow.
Here is a full transcript of a test I made to reproduce the issue:
$ cd /home/vincent/my_project
$ cat ./build/dev-tools/build2/install_build2.sh
SCRIPT_DIR=$( cd "$(dirname "${BASH_SOURCE}")" ; pwd -P )
sh ${SCRIPT_DIR}/build2.sh --uninstall --yes
curl -o ${SCRIPT_DIR}/build2.sh -sSfO
https://download.build2.org/0.12.0/build2-install-0.12.0.sh
shasum -a 256 -b ${SCRIPT_DIR}/build2.sh
sh ${SCRIPT_DIR}/build2.sh --no-check --trust yes --yes ${SCRIPT_DIR}
$ ./build/dev-tools/build2/install_build2.sh
About to uninstall build2 toolchain 0.11.0 (public).
Install directory: /home/vincent/my_project/build/dev-tools/build2/
Build directory: /home/vincent/my_project/
[...]
Successfully uninstalled build2 toolchain 0.11.0 (public).
da35b527aac3427b449ca7525e97f81faba776ae7680179521963b90a21fba12
*/home/vincent/my_project/build/dev-tools/build2/build2.sh
-------------------------------------------------------------------------
About to download, build, and install build2 toolchain 0.12.0 (public).
[...]
Install directory: /home/vincent/my_project/build/dev-tools/build2/
Build directory: /home/vincent/my_project/
Package repository: https://pkg.cppget.org/1/alpha
[...]
Successfully installed build2 toolchain 0.12.0 (public).
Install directory: /home/vincent/my_project/build/dev-tools/build2/
Build configuration: build2-toolchain-0.12/
Testing version installed in build directory:
$ ./build/dev-tools/build2/bin/bpkg --version
bpkg 0.12.0
libbpkg 0.12.0
libbutl 0.12.0
Copyright (c) 2014-2019 Code Synthesis Ltd
This is free software released under the MIT license.
$ ./build/dev-tools/build2/bin/b --version
build2 0.12.0
libbutl 0.12.0
host x86_64-linux-gnu
Copyright (c) 2014-2019 Code Synthesis Ltd
This is free software released under the MIT license.
And in system directory (/usr/local/bin):
$ bpkg --version
bpkg 0.10.0
libbpkg 0.10.0
libbutl 0.10.0
Copyright (c) 2014-2019 Code Synthesis Ltd
This is free software released under the MIT license.
$ b --version
build2 0.10.0
libbutl 0.10.0
host x86_64-linux-gnu
Copyright (c) 2014-2019 Code Synthesis Ltd
This is free software released under the MIT license.
Then, trying the actual build of odb:
$ cd /home/vincent/my_project
$ mkdir _build
$ cd _build
$ mkdir local
$ mkdir odb-build2
$ cd odb-build2
$ ../../build/dev-tools/build2/bin/bpkg create -d . cc config.cxx=g++
config.cc.coptions=-O3 config.bin.rpath=../local/lib/
config.install.root=../local --wipe
created new configuration in /home/vincent/my_project/_build/odb-build2/
$ ../../build/dev-tools/build2/bin/bpkg build --yes --trust-yes
odb at https://pkg.cppget.org/1/beta
added pkg:cppget.org/beta
fetching pkg:cppget.org/beta
fetching pkg:cppget.org/testing (complements pkg:cppget.org/beta)
fetching pkg:cppget.org/stable (complements pkg:cppget.org/testing)
error: unable to satisfy constraint (build2 >= 0.11.0) for package odb
info: available build2 version is 0.10.0
info: while satisfying odb/2.5.0-b.17
Is there any way to specify a "home path" for build2 binaries?
Vincent
More information about the odb-users
mailing list