Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1178265 - osm2pgsql needs to link to -lboost_atomic
Summary: osm2pgsql needs to link to -lboost_atomic
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: osm2pgsql
Version: 21
Hardware: s390x
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fabian Affolter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ZedoraTracker
TreeView+ depends on / blocked
 
Reported: 2015-01-03 13:06 UTC by Dan Horák
Modified: 2015-12-02 16:56 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-02 06:47:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
A fix (1.58 KB, patch)
2015-01-06 19:51 UTC, Petr Machata
no flags Details | Diff

Description Dan Horák 2015-01-03 13:06:21 UTC
Description of problem:
The libboost_thread.so linker script doesn't include libboost_atomic.so anymore on s390(x). Last correct boost seems to be boost-1.54.0-14.fc21 (http://s390.koji.fedoraproject.org/koji/buildinfo?buildID=241778)

Version-Release number of selected component (if applicable):
boost-1.55.0-4.fc21

How reproducible:
m4 -DHAS_ATOMIC_FLAG_LOCKFREE -DVERSION=1.55.0 libboost_thread.so
has no effect even on x86 (F-20)


diff --git a/libboost_thread.so b/libboost_thread.so
index db50610..2d55c36 100644
--- a/libboost_thread.so
+++ b/libboost_thread.so
@@ -11,7 +11,7 @@ changequote(`[', `]')dnl
 
 INPUT(libboost_thread.so.VERSION)
 INPUT(libboost_system.so.VERSION)
-ifdef([HAS_ATOMIC_FLAG_LOCKFREE],[],
+ifdef(HAS_ATOMIC_FLAG_LOCKFREE,[],
 [
 /* If the given architecture doesn't have lock-free implementation of
    boost::atomic_flag, the dependency on Boost.Atomic may leak from

makes it work again

Comment 1 Dan Horák 2015-01-06 11:02:51 UTC
the symptoms look like

from http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=1680905
...
libtool: link: g++ -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -march=z9-109 -mtune=z10 -Wl,-z -Wl,relro -o osm2pgsql osm2pgsql.o -pthread  ./.libs/libosm2pgsql.a -L/usr/lib -L/usr/lib64 -lpq -lxml2 -lz -lm -ldl -lbz2 -lgeos -lproj -lprotobuf-c -L/usr/lib/x86_64-linux-gnu -lboost_filesystem -lboost_system -lboost_thread -lstdc++ -pthread
libtool: link: g++ -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -march=z9-109 -mtune=z10 -Wl,-z -Wl,relro -o nodecachefilereader node-persistent-cache-reader.o -pthread  ./.libs/libosm2pgsql.a -L/usr/lib -L/usr/lib64 -lpq -lxml2 -lz -lm -ldl -lbz2 -lgeos -lproj -lprotobuf-c -L/usr/lib/x86_64-linux-gnu -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
Makefile:978: recipe for target 'osm2pgsql' failed

Comment 2 Petr Machata 2015-01-06 19:50:21 UTC
osm2pgsql contains what amounts to the following snippet, which reproduces the problem:

#include <boost/lockfree/queue.hpp>
boost::lockfree::queue <size_t> queue;

It should therefore link with Boost.Atomic.  I don't think we can do anything on Boost side for this.

(In reply to Dan Horák from comment #0)
> -ifdef([HAS_ATOMIC_FLAG_LOCKFREE],[],
> +ifdef(HAS_ATOMIC_FLAG_LOCKFREE,[],

This happens to work because then -lboost_thread _always_ implies -lboost_atomic.  But here the problem isn't caused by use of Boost.Thread, but by use of Boost.Lockfree.

The reason that the line went away from libbost_thread.so linker script is that Boost now defines BOOST_ATOMIC_FLAG_LOCK_FREE on s390x as well, where it uses GCC builtins for atomics.

Comment 3 Petr Machata 2015-01-06 19:51:23 UTC
Created attachment 976916 [details]
A fix

This fix seems appropriate before upstream can address this problem in a more constructive manner.

Comment 4 Ralf Corsepius 2015-08-26 17:14:45 UTC
I just updated osm2pgsql to 0.88.1 on rawhide and f23.

Could you please check if this bug still applies?

Comment 5 Fedora End Of Life 2015-11-04 10:41:54 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Fedora End Of Life 2015-12-02 06:48:06 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.