Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
boost.m4 and python on Gentoo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
qdii
Tux's lil' helper
Tux's lil' helper


Joined: 19 Sep 2009
Posts: 106
Location: Madrid

PostPosted: Wed Jan 16, 2013 11:57 pm    Post subject: boost.m4 and python on Gentoo Reply with quote

When using BOOST_PYTHON from boost.m4 in an autoconf script, it looks for a bunch of library but fails to find a matching.
Gentoo ebuild dev-libs/boost[python] installs those:

Quote:
/usr/lib64/libboost_python-2.7-mt.so
/usr/lib64/libboost_python-2.7.so
/usr/lib64/libboost_python-2.7.so.1.52.0
/usr/lib64/libboost_python-3.2-mt.so
/usr/lib64/libboost_python-3.2.so
/usr/lib64/libboost_python-3.2.so.1.52.0


and BOOST_PYTHON tells ./configure to look for those one:

Quote:
-lboost_python
-lboost_python-1_52
-lboost_python-d
-lboost_python-d-1_52
-lboost_python-gcc
-lboost_python-gcc-1_52
-lboost_python-gcc47
-lboost_python-gcc47-1_52
-lboost_python-gcc47-d
-lboost_python-gcc47-d-1_52
-lboost_python-gcc47-mt
-lboost_python-gcc47-mt-1_52
-lboost_python-gcc47-mt-d
-lboost_python-gcc47-mt-d-1_52
-lboost_python-gcc-d
-lboost_python-gcc-d-1_52
-lboost_python-gcc-mt
-lboost_python-gcc-mt-1_52
-lboost_python-gcc-mt-d
-lboost_python-gcc-mt-d-1_52
-lboost_python-mt
-lboost_python-mt-1_52
-lboost_python-mt-d
-lboost_python-mt-d-1_52


I am not sure where the problem is:
- It could be that a symlink is missing
- It could be that boost.m4 isn’t looking deep enough

I have sent an email to the library author and I am waiting for his answer.
Back to top
View user's profile Send private message
jlpoole
Apprentice
Apprentice


Joined: 01 Nov 2005
Posts: 217
Location: Napa, CA

PostPosted: Tue Oct 08, 2013 2:12 pm    Post subject: Reply with quote

This issues seems to touch upon a problem I have encountered, so I'm posting by way of reply.

I, too, have run into a problem: lboost_python was not found despite there being various versioned files. I was installing mapnik by hand and I received error messages that:
Quote:
g++ -o bindings/python/mapnik/_mapnik.so -shared bindings/python/mapnik_scaling_method.os bindings/python/mapnik_line_symbolizer.os bindings/python/mapnik_fontset.os bindings/python/mapnik_layer.os bindings/python/mapnik_geometry.os bindings/python/mapnik_map.os bindings/python/mapnik_polygon_symbolizer.os bindings/python/mapnik_expression.os bindings/python/python_grid_utils.os bindings/python/mapnik_gamma_method.os bindings/python/mapnik_featureset.os bindings/python/mapnik_style.os bindings/python/mapnik_line_pattern_symbolizer.os bindings/python/mapnik_envelope.os bindings/python/mapnik_datasource.os bindings/python/mapnik_palette.os bindings/python/mapnik_feature.os bindings/python/mapnik_wkt_reader.os bindings/python/mapnik_shield_symbolizer.os bindings/python/mapnik_view_transform.os bindings/python/mapnik_stroke.os bindings/python/mapnik_projection.os bindings/python/mapnik_raster_symbolizer.os bindings/python/mapnik_raster_colorizer.os bindings/python/mapnik_building_symbolizer.os bindings/python/mapnik_coord.os bindings/python/mapnik_symbolizer.os bindings/python/mapnik_polygon_pattern_symbolizer.os bindings/python/mapnik_datasource_cache.os bindings/python/mapnik_parameters.os bindings/python/mapnik_markers_symbolizer.os bindings/python/mapnik_rule.os bindings/python/mapnik_color.os bindings/python/python_cairo.os bindings/python/mapnik_grid.os bindings/python/mapnik_label_collision_detector.os bindings/python/mapnik_font_engine.os bindings/python/mapnik_image_view.os bindings/python/mapnik_debug_symbolizer.os bindings/python/mapnik_image.os bindings/python/mapnik_proj_transform.os bindings/python/mapnik_grid_view.os bindings/python/mapnik_python.os bindings/python/mapnik_logger.os bindings/python/mapnik_point_symbolizer.os bindings/python/mapnik_query.os bindings/python/mapnik_text_placement.os -Ldeps/agg -Lsrc -L/usr/lib64 -L/usr/lib64/postgresql-9.1/lib64 -lmapnik -lboost_python -lboost_thread
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lboost_python
collect2: error: ld returned 1 exit status
scons: *** [bindings/python/mapnik/_mapnik.so] Error 1
scons: building terminated because of errors.
make: *** [mapnik] Error 2
themis 2.3.x #

I checked to see what was installed on my system:

Code:
themis 2.3.x # locate libboost_pytho
/usr/lib64/libboost_python-2.7-mt.so
/usr/lib64/libboost_python-2.7.so
/usr/lib64/libboost_python-2.7.so.1.52.0
/usr/lib64/libboost_python-3.2-mt.so
/usr/lib64/libboost_python-3.2.so
/usr/lib64/libboost_python-3.2.so.1.52.0
...
/usr/portage/dev-libs/boost/files/boost-1.48.0-disable_libboost_python3.patch
themis 2.3.x #


(I ommitted the listing of my link created later on to move forward.)

So I took a look at what was available and saw various versions of the library, but no generic version. So, to move forward with that compile (just to see if I could compile it and move onto any other problems), I cheated and created a link resulting in this entry:

Quote:
lrwxrwxrwx 1 root root 22 Oct 7 21:18 /usr/lib64/libboost_python.so -> libboost_python-2.7.so


With this dangerous hack, I was able to move forward and finally compiled mapnik 2.3.

Is this an issue about slot management?
Code:
themis 2.3.x # eselect python list
Available Python interpreters:
  [1]   python2.7 *
  [2]   python3.2
themis 2.3.x #

I had selected python2.7, but no link had been created for the boost package. I'm guess it would be appropriate for something to be set so that programs compiling against libboot_python are redirected to libboost_python-2.7.

I'm not sure where to log this bug.
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 8594

PostPosted: Tue Oct 08, 2013 8:40 pm    Post subject: Reply with quote

In my opinion, that is a problem with the build system of mapnik. You assumed (hopefully correctly) that it used Python 2.7 headers, and therefore you linked it to the Boost Python 2.7 bindings. Gentoo does not provide a symlink to allow Python-embedding applications to get a default Python by using -isystem python, so it is appropriate that Gentoo also does not provide a default for -lboost_python. I think mapnik ought to pick a Python version and use that version explicitly in all contexts where it needs Python headers, libraries, etc. The method of selection can be set by upstream or provided by a configure argument.
Back to top
View user's profile Send private message
jlpoole
Apprentice
Apprentice


Joined: 01 Nov 2005
Posts: 217
Location: Napa, CA

PostPosted: Tue Oct 08, 2013 8:44 pm    Post subject: Reply with quote

Thank you, I learned something from your reply.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum