[Pkg-phototools-devel] Bug#708929: openimageio: FTBFS on powerpc, powerpcspe, mipsel, sparc due to missing __sync_fetch_and_add_8

Roland Stigge stigge at antcom.de
Sun May 19 13:31:20 UTC 2013


Package: openimageio
Version: 1.1.10+dfsg0-2
Severity: important
Tags: patch upstream
User: debian-powerpcspe at breakpoint.cc
Usertags: powerpcspe

Hi,

openimageio FTBFS on several architectures like this:

...
/usr/bin/g++-4.7   -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2  -O2 -g   -Wl,-z,relro CMakeFiles/atomic_test.dir/atomic_test.cpp.o  -o atomic_test -rdynamic libOpenImageIO.so.1.1.10 -lboost_filesystem-mt -lboost_regex-mt -lboost_system-mt -lboost_thread-mt -lpthread -ldl -lHalf -lIex -lImath -lIlmThread -lpthread -lpng -lz -ltiff -ljpeg -lz -ltiff -ljpeg -lIlmImf -Wl,-rpath,/«BUILDDIR»/openimageio-1.1.10+dfsg0/build/libOpenImageIO 
CMakeFiles/atomic_test.dir/atomic_test.cpp.o: In function `OpenImageIO::v1_1::atomic<long long>::operator++()':
/«BUILDDIR»/openimageio-1.1.10+dfsg0/src/include/thread.h:250: undefined reference to `__sync_fetch_and_add_8'
CMakeFiles/atomic_test.dir/atomic_test.cpp.o: In function `atomic_exchange_and_add':
/«BUILDDIR»/openimageio-1.1.10+dfsg0/src/include/thread.h:250: undefined reference to `__sync_fetch_and_add_8'
/«BUILDDIR»/openimageio-1.1.10+dfsg0/src/include/thread.h:250: undefined reference to `__sync_fetch_and_add_8'
/«BUILDDIR»/openimageio-1.1.10+dfsg0/src/include/thread.h:250: undefined reference to `__sync_fetch_and_add_8'
/«BUILDDIR»/openimageio-1.1.10+dfsg0/src/include/thread.h:250: undefined reference to `__sync_fetch_and_add_8'
CMakeFiles/atomic_test.dir/atomic_test.cpp.o:/«BUILDDIR»/openimageio-1.1.10+dfsg0/src/include/thread.h:250: more undefined references to `__sync_fetch_and_add_8' follow
CMakeFiles/atomic_test.dir/atomic_test.cpp.o: In function `atomic_compare_and_exchange':
/«BUILDDIR»/openimageio-1.1.10+dfsg0/src/include/thread.h:300: undefined reference to `__sync_bool_compare_and_swap_8'
CMakeFiles/atomic_test.dir/atomic_test.cpp.o: In function `atomic_exchange_and_add':
/«BUILDDIR»/openimageio-1.1.10+dfsg0/src/include/thread.h:250: undefined reference to `__sync_fetch_and_add_8'
/«BUILDDIR»/openimageio-1.1.10+dfsg0/src/include/thread.h:250: undefined reference to `__sync_fetch_and_add_8'
collect2: error: ld returned 1 exit status
make[4]: *** [libOpenImageIO/atomic_test] Error 1
make[4]: Leaving directory `/«BUILDDIR»/openimageio-1.1.10+dfsg0/build'
...

Although #687612 was fixed with a new build dependency on g++-4.7, this doesn't
work for some architectures because __sync_fetch_and_add_8 (i.e., the 64 bit
atomic operation) is not generally available, see
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56300

__sync* is considered deprecated in favour of __atomic*, see attached patch.
Includes build-dep on g++-4.8 (instead of g++-4.7) since full __atomic* support
with library call fallback in case of missing lock free hardware support is
only available there. Also, links with libatomic via debian/rules for the case
of fallback library calls. You might want to limit this option ("-latomic") to
archs which FTBFS for the above reason.

Thanks in advance,

Roland


-- System Information:
Debian Release: 7.0
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'unstable')
Architecture: powerpcspe (ppc)

Kernel: Linux 3.9.0-dirty (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_GB.UTF-8)
Shell: /bin/sh linked to /bin/dash
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openimageio.patch
Type: text/x-diff
Size: 2646 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-phototools-devel/attachments/20130519/5ed532ec/attachment.patch>


More information about the Pkg-phototools-devel mailing list