HiGHS icon indicating copy to clipboard operation
HiGHS copied to clipboard

Breaks on i386 systems: ld: error: lib/libbasiclu.so: undefined reference to fmax

Open yurivict opened this issue 4 years ago • 6 comments

[ 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)

yurivict avatar May 05 '21 04:05 yurivict

Sorry about this. I'll try to get the fmin/fmax calls replace by min/max calls.

jajhall avatar May 10 '21 10:05 jajhall

OK thanks!

jajhall avatar May 10 '21 19:05 jajhall

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.

jajhall avatar May 14 '21 13:05 jajhall

@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.

galabovaa avatar Jun 17 '21 15:06 galabovaa

Are you using CMake to build?

Yes.

yurivict avatar Jun 17 '21 17:06 yurivict

Do we care that we don't support i386? According to https://en.wikipedia.org/wiki/I386, Linux dropped support 10 years ago.

odow avatar Feb 02 '22 08:02 odow

@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.

galabovaa avatar May 27 '23 13:05 galabovaa