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
Thank you very much for making ortools-java available as maven project, it is much easier to use now! While experimenting with it, I ran into the following problem:
What version of OR-Tools and what language are you using?
'com.google.ortools:ortools-java:9.0.9048'
What operating system (Linux, Windows, ...) and version?
MacOS, Java Gradle Project
What did you do?
I am experimenting with ortools-java in two different gradle projects.
What did you expect to see
Since both projects have the same dependency as specified above, both projects should behave the same way.
What did you see instead?
While ortools-java works fine in one project, I get an UnsatisfiedLinkError in the other.
Anything else we should know about your project / environment
Debugging into the Loader.loadNativeLibraries(), I noticed that the Platform.RESOURCE_PREFIX differs between both projects.
In the implementation that is working fine, the class loader uses darwin-x86-64/ as resource to be loaded.
In contrast, the project with the UnsatisfiedLinkError uses darwin/ as resource. While a resource is found for darwin/, it seems to clash with some other library.
When I copy your class loader and replace Platform.RESOURCE_PREFIX with darwin-x86-64/, both projects are working without any problem.
The text was updated successfully, but these errors were encountered:
@Mizux , just tried the new com.google.ortools:ortools-java:9.1.9490. Seems the problem with the clashing library is solved by prefixing ortools. However, I still experience different behavior in two different projects. Again, Platform.RESOURCE_PREFIX differs in both projects. The working project now uses ortools-darwin-x86-64, the broken project uses ortools-darwin as ressource path. So I guess the difference is not so much in the complete path, but rather in the Platform.RESOURCE_PREFIX.
It might be relevant to mention, that the working project is meant to be a library for the broken project. When I override the Platform.RESOURCE_PREFIX in my working project, I can use it as a library for the other project without any problems. Any ideas why Platform.RESOURCE_PREFIX might be different on the same computer?
PS: As described #2802, I also had problems with the linux dependency and solved it by saving com.google.ortools:ortools-linux-x86-64:9.1.9490 on maven local.
@cbtumPlatform.RESOURCE_PREFIX is computed by g:net.java.dev.jna a:jna-platform which has changed its behavior between 5.5.0 and 5.8.0 so you should try to check which version you are using in both projects ?
Thank you very much for making ortools-java available as maven project, it is much easier to use now! While experimenting with it, I ran into the following problem:
What version of OR-Tools and what language are you using?
'com.google.ortools:ortools-java:9.0.9048'
What operating system (Linux, Windows, ...) and version?
MacOS, Java Gradle Project
What did you do?
I am experimenting with ortools-java in two different gradle projects.
What did you expect to see
Since both projects have the same dependency as specified above, both projects should behave the same way.
What did you see instead?
While ortools-java works fine in one project, I get an UnsatisfiedLinkError in the other.
Anything else we should know about your project / environment
Loader.loadNativeLibraries(), I noticed that thePlatform.RESOURCE_PREFIXdiffers between both projects.darwin-x86-64/as resource to be loaded.darwin/as resource. While a resource is found fordarwin/, it seems to clash with some other library.Platform.RESOURCE_PREFIXwithdarwin-x86-64/, both projects are working without any problem.The text was updated successfully, but these errors were encountered: