ERGO-Code / HiGHS

Linear optimization software
MIT License
848 stars 164 forks source link

Build fails on macOS: `f951: Error: '-fno-fat-lto-objects' are supported only with linker plugin` #1801

Closed barracuda156 closed 2 weeks ago

barracuda156 commented 2 weeks ago
  f951: Error: '-fno-fat-lto-objects' are supported only with linker plugin
  make[2]: *** [src/CMakeFiles/FortranHighs.dir/interfaces/highs_fortran_api.f90.o] Error 1
  make[2]: Leaving directory `/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_math_HiGHS/HiGHS/work/build'
  make[1]: *** [src/CMakeFiles/FortranHighs.dir/all] Error 2
  make[1]: *** Waiting for unfinished jobs....
barracuda156 commented 2 weeks ago

For some reason a pure GCC build on my 10.6 did not complain, but Clang + gfortran on CI fails: https://github.com/macports/macports-ports/actions/runs/9487009099/job/26142622690?pr=24455

UPD. That is because on 10.6 with gcc it detected no LTO support, so it was disabled, and offending flag was not added.

galabovaa commented 2 weeks ago

Thank you for raising this, @barracuda156. I reproduced the issue on my mac, addressed in https://github.com/ERGO-Code/HiGHS/pull/1802, which will be merged in latest after @jajhall 's review.

galabovaa commented 2 weeks ago

Merged in latest!