flint icon indicating copy to clipboard operation
flint copied to clipboard

linker error during `make check` under macOS (duplicate symbol `_d_randtest2`)

Open jaganmn opened this issue 5 months ago • 2 comments

A colleague of mine is trying to check FLINT built under macOS. He does not hit #2048, perhaps because his architecture is x86_64 rather than aarch64 ... ? But he encounters a linker error at a later stage:

$ make check
<...>
   CC  mag/test/main.c
duplicate symbol '_d_randtest2' in:
     /private/var/folders/rr/q47s6xq93n1_lhj48t9rmqkr0000gn/T/main-4a8524.o
     ./libflint.a[85](double_interval_merged.o)
ld: 1 duplicate symbols
clang: error: linker command failed with exit code 1 (use -v to see 
invocation)
make: *** [build/mag/test/main] Error 1

Indeed, I see d_randtest2 defined twice (in the double_interval module and again in the tests), but perhaps other linkers have ignored it. He is, like me, using the native Apple LLVM, not Homebrew LLVM ...

jaganmn avatar Aug 27 '24 16:08 jaganmn