Breaks on i386 systems: ld: error: lib/libbasiclu.so: undefined reference to fmax
[ 98% 151/152] : && /usr/bin/cc -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -L/usr/local/lib -fstack-protector-strong check/CMakeFiles/capi_unit_tests.dir/TestCAPI.c.o -o bin/capi_unit_tests -Wl,-rpath,/wrkdirs/usr/ports/math/highs/work/.build/lib lib/libhighs.so.1.0.0 lib/libipx.so lib/libbasiclu.so /usr/lib/libomp.so && :
FAILED: bin/capi_unit_tests
: && /usr/bin/cc -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -L/usr/local/lib -fstack-protector-strong check/CMakeFiles/capi_unit_tests.dir/TestCAPI.c.o -o bin/capi_unit_tests -Wl,-rpath,/wrkdirs/usr/ports/math/highs/work/.build/lib lib/libhighs.so.1.0.0 lib/libipx.so lib/libbasiclu.so /usr/lib/libomp.so && :
ld: error: lib/libbasiclu.so: undefined reference to fmax [--no-allow-shlib-undefined]
ld: error: lib/libbasiclu.so: undefined reference to fmin [--no-allow-shlib-undefined]
cc: error: linker command failed with exit code 1 (use -v to see invocation)
http://beefy17.nyi.freebsd.org/data/main-i386-default/pe67ae562eb4c_s64fe4400d/logs/highs-g20210408.log (IPv6 URL)
Sorry about this. I'll try to get the fmin/fmax calls replace by min/max calls.
OK thanks!
The fmin/max calls are in code written in C so are "correct". I understand that we need to have -lm as part of the link command.
@yurivict Are you using CMake to build?
Can you please try updating to the latest HIGHS master and check if you still get the issue?
Perhaps you could also run
cmake -DFAST_BUILD=ON ..
that may help linking issues as well.
Are you using CMake to build?
Yes.
Do we care that we don't support i386? According to https://en.wikipedia.org/wiki/I386, Linux dropped support 10 years ago.
@yurivict Did you manage to compile this? We have done a significant update of the CMake files so please give it another go with the latest version and, if you run into any further problems, let us know by opening a new issue.