Source: cudf
Version: 0.10-4
Severity: serious
Tags: ftbfs

https://buildd.debian.org/status/logs.php?pkg=cudf&ver=0.10-4%2Bb2

...
make -C c-lib all
make[3]: Entering directory '/<<PKGBUILDDIR>>/c-lib'
ocamlfind ocamlc -package unix,extlib -linkpkg -I 
../_build/install/default/lib/cudf/ ../_build/install/default/lib/cudf/cudf.cma 
cudf_c.ml
ocamlfind ocamlc -package unix,extlib -linkpkg -output-obj -o cudf-caml.o 
../_build/install/default/lib/cudf/cudf.cma cudf_c.cmo
cc -Wall -DG_LOG_DOMAIN=\"libCUDF\" -I . -I 
/usr/lib/arm-linux-gnueabi/ocaml/5.2.0 -I/usr/include/glib-2.0 
-I/usr/lib/arm-linux-gnueabi/glib-2.0/include -I/usr/include/sysprof-6 -pthread 
 -c caml_hash_variant.c
> dummy.ml
ocamlc -o dummy.o -output-obj dummy.ml
cc -Wall -DG_LOG_DOMAIN=\"libCUDF\" -o caml_hash_variant caml_hash_variant.o 
dummy.o -L/usr/lib/arm-linux-gnueabi/ocaml/5.2.0 -lcamlrun -lzstd -lm -lcurses 
-ldl
/usr/bin/ld: /usr/lib/arm-linux-gnueabi/ocaml/5.2.0/libcamlrun.a(fiber.b.o): in 
function `caml_alloc_stack':
(.text+0x2a0): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: /usr/lib/arm-linux-gnueabi/ocaml/5.2.0/libcamlrun.a(fiber.b.o): in 
function `caml_alloc_main_stack':
(.text+0x78c): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: 
/usr/lib/arm-linux-gnueabi/ocaml/5.2.0/libcamlrun.a(runtime_events.b.o): in 
function `write_to_ring.constprop.0':
(.text+0x11c): undefined reference to `__atomic_load_8'
/usr/bin/ld: (.text+0x138): undefined reference to `__atomic_load_8'
/usr/bin/ld: (.text+0x278): undefined reference to `__atomic_store_8'
/usr/bin/ld: (.text+0x2ec): undefined reference to `__atomic_store_8'
/usr/bin/ld: (.text+0x39c): undefined reference to `__atomic_store_8'
/usr/bin/ld: 
/usr/lib/arm-linux-gnueabi/ocaml/5.2.0/libcamlrun.a(runtime_events.b.o): in 
function `runtime_events_create_from_stw_single.part.0':
(.text+0x9ac): undefined reference to `__atomic_store_8'
/usr/bin/ld: (.text+0x9c4): undefined reference to `__atomic_store_8'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile.variants:68: caml_hash_variant] Error 1



This is due to a gcc bug:
  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81358

The usual workaround would be something like:
  ifneq (,$(filter $(DEB_HOST_ARCH), armel m68k powerpc sh4))
    export DEB_LDFLAGS_MAINT_APPEND += -Wl,--no-as-needed -latomic 
-Wl,--as-needed
  endif

But this workaround would work poorly when the atomic usage is
in a static library.

Could findlib emit -latomic at the end of the libraries
on these architectures?

Reply via email to