[Debian-med-packaging] Bug#748932: idba FTBFS for mips, mipsel, powerpc and sparc

Dejan Latinovic Dejan.Latinovic at imgtec.com
Thu May 22 11:24:49 UTC 2014


Package: idba
Version: 1.1.1-1
Tags: sid patch
Severity: important
Justification: FTBFS
User: debian-mips-dev-discuss at lists.alioth.debian.org
Usertags: mips-patch


Package idba FTBFS for mips and mipsel, powerpc and sparc with an error:

> g++ -Wall -O3 -fopenmp -pthread -g -O2 -Wformat -Werror=format-security -fopenmp -pthread -Wl,-z,relro -o idba_hybrid idba_hybrid.o  ../lib/libassembly.a
> idba_hybrid.o: In function `AtomicInteger<unsigned long long>::operator+=(unsigned long long)':
> /«PKGBUILDDIR»/bin/../src/basic/atomic_integer.h:38: undefined reference to `__sync_add_and_fetch_8'
> ../lib/libassembly.a(hash_graph.o): In function `AtomicInteger<unsigned long long>::operator+=(unsigned long long)':
> /«PKGBUILDDIR»/lib/../src/basic/atomic_integer.h:38: undefined reference to `__sync_add_and_fetch_8'
> collect2: error: ld returned 1 exit status


Mips platform does not have 64-bit __sync_* operations.
To avoid this behaviuor it is needed to use
corresponding __atomic_* from libatomic library.

Patch use-atomic-for-mips.patch contains these changes
of src/basic/atomic_integer.h for mips.

Patch add-libatomic-to-LIBS.patch
adds libatomic in LIBS, and as-needed in LDFLAGS into debian/rules.


I believe that this fix could be used for
sparc and powerpc, but unfortunately I
could not test it so I can not guarantee that.

More info you can find at:
https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/_005f_005fatomic-Builtins.html#_005f_005fatomic-Builtins
https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/_005f_005fsync-Builtins.html#_005f_005fsync-Builtins


Could you please consider including this patch?

Best regards,
Dejan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: use-atomic-for-mips.patch
Type: text/x-patch
Size: 3616 bytes
Desc: use-atomic-for-mips.patch
URL: <http://lists.alioth.debian.org/pipermail/debian-med-packaging/attachments/20140522/9fd511a7/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add-libatomic-to-LIBS.patch
Type: text/x-patch
Size: 414 bytes
Desc: add-libatomic-to-LIBS.patch
URL: <http://lists.alioth.debian.org/pipermail/debian-med-packaging/attachments/20140522/9fd511a7/attachment-0003.bin>


More information about the Debian-med-packaging mailing list