eliaskosunen/scnlib

Building with packaged fast_float is broken

Closed this issue · 0 comments

Build with packaged version of fast_float library is broken:

[17/81] : && /usr/bin/g++ -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -DNDEBUG -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 test/CMakeFiles/test-test.dir/test.cpp.o -o test/test-test  -Wl,-rpath,/builddir/build/BUILD/scnlib-1.0/redhat-linux-build  libscn.so.0  -lfast_float && :
FAILED: test/test-test 
: && /usr/bin/g++ -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -DNDEBUG -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 test/CMakeFiles/test-test.dir/test.cpp.o -o test/test-test  -Wl,-rpath,/builddir/build/BUILD/scnlib-1.0/redhat-linux-build  libscn.so.0  -lfast_float && :
/usr/bin/ld: cannot find -lfast_float
collect2: error: ld returned 1 exit status

fast_float is a header-only library, that's why asking linker to link against it with -lfast_float is bogus: https://github.com/eliaskosunen/scnlib/blob/v1.0/CMakeLists.txt#L86-L87

find_package(FastFloat) and FastFloat::fast_float should be used.