aws / dcv-color-primitives

DCV Color Primitives Library
MIT No Attribution
30 stars 22 forks source link

Linking failure with Rust 1.55 on Linux #55

Closed saste closed 3 years ago

saste commented 3 years ago

We recently upgraded to Rust 1.55 and we are observing this failure on several platforms (x86_64 + centos7/8, Ubuntu18/20, sles12/15, ARM + ubuntu18. For some reason centos7/8 and ubuntu20 works fine for ARM).

This is the failure I get on CentOS7:

Run-time dependency threads found: YES
Library dcv_color_primitives found: YES
Library dl found: YES
Library ws2_32 found: NO
Library userenv found: NO
Checking if "clock_gettime" links: YES 
Build targets in project: 1
Found ninja-1.10.2.git.kitware.jobserver-1 at /usr/bin/ninja
[1/2] Compiling C object 'c_tests/1a332ed@@unit@exe/unit.c.o'.
[2/2] Linking target c_tests/unit.
FAILED: c_tests/unit 
cc  -o c_tests/unit 'c_tests/1a332ed@@unit@exe/unit.c.o' -L/tmp/build-artifacts.sh-gjMA1/build/inst/lib -L/usr/local/lib -Wl,--as-needed -Wl,--no-undefined -fstack-protector -g -O2 -fno-strict-aliasing -Wformat -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wl,-z,now -pthread -Wl,--start-group /tmp/build-artifacts.sh-gjMA1/build/sources/dcv-color-primitives-0.2.0/target/release/libdcv_color_primitives.a -ldl -Wl,--end-group
/tmp/build-artifacts.sh-gjMA1/build/sources/dcv-color-primitives-0.2.0/target/release/libdcv_color_primitives.a(std-008055cc7d873802.std.cf1c8f7e-cgu.0.rcgu.o): In function `std::f32::_$LT$impl$u20$f32$GT$::lerp::h6395a3c9e15adad4':
/rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b//library/std/src/f32.rs:914: undefined reference to `fmaf'
/tmp/build-artifacts.sh-gjMA1/build/sources/dcv-color-primitives-0.2.0/target/release/libdcv_color_primitives.a(std-008055cc7d873802.std.cf1c8f7e-cgu.0.rcgu.o): In function `std::f64::_$LT$impl$u20$f64$GT$::lerp::h20746ba37427db50':
/rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b//library/std/src/f64.rs:916: undefined reference to `fma'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

I got a similar failure on the other platforms.

fabiosky commented 3 years ago

Looks good to me, needs addressing the linter warnings before merging

pbor commented 3 years ago

solved