Opened 12 years ago

Closed 9 years ago

#35323 closed defect (fixed)

py26-mapnik: undefined symbols boost::system::generic_category boost::system::system_category

Reported by: aacinelli@… Owned by: dbsgeo@…
Priority: Normal Milestone:
Component: ports Version: 2.1.1
Keywords: Cc: cooljeanius (Eric Gallager), ryandesign (Ryan Carsten Schmidt)
Port: py26-mapnik

Description (last modified by ryandesign (Ryan Carsten Schmidt))

When I tried to install the py26-mapnik port from the terminal it failed. I already had installed some of the ports that py26-mapnik uses:

babbos-mac:~ babbo$ port installed
The following ports are currently installed:
  boost @1.50.0_0+no_single+no_static+python26 (active)
  bzip2 @1.0.6_0 (active)
  db46 @4.6.21_6 (active)
  expat @2.1.0_0 (active)
  fftw-3 @3.3.2_0 (active)
  freetype @2.4.10_0 (active)
  gdal @1.9.0_3+expat (active)
  geos @3.3.2_0 (active)
  gettext @0.18.1.1_2 (active)
  giflib @4.2.0_2+x11 (active)
  icu @4.8.1_0 (active)
  jpeg @8d_0 (active)
  libedit @20120601-3.0_0 (active)
  libgeotiff @1.4.0_0 (active)
  libiconv @1.14_0 (active)
  libpng @1.4.12_0 (active)
  libxml2 @2.7.8_0 (active)
  ncurses @5.9_1 (active)
  nosetests_select @0.1_0 (active)
  openssl @1.0.1c_0 (active)
  proj @4.8.0_0 (active)
  py27-distribute @0.6.28_0 (active)
  py27-gdal @1.8.1_0 (active)
  py27-nose @1.1.2_2 (active)
  py27-numpy @1.6.2_0 (active)
  py27-pyproj @1.9.0_0 (active)
  py27-shapely @1.2.15_0 (active)
  python26 @2.6.8_0 (active)
  python27 @2.7.3_0 (active)
  python_select @0.3_1 (active)
  sqlite3 @3.7.13_0 (active)
  tiff @3.9.5_0 (active)
  xorg-kbproto @1.0.6_0 (active)
  xorg-libice @1.0.8_0 (active)
  xorg-libpthread-stubs @0.3_0 (active)
  xorg-libsm @1.2.1_0 (active)
  xorg-libX11 @1.5.0_0 (active)
  xorg-libXau @1.0.7_0 (active)
  xorg-libxcb @1.8.1_2+python27 (active)
  xorg-libXdmcp @1.1.1_0 (active)
  xorg-xcb-proto @1.7.1_0+python27 (active)
  xorg-xproto @7.0.23_0 (active)
  zlib @1.2.7_0 (active)

Then I just entered the following commands:

sudo port select --set python python26
sudo port -d install py26-mapnik

I am using:

Mac OS X 10.7.4

Xcode Version 4.3.3

X11 XQuartz 2.6.4 (xorg-server 1.10.6)

MacPorts 2.1.2

Please see file attached for debug info.

Attachments (1)

debug_info.txt (29.7 KB) - added by aacinelli@… 12 years ago.

Download all attachments as: .zip

Change History (9)

Changed 12 years ago by aacinelli@…

Attachment: debug_info.txt added

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Owner: changed from macports-tickets@… to dbsgeo@…
Summary: py26-mapnik fails to installpy26-mapnik: undefined symbols boost::system::generic_category boost::system::system_category

The log shows missing symbols:

