Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boost 1.80.0.beta1 - ERROR: rule "version.boost-build" unknown in module" - linux #6972

Closed
userdocs opened this issue Jul 17, 2022 · 4 comments

Comments

@userdocs
Copy link

userdocs commented Jul 17, 2022

Please provide the following information

libtorrent version (or branch): 2.0.7 / 1.2.17

platform/architecture: Ubuntu Jammy amd64

compiler and compiler version: gcc 11

please describe what symptom you see, what you would expect to see instead and
how to reproduce it.

Following on from the discussion as I made a reproduceable docker + bash method to show it you error.

Do this with docker.

docker run -it -w /root -e "build_dir=$HOME/lt-build" -v "$HOME/lt-build":/root ubuntu:jammy

apt update -y && apt install curl git build-essential -y
boost_version="1_80_0"
boost_beta_url="https://boostorg.jfrog.io/artifactory/main/beta/${boost_version//_/\.}.beta1/source/boost_${boost_version}_b1.tar.gz"
# you need this format for non beta urls
# boost_url="https://boostorg.jfrog.io/artifactory/main/release/${boost_version//_/\.}/source/boost_${boost_version}.tar.gz"

curl -NLk "${boost_beta_url}" --create-dirs -o "${build_dir}/boost_${boost_version}.tar.gz"
tar xf "${build_dir}/boost_${boost_version}.tar.gz" -C "${build_dir}"
pushd "${build_dir}/boost_${boost_version}/"
"${build_dir}/boost_${boost_version}/bootstrap.sh"
export BOOST_BUILD_PATH="${build_dir}/boost_${boost_version}"
echo "using gcc : $(gcc -dumpversion) : g++-$(g++ -dumpversion) ;" > "$HOME/user-config.jam"

git clone --single-branch --branch v2.0.7 --shallow-submodules --recurse-submodules --depth 1 https://github.com/arvidn/libtorrent "${build_dir}/libtorrent"
pushd "${build_dir}/libtorrent"
"${build_dir}/boost_${boost_version}/b2" -j"$(nproc)" optimization=speed crypto=openssl cxxstd=17 variant=release threading=multi link=static boost-link=static

And you will see this error

/home/username/lt-build/libtorrent /home/username/lt-build/boost_1_80_0 ~
CXXFLAGS =
LDFLAGS =
OS = LINUX
building boost from source directory:  /home/username/lt-build/boost_1_80_0
Jamfile:944: in install-paths
ERROR: rule "version.boost-build" unknown in module "Jamfile</home/username/lt-build/libtorrent>".
Jamfile:1063: in install-pkg-config
Jamfile:1094: in load-aux
/home/username/lt-build/boost_1_80_0/tools/build/src/build/project.jam:378: in load-jamfile
/home/username/lt-build/boost_1_80_0/tools/build/src/build/project.jam:64: in load
/home/username/lt-build/boost_1_80_0/tools/build/src/build/project.jam:142: in project.find
/home/username/lt-build/boost_1_80_0/tools/build/src/build-system.jam:618: in load
/home/username/lt-build/boost_1_80_0/tools/build/src/kernel/modules.jam:294: in import
/home/username/lt-build/boost_1_80_0/tools/build/src/kernel/bootstrap.jam:135: in module scope
root@709b7ca557b2:/home/username/lt-build/libtorrent#

I think i have some understanding of the issue based on this pull

https://github.com/userdocs/libtorrent/commit/22adfb33e76dc820dec78b07e7221358e6e246f3

But it has one problem, this will be true when it should be false when JAM_VERSION = 4 0 0 i guess since 4 is less that 2018?

if [ version.version-less $(JAM_VERSION) : 2018 03 ]
# which is basically
if [ version.version-less 4 0 0 : 2018 03 ]

I could not find a method to get the boost version itself though I do know it is in the /boost/version.hpp / include/version.hpp which would make for a more consistent check?

#define BOOST_VERSION 107100
#define BOOST_LIB_VERSION "1_71"
#define BOOST_LIB_VERSION "1_69"

So any version prior or 1.72.0 (4.0.0) will uses the format 2018 02 whereas the BOOST_LIB_VERSION formant is consistent,

@userdocs
Copy link
Author

@arvidn So i tested this patch and there was no error. Build was a normal successful build.

https://patch-diff.githubusercontent.com/raw/arvidn/libtorrent/pull/6973.patch

@userdocs userdocs changed the title bosot 1.80.0.beta1 - ERROR: rule "version.boost-build" unknown in module" - linux boost 1.80.0.beta1 - ERROR: rule "version.boost-build" unknown in module" - linux Jul 18, 2022
@userdocs
Copy link
Author

closed with #6973

Needs to be in branch 1_2 as well though.

@arvidn
Copy link
Owner

arvidn commented Jul 22, 2022

#6977

@userdocs
Copy link
Author

Thanks!

bob-beck pushed a commit to openbsd/ports that referenced this issue Aug 12, 2022
- updates to 1.2.17
- major bump due to removed symbols
- MODPY_SETUPTOOLS because ${WRKSRC}/bindings/python/setup.py mentions
  setuptools. A side effect was that this sets TEST_TARGET = test. To
  get tests to run, set TEST_TARGET = check
- removes ${FILESDIR}/setup.py
- patches Jamfile with correct library version number and add include
  path for boost
- patches setup.py to pass arguments to b2 to build python bindings
  correctly
- backports build fix for boost 1.80.0
  see: arvidn/libtorrent#6972
  arvidn/libtorrent@1ec11e4
- garbage collects PYTHON= CC= CXX= flags, which appear to be unused
- install python binding using MODPY_PYC_MAGIC_TAG

based on initial diff from Brad
feedback from Brad and sthen@

ok sthen@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants