Package: libboost-tools-dev
Version: 1.74.0.3
Severity: normal

Dear Maintainer,

I tried to compile a simple tutorial following the link [1].

I tried to run

bjam under example/tutorial after prepending the following to Jamroot file:

  using python : 3.9
               : /usr/bin/python3
               : /usr/include/python3.9
               : /usr/lib/python3.9/config-3.9-x86_64-linux-gnu
               ;

However, it always encounter

  /usr/bin/ld: cannot find -lboost_python
  collect2: error: ld returned 1 exit status

      "g++"    -o "hello_ext.cpython-39-x86_64-linux-gnu.so" -Wl,-h -Wl,
hello_ext.cpython-39-x86_64-linux-gnu.so -shared -Wl,--start-group
"hello.o"  -Wl,-Bstatic  -Wl,-Bdynamic -lboost_python -ldl -lpthread -lutil
-Wl,--end-group -fPIC -g

I tried to manually compile, replace boost_python with boost_python39,
through
       g++     -o "hello_ext.cpython-39-x86_64-linux-gnu.so" -Wl,-h -Wl,
hello_ext.cpython-39-x86_64-linux-gnu.so -shared -Wl,--start-group
"hello.o"  -Wl,-Bstatic  -Wl,-Bdynamic -lboost_python39 -ldl -lpthread
-lutil -Wl,--end-group -fPIC -g

It succeeds.

I was wondering if this is from the conflicts between the building tools
and libraries for boost-python. I am a novice and please correct me if I am
wrong.

I worked on WSL2-Debian Stable. And I installed build-essential,
python3-dev, libboost-python-dev, and libboost-tools-dev.

Library versions via apt search are:
    libboost-python-dev/stable,now 1.74.0.3 amd64
    libboost-tools-dev/stable,now 1.74.0.3 amd64
    python3-dev/stable,now 3.9.2-3 amd64
    build-essential/stable,now 12.9 amd64

Best regards,

Yousen

[1] https://github.com/boostorg/python/tree/develop/example/tutorial

-- System Information:
Debian Release: 11.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500,
'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.60.1-microsoft-standard-WSL2 (SMP w/8 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE
not set
Shell: /bin/sh linked to /bin/dash
Init: unable to detect

Versions of packages libboost-tools-dev depends on:
ii  libboost1.74-tools-dev  1.74.0-9

libboost-tools-dev recommends no packages.

libboost-tools-dev suggests no packages.

-- no debconf information

Reply via email to