Confusion over boost::python installation and example/tutorial instructions

Abierto
#410 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
25/100
Tipo de issue
Documentación
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
cpp, python

Línea de trabajo

Comienza con las páginas Unix installation y Hello tutorial enlazadas en el issue; después inspecciona el comando de ejemplo en libs/python/example/tutorial y los archivos instalados bajo ~/boost_libs/lib y /usr/local/lib. Compara la biblioteca solicitada por el ejemplo con los nombres de biblioteca de Boost.Python 3.9 que se muestran; se considera terminado cuando el ejemplo del tutorial se compila correctamente en la configuración de Raspbian indicada.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Hello,

I'm attempting to install boost::python on a Raspbian bullseye (32 bit) system. First, I followed the instructions at https://www.boost.org/doc/libs/1_81_0/more/getting_started/unix-variants.html to build bjam (b2) and install the boost::python libraries and headers...

jay@raspberrypi:~/boost_1_81_0 $ ./bootstrap.sh --with-libraries=python --prefix=/home/jay/boost_libs
...
jay@raspberrypi:~/boost_1_81_0 $ ./b2 install

It completed without error.

Then, I followed the instructions at https://www.boost.org/doc/libs/1_81_0/libs/python/doc/html/tutorial/tutorial/hello.html to build the example...

jay@raspberrypi:~/boost_1_81_0/libs/python/example/tutorial $ ~/boost_1_81_0/b2
...found 11 targets...
...updating 3 targets...
gcc.link.dll hello_ext.so
/usr/bin/ld: cannot find -lboost_python
collect2: error: ld returned 1 exit status

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

...failed gcc.link.dll hello_ext.so...
...skipped <p.>hello for lack of <p.>hello_ext.so...
...failed updating 1 target...
...skipped 2 targets...

It seems that b2 isn't correctly locating the boost_python library. I've also tried installing the boost libraries and headers to the system (/usr/local/) and it made no difference.

I can see the libraries in the filesystem:

jay@raspberrypi:~ $ ls ~/boost_libs/lib/
cmake  libboost_numpy39.a  libboost_numpy39.so  libboost_numpy39.so.1.81.0  libboost_python39.a  libboost_python39.so  libboost_python39.so.1.81.0
jay@raspberrypi:~ $ ls /usr/local/lib/
cmake  libboost_numpy39.a  libboost_numpy39.so  libboost_numpy39.so.1.81.0  libboost_python39.a  libboost_python39.so  libboost_python39.so.1.81.0  python3.9

Please can you help me determine what's missing?

-Thanks,
-Jay

Lenguaje dominante
C++
Estrellas
537
Forks
223
Merge medio
11 h 22 min
PR fusionados (30 d)
2

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de boostorg/python

Todos los issues de boostorg/python

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.