[Pkg-mongodb-maintainers] Bug#846091: mongo-cxx-driver-legacy FTBFS on mips and mipsel: undefined reference to `__atomic_fetch_add_8'

Radovan Birdic Radovan.Birdic at imgtec.com
Mon Nov 28 12:37:15 UTC 2016


Package: mongo-cxx-driver-legacy
Version: 1.1.2-3
Severity: important
Tags: sid + patch
Justification: FTBFS
User: debian-mips at lists.debian.org
Usertags: mips-patch


Package mongo-cxx-driver-legacy_1.1.2-3 FTBFS on mips and mipsel with following error:

> build/linux2/c++11_on/ssl/mongo/client/dbclient.os: In function `std::__atomic_base<long long>::fetch_add(long long, std::memory_order)':
> /usr/include/c++/6/bits/atomic_base.h:514: undefined reference to `__atomic_fetch_add_8'
> /usr/include/c++/6/bits/atomic_base.h:514: undefined reference to `__atomic_fetch_add_8'
> collect2: error: ld returned 1 exit status
> scons: *** [build/linux2/c++11_on/ssl/libmongoclient.so.0.0.0] Error 1
> scons: building terminated because of errors.

Full build log:
https://buildd.debian.org/status/fetch.php?pkg=mongo-cxx-driver-legacy&arch=mips&ver=1.1.2-3&stamp=1479670183

The problem occurs because for 64-bits atomic operations on mips/mipsel it is needed to use libatomic library.
Configure tests CheckCXX11Atomics, CheckGCCAtomicBuiltins and CheckGCCSyncBuiltins does not cover this specific case.
Tests detect that mips has atomic operations (32-bits) but build fails during compilation because 64-bits atomic are needed.


I have created and attached a patch that corrects these tests and adds latomic into LIBS for mips/mipsel.
With this patch package builds successfully on mips, mipsel, mips64el and i386 architectures.

Regards,
Radovan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add-latomic-for-mips32.patch
Type: text/x-patch
Size: 1391 bytes
Desc: add-latomic-for-mips32.patch
URL: <http://lists.alioth.debian.org/pipermail/pkg-mongodb-maintainers/attachments/20161128/0822f7b6/attachment.bin>


More information about the Pkg-mongodb-maintainers mailing list