Your message dated Wed, 19 Jul 2017 12:49:20 +0000
with message-id <e1dxopo-0007gj...@fasolo.debian.org>
and subject line Bug#868787: fixed in erlang-p1-cache-tab 1.0.9-2
has caused the Debian Bug report #868787,
regarding erlang-p1-cache-tab: FTBFS on mips, mipsel and powerpc: undefined
symbol: __sync_add_and_fetch_8'
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
868787: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=868787
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Source: erlang-p1-cache-tab
Version: 1.0.9-1
Severity: serious
Tags: sid buster patch
Hi,
erlang-p1-cache-tab FTBFS on mips, mipsel and powerpc with this error
while running the testsuite:
> Failed to load NIF /<<PKGBUILDDIR>>/priv/lib/ets_cache: Failed to load NIF
> library: '/<<PKGBUILDDIR>>/priv/lib/ets_cache.so: undefined symbol:
> __sync_add_and_fetch_8' (load_failed)
This happens because these architectures do not implement 64-bit atomics
natively. The fix is to use libatomic (part of GCC) which provides
helper routines for these missing atomics, implemented using locks.
The attached patch does this by:
- Linking against libatomic
- Switching from __sync_add_and_fetch to __atomic_add_fetch
One side effect of this is that libatomic is pulled in on every
architecture. If you don't like this, you can use -Wl,--as-needed.
Thanks,
James
--- a/c_src/ets_cache.c
+++ b/c_src/ets_cache.c
@@ -100,7 +100,7 @@ static ERL_NIF_TERM incr_counter(ErlNifE
if (enif_get_uint(env, argv[0], &counter))
if (counter < max_counters) {
if (counters[counter] != MAX_UINT64)
- return enif_make_uint64(env, __sync_add_and_fetch(counters + counter, 1));
+ return enif_make_uint64(env, __atomic_add_fetch(counters + counter, 1, __ATOMIC_SEQ_CST));
}
return enif_make_badarg(env);
--- a/rebar.config
+++ b/rebar.config
@@ -24,7 +24,7 @@
{port_specs, [{"priv/lib/ets_cache.so", ["c_src/ets_cache.c"]}]}.
-{port_env, [{"CFLAGS", "$CFLAGS -g -O2 -Wall"}]}.
+{port_env, [{"CFLAGS", "$CFLAGS -g -O2 -Wall"}, {"LDFLAGS", "$LDFLAGS -latomic"}]}.
{cover_enabled, true}.
{cover_export_enabled, true}.
signature.asc
Description: OpenPGP digital signature
--- End Message ---
--- Begin Message ---
Source: erlang-p1-cache-tab
Source-Version: 1.0.9-2
We believe that the bug you reported is fixed in the latest version of
erlang-p1-cache-tab, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 868...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Philipp Huebner <debala...@debian.org> (supplier of updated erlang-p1-cache-tab
package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Wed, 19 Jul 2017 14:41:00 +0200
Source: erlang-p1-cache-tab
Binary: erlang-p1-cache-tab
Architecture: source amd64
Version: 1.0.9-2
Distribution: unstable
Urgency: medium
Maintainer: Philipp Huebner <debala...@debian.org>
Changed-By: Philipp Huebner <debala...@debian.org>
Description:
erlang-p1-cache-tab - in-memory cache application for Erlang / Elixir apps
Closes: 868787
Changes:
erlang-p1-cache-tab (1.0.9-2) unstable; urgency=medium
.
* Added patch to fix FTBFS on mips, mipsel and powerpc (Closes: #868787)
Thanks James Cowgill <jcowg...@debian.org>!
Checksums-Sha1:
a6fbd754c7a94d9ecc70cc0b30824b652f4c5bd8 2091 erlang-p1-cache-tab_1.0.9-2.dsc
bcb69c9274834313a9db01560f3c3435139f9bd1 3568
erlang-p1-cache-tab_1.0.9-2.debian.tar.xz
6d9e82cb79988192d41d1b43b9b3794c65ec9eb2 6074
erlang-p1-cache-tab-dbgsym_1.0.9-2_amd64.deb
43f8df74a2a94fffc7a5647a4a562e634187adf5 9042
erlang-p1-cache-tab_1.0.9-2_amd64.buildinfo
c187a10759aefe061b26520f3dbfc16aa8a412b9 41030
erlang-p1-cache-tab_1.0.9-2_amd64.deb
Checksums-Sha256:
09990bf1f60e6ec7a99d6ec1810c556d33778b7ee7250fc64b3df7921529788e 2091
erlang-p1-cache-tab_1.0.9-2.dsc
e45549f14ceed86f41919352089bf82095081e82f9e415bdcc888625a883233d 3568
erlang-p1-cache-tab_1.0.9-2.debian.tar.xz
18ed65324bfba038101902e04238df4f27f980bed336ca44d5de92e72a1f5e79 6074
erlang-p1-cache-tab-dbgsym_1.0.9-2_amd64.deb
b0954e10ddc71e1c7a623ea58c2bbd4f13829e5472337833fe3c1c6791dbf884 9042
erlang-p1-cache-tab_1.0.9-2_amd64.buildinfo
c227d78afca66c4a831e88ccd6cc2a38a47692c4acdb29468059b291752bd0ec 41030
erlang-p1-cache-tab_1.0.9-2_amd64.deb
Files:
f659785480d6c8694d346c45aa3ad926 2091 libs optional
erlang-p1-cache-tab_1.0.9-2.dsc
aa23d3eca95045a5d78a32b861d4116b 3568 libs optional
erlang-p1-cache-tab_1.0.9-2.debian.tar.xz
46d3b840a940dc4e880237676ed14825 6074 debug extra
erlang-p1-cache-tab-dbgsym_1.0.9-2_amd64.deb
b717959622377d10b1319c14120e6f69 9042 libs optional
erlang-p1-cache-tab_1.0.9-2_amd64.buildinfo
d4bb4de9556e443fa8ececbb4f745209 41030 libs optional
erlang-p1-cache-tab_1.0.9-2_amd64.deb
-----BEGIN PGP SIGNATURE-----
iQJJBAEBCgAzFiEECEGLvkRyDy26xQXsunokltrkDRwFAllvU80VHGRlYmFsYW5j
ZUBkZWJpYW4ub3JnAAoJELp6JJba5A0c5dQQALY5QMgrqR2FDzytLMbLtTDWe1E1
t4tg4K2bUUHfjEmLDt5aeggdr106z80L4z/+Wn5eY63NqkwNHAIVSCe47T4/GTp8
0PT3HYRfTEjNwfA4glQUfHhkgXP7tQ0gKjdxWAFFhHt+n7BY1i9dx5gJvdnG7bMI
DX8LnUSkyb3ywpYG4k6kiSFkRwr8sraQPvx7/AfpcCTf5joZWWwVi5+eUB5W9hPY
gJrElZAtp7Dab79AtlvKCVawdF9tD9Oz6NKa7L65YuWXnOGa+xNbbZUAslN6vyFy
uIrajdwSapQPawqC0I6VghgR78sxcwiyHYfmdkYvI/on2a1mBFPGXK9+KnlMZsci
/k9Q+kthGh/LBYPU5z5dbFPmCf2aoCyDE9kLxTQPqGWjWxZf1bMxSzaKI3C5W8V8
b7frhZN9KpCvTLvB76X1hJAbYGvL7YuxGJP+KN599GPx+V9YF6RcSfrjJTJLDaf6
ZkZODFYavjdPVSVyzurOUU5ROY6lcf/EyVWo9P4xVQq1U6vDg7sTAbFEIDpRWhJg
INQDK3mjM/XVraSWqVHmt7ALJlR3ei55mQtl3WIspVWRjyBJs9xl5gnb7MX61Lj8
AmhJcz3+YJpjBHemPl/Z4OSow3GIc3DkSJYyaqVVQxxyY5V7iC1wkWUtWz9c8900
NXUCqmaY+m277VnM
=uUe/
-----END PGP SIGNATURE-----
--- End Message ---