Undefined symbols for architecture x86_64:
  "boost::system::generic_category()", referenced from:
      global constructors keyed to _ZN12_GLOBAL__N_12_1Ein mapnik_datasource.os
      global constructors keyed to _ZN12_GLOBAL__N_12_1Ein mapnik_datasource_cache.os
      global constructors keyed to _ZN12_GLOBAL__N_12_1Ein mapnik_feature.os
      global constructors keyed to _ZN12_GLOBAL__N_12_1Ein mapnik_featureset.os
      global constructors keyed to _ZN12_GLOBAL__N_12_1Ein mapnik_filter.os
      global constructors keyed to _ZN12_GLOBAL__N_12_1Ein mapnik_font_engine.os
      global constructors keyed to _ZN12_GLOBAL__N_12_1Ein mapnik_geometry.os
      ...
  "boost::system::system_category()", referenced from:
      global constructors keyed to _ZN12_GLOBAL__N_12_1Ein mapnik_datasource.os
      global constructors keyed to _ZN12_GLOBAL__N_12_1Ein mapnik_datasource_cache.os
      boost::mutex::mutex()in mapnik_datasource_cache.os
      boost::mutex::lock()    in mapnik_datasource_cache.os
      boost::unique_lock<boost::mutex>::lock()   in mapnik_datasource_cache.os
      global constructors keyed to _ZN12_GLOBAL__N_12_1Ein mapnik_feature.os
      global constructors keyed to _ZN12_GLOBAL__N_12_1Ein mapnik_featureset.os
      ...
ld: symbol(s) not found for architecture x86_64

This could be an incompatibility with boost 1.50, to which the boost port was recently updated; we've seen such incompatibilities in other ports and it's not uncommon for new boost versions to break other ports. You could try downgrading to boost 1.49.

However, before you do so, note that the log also says:

DEBUG: Skipping completed org.macports.archivefetch (py26-mapnik)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Skipping completed org.macports.fetch (py26-mapnik)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Skipping completed org.macports.checksum (py26-mapnik)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Skipping completed org.macports.extract (py26-mapnik)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Skipping completed org.macports.patch (py26-mapnik)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Skipping completed org.macports.configure (py26-mapnik)
DEBUG: Privilege de-escalation not attempted as not running as root.

The "Skipping completed" lines show that you had not cleaned before trying this build, so its results cannot be trusted. Please "sudo port clean py26-mapnik" and then try again. If it still fails with undefined symbols, then proceed as above.

comment:2 Changed 12 years ago by aacinelli@…

Hi,

First I run the command:

sudo port clean py26-mapnik

then I tried to install the port I need:

sudo port -d install py26-mapnik

This didn't give me "Skipping completed" lines as before so I started to follow your suggestion and downgrading "boost" to version 1.49 revision:93341. I downloaded the Portfile in its Original Format and run the following commands:

Babbo-Mac:~ babbo$ cd /portfiles
Babbo-Mac:/portfiles babbo$ sudo port install

Although "boost 1.49" gets installed with no error and is "active" I started wondering how to install it with the +python26 variant as I originally did with the latest "boost". And that is where I get confused because I could not see any such variant in the Portfile for ver. 1.49. Just remember that I only started using MacPorts a week ago and I am not a software developer.

However I tried to install "py26-mapnik" but it failed with excatly the same problem: "missing symbols".
Is there anything else I should try?

Thanks for your help.

comment:3 Changed 12 years ago by aacinelli@…

Cc: aacinelli@… added

Cc Me!

comment:4 Changed 12 years ago by dbsgeo@…

What changed is that boost 1.50 now requires that more libraries link to boost_system. This was fixed in the Mapnik 2.0.x branch in https://github.com/mapnik/mapnik/commit/8dea5a5fe2392332cbe503edc344f37cd4221bff. This will become the Mapnik 2.0.2 release shortly. In the meantime you could just patch the port to always link all parts of mapnik to lboost_system - there is no harm doing this.

While I am cc'ed as the maintainer I no longer use Macports so I should be removed.

comment:5 Changed 12 years ago by aacinelli@…

Cc: aacinelli@… removed

Cc Me!

comment:6 Changed 12 years ago by aacinelli@…

Hi,

Good to hear that there will be the Mapnik 2.0.2 release shortly.

In the meantime I would like to patch the port to always link all parts of mapnik to lboost_system but I don't know how to do it or even what that means. Could you give me an overview or point me to some material on the web to find out more about it and the MacPorts commands necessary to execute this process?

P.S. How do I remove you from the cc box?

Thank you very much for your help so far.

Andrea

comment:7 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:8 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Resolution: fixed
Status: newclosed

py26-mapnik has been replaced by mapnik, which is now at version 3.0.0-rc1 and builds fine.

Note: See TracTickets for help on using tickets.