[Tile-serving] [osm2pgsql] osm2pgsql 0.87.0 fails to build on some architectures due to incorrect Boost linking (#231)
Bas Couwenberg
notifications at github.com
Thu Dec 11 21:02:58 UTC 2014
The C++ rewrite using Boost fails to build on some architectures with the following error:
```
libtool: link: g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -Wl,-z -Wl,relro -o nodecachefilereader node-persistent-cache-reader.o -pthread ./.libs/libosm2pgsql.a -L/usr/lib -lz -L/usr/lib/aarch64-linux-gnu -lpq -lxml2 -lbz2 -lgeos-3.4.2 /usr/lib/libproj.so -lprotobuf-c -L/usr/lib/x86_64-linux-gnu -llua5.2 -lm -ldl -lboost_filesystem -lboost_system -lboost_thread -lstdc++ -pthread
./.libs/libosm2pgsql.a(osmdata.o): In function `scoped_lock':
/usr/include/boost/atomic/detail/lockpool.hpp:62: undefined reference to `boost::atomics::detail::lockpool::get_lock_for(void const volatile*)'
/usr/include/boost/atomic/detail/lockpool.hpp:62: undefined reference to `boost::atomics::detail::lockpool::get_lock_for(void const volatile*)'
/usr/include/boost/atomic/detail/lockpool.hpp:62: undefined reference to `boost::atomics::detail::lockpool::get_lock_for(void const volatile*)'
/usr/include/boost/atomic/detail/lockpool.hpp:62: undefined reference to `boost::atomics::detail::lockpool::get_lock_for(void const volatile*)'
/usr/include/boost/atomic/detail/lockpool.hpp:62: undefined reference to `boost::atomics::detail::lockpool::get_lock_for(void const volatile*)'
./.libs/libosm2pgsql.a(osmdata.o):/usr/include/boost/atomic/detail/lockpool.hpp:62: more undefined references to `boost::atomics::detail::lockpool::get_lock_for(void const volatile*)' follow
collect2: error: ld returned 1 exit status
```
Build logs: [arm64](https://buildd.debian.org/status/fetch.php?pkg=osm2pgsql&arch=arm64&ver=0.87.0-1~exp1&stamp=1418281978), [armel](https://buildd.debian.org/status/fetch.php?pkg=osm2pgsql&arch=armel&ver=0.87.0-1~exp1&stamp=1418310296), [powerpc](https://buildd.debian.org/status/fetch.php?pkg=osm2pgsql&arch=powerpc&ver=0.87.0-1~exp1&stamp=1418281501), [ppc64el](https://buildd.debian.org/status/fetch.php?pkg=osm2pgsql&arch=ppc64el&ver=0.87.0-1~exp1&stamp=1418281775), [s390x](https://buildd.debian.org/status/fetch.php?pkg=osm2pgsql&arch=s390x&ver=0.87.0-1~exp1&stamp=1418281760)
There was an issue in Boost 1.54 with the linking of libboost_atomic which has been fixed in the mean time. This issue was reported in [Debian Bug #721544](https://bugs.debian.org/721544) & [Debian Bug #721577](https://bugs.debian.org/721577), and upstream in [Boost Issue #9041](https://svn.boost.org/trac/boost/ticket/9041), and it was fixed in Boost 1.55 which used on all architectures where osm2pgsql fails to build.
I'm not sure what the proper fix for osm2pgsql is. Please advise how to best help resolve this issue.
---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/231
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20141211/a4a9891b/attachment.html>
More information about the Tile-serving
mailing list