You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, with OR Tools 9.13 on Mac, libortools.dylib links to libscip.9.2.dylib without including rpath (while all of the other linked libraries include it). This leads to linkage errors with downstream projects.
What version of OR-Tools and what language are you using?
Version: 9.13
Language: C++
Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi) n/a
What operating system (Linux, Windows, ...) and version? macOS 15.5
What did you do?
Run otool -L lib/libortools.dylib.
What did you expect to see
lib/libortools.dylib:
...
@rpath/libClpSolver.1.dylib (compatibility version 1.0.0, current version 1.17.10)
@rpath/libscip.9.2.dylib (compatibility version 9.2.0, current version 9.2.2)
@rpath/libabsl_flags_usage_internal.2505.0.0.dylib (compatibility version 2505.0.0, current version 0.0.0)
...
What did you see instead?
lib/libortools.dylib:
...
@rpath/libClpSolver.1.dylib (compatibility version 1.0.0, current version 1.17.10)
libscip.9.2.dylib (compatibility version 9.2.0, current version 9.2.2)
@rpath/libabsl_flags_usage_internal.2505.0.0.dylib (compatibility version 2505.0.0, current version 0.0.0)
...
Anything else we should know about your project / environment n/a
Reacted by Stefen Orban, Simon Jesenko, Oliver Beattie, lmores, Robin East and Sandro Huber
Did you use a M1 (aarch64) or intel (x86_64) based macOS ?
EDIT: all macos are impacted linux and windows seems to work as expected
Sinon .Net and Java meta package depend on all package we need to redoo a full release for theses platforms.
on Pypi.org each wheel is uploaded side by side so we only have to upload a new release for macos only...
ToDo:
Remove pypi macos wheel packages
Add a check in tools/release/ scripts to detect it
Probably related - using DotNet wrapper also results in error on macos due to libscip library:
System.TypeInitializationException: The type initializer for 'Google.OrTools.Sat.operations_research_satPINVOKE' threw an exception.
---> System.TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception.
---> System.DllNotFoundException: Unable to load shared library 'google-ortools-native' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environ
ment variable:
dlopen(/#####/Debug/net9.0/runtimes/osx-arm64/native/google-ortools-native.dylib, 0x0001): Library not loaded: /Users/corentinl/work/stable/temp_dotnet/lib/libscip.9.2.dylib
...
They are storing a "path" (i.e. a string) into a variable which should be use to store TRUE or FALSE and CMake if(string) is always FALSE unless store a "TRUE" constant which is not the case here leading to NOT using @rpath directory prefix...
note: Also since each projects already use set(CMAKE_MACOSX_RPATH TRUE) in root CMakeLists.txt they should just stop playing with MACOSX_RPATH target property imho...
Next step: contact SCIP and HiGHS team to confirm and fix upstream...
Activity
Mizux commentedon Jun 7, 2025
Did you use a M1 (aarch64) or intel (x86_64) based macOS ?
EDIT: all macos are impacted linux and windows seems to work as expected
Sinon .Net and Java meta package depend on all package we need to redoo a full release for theses platforms.
on Pypi.org each wheel is uploaded side by side so we only have to upload a new release for macos only...
ToDo:
DevNote:
This command should catch them
ankane commentedon Jun 7, 2025
Both aarch64 and x86-64 have the issue.
jesenko commentedon Jun 10, 2025
Probably related - using DotNet wrapper also results in error on macos due to
libsciplibrary:tools/release: Detect /Users path in libortools.dylib (#4674)
tools/release: Detect /Users path in libortools.dylib (#4674)
tools/release: Detect /Users path in libortools.dylib (#4674)
dependencies: Fix MACOSX_RPATH usage (#4674)
Mizux commentedon Jun 11, 2025
TLDR: read 5587f01 which fix all...
AFAIK HiGHS, Soplex and SCIP wrongly use MACOSX_RPATH (copycat
^^;?)https://github.com/ERGO-Code/HiGHS/blob/master/highs/CMakeLists.txt#L46
https://github.com/scipopt/soplex/blob/master/src/CMakeLists.txt#L7
https://github.com/scipopt/scip/blob/v922/src/CMakeLists.txt#L9
They are storing a "path" (i.e. a string) into a variable which should be use to store TRUE or FALSE and CMake
if(string)is always FALSE unless store a "TRUE" constant which is not the case here leading to NOT using @rpath directory prefix...ref: https://cmake.org/cmake/help/latest/command/if.html#string
note: Also since each projects already use
set(CMAKE_MACOSX_RPATH TRUE)in root CMakeLists.txt they should just stop playing withMACOSX_RPATHtarget property imho...Next step: contact SCIP and HiGHS team to confirm and fix upstream...
tools/release: Detect /Users path in libortools.dylib (#4674)
dependencies: Fix MACOSX_RPATH usage (#4674)
Mizux commentedon Jun 19, 2025
Fixed on v9.14
ankane commentedon Jun 19, 2025
9.14 works great. Big thanks @Mizux!