AlloyTools / org.alloytools.alloy

Alloy is a language for describing structures and a tool for exploring them. It has been used in a wide range of applications from finding holes in security mechanisms to designing telephone switching networks. This repository contains the code for the tool.
Other
696 stars 124 forks source link

Solver libraries fail to load on linux #103

Closed MarkoSchuetz closed 2 years ago

MarkoSchuetz commented 4 years ago

Alloy fails to load dynamic libraries of the included solvers from the jar file.

I installed alloy from AUR on 64 bit Linux. The jar file does contain e.g.

99085 Sun Feb 22 19:21:37 AST 2015 amd64-linux/libglucose.so

However, when I launch alloy, I get messages:

Failed to load: libglucose.so

How do I get alloy to find these libraries?

avanegas-carecloud commented 4 years ago

I have the same problem on Windows 10. The messages are:

Failed to load: minisat.dll
Failed to load: minisatprover.dll
Failed to load: lingeling.dll
Failed to load: glucose.dll
Failed to load: cryptominisat.dll
jiayiyang1997 commented 4 years ago

I ran it on Windows 10 and met the same problem. Finally I found it was because the .dll given is 32bits while my JVM is 64bits. Thus the library wasn't loaded successfully. Now I'm trying to install a 32bits JVM and run it again.

andrewsoutar commented 3 years ago

As a workaround, I've found that if you extract the libraries from the jar (they'll be in amd64-linux or x86-linux) and point your LD_LIBRARY_PATH at the extracted copies, Alloy will pick them up just fine. e.g.

unzip org.alloytools.alloy.dist.jar -d alloy-unzip 'amd64-linux/*'
LD_LIBRARY_PATH="$(pwd)/alloy-unzip/amd64-linux" java -jar org.alloytools.alloy.dist.jar

Not sure what the equivalent would be on Windows but I would imagine it might work there too.

pkriens commented 2 years ago

Please check against 6,0 and reopen when it still fails.