Link & load on Mac (10.14.6 with Xcode 11)
AnsweredI can compile, link but the code refuses to load because the gurobi library is not codesigned apparently. Here is the error I get (It used to work fine with the previous version of Xcode that did _not_ insist on code being signed). Any suggested workaround ?
Thanks!
Here is the error message:
dyld: Library not loaded: /Library/gurobi811/mac64/lib/libgurobi81.dylib
Referenced from: /Users/ldm/Library/Developer/Xcode/DerivedData/ObjecticeCP-gpkxbaxnppvxooeoqqgpehxkvobc/Build/Products/Debug/objmp.framework/Versions/A/objmp
Reason: no suitable image found. Did find:
/Library/gurobi811/mac64/lib/libgurobi81.dylib: code signature in (/Library/gurobi811/mac64/lib/libgurobi81.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
I did *manually* codesign with my own identity with:
codesign -s <emailIdentityHere> /Library/gurobi811/mac64/lib/libgurobi81.dylib
That resolved the problem for now. But the library should really be codesigned up stream I think.
0 -
Hello Laurent,
thanks for pointing out that libgurobi81.dylib is not code signed. Which Xcode setting in your project enforces this signage check, and why do you need to build your project with these settings?
Could you also please verify that you can compile and run the examples in the distribution (w/o Xcode) by doing in a terminal
$ clang -m64 -g -o mip1_c /Library/gurobi811/mac64/examples/c/mip1_c.c -I/Library/gurobi811/mac64/include/ -L/Library/gurobi811/mac64/lib -lgurobi81 -lm
$ ./mip1_c
You should see the output from the solver.
Robert
0 -
This is the default in Xcode. All applications are signed. If you want anything to install without hiccups that's the way to go. It's not particularly difficult to do and we can get around by signing your library with our keys. But that defeats the purpose of code signatures.
The example compiles and runs file. But that's normal since the executable isn't signed either.
Best,
---
Laurent
0 -
OK, thanks for letting us know, we'll look into this.
Robert
0 -
You're welcome.
Best,
---
Laurent
0
Post is closed for comments.
Comments
6 comments