Closed astefano closed 10 years ago
(Your post scriptum makes this particularly strange.)
The package
action in sbt builds the file lib-bin/libscalaz3.so
. What happens if you put that file explicitly in your LD_LIBRARY_PATH
?
This should prevent ScalaZ3 from trying to unpack the version stored in the jar file.
Hi,
Changing LD_LIBRARY_PATH doesn't seem to have any effect, the /tmp/ScalaZ3.... is created nonetheless... But as i saying, i can use ScalaZ3 from my scala project with sbt, i was just wondering why i cannot use scala directly.
Best, Lacramioara
lacramioara@ubuntu:/media/ubuntuPart2/Tools/ScalaZ3-master$ echo $LD_LIBRARY_PATH :/media/ubuntuPart2/Tools/z3/lib:/media/ubuntuPart2/Tools/mfAll/lib:/media/ubuntuPart2/Tools/ScalaZ3-master/lib-bin/ lacramioara@ubuntu:/media/ubuntuPart2/Tools/ScalaZ3-master$ scala Fibonacci.scala java.lang.UnsatisfiedLinkError: /tmp/SCALAZ3_155c903ca7e7b3e2124cba9a911813b/lib-bin/libscalaz3.so: /tmp/SCALAZ3_155c903ca7e7b3e2124cba9a911813b/lib-bin/libscalaz3.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch) at java.lang.ClassLoader$NativeLibrary.load(Native Method)
Do you run a 32bit JVM on a 64bit architecture? This is often the cause of this problem.
Can you make sure that scala
as invoked from the command line invokes the same java
as sbt does?
All these build problems should be solved in the most recent version of Scalaz3. Please re-open if you experience similar issues with it.
Hi,
I've followed the setup steps for Linux with an a priori compilation of the latest Z3 branch for my architecture (64 bits). Some of the tests succeed, but:
lacramioara@ubuntu:/media/ubuntuPart2/Tools/ScalaZ3-master$ scala -cp scalaz3.jar Fibonacci.scala
gives me:
java.lang.UnsatisfiedLinkError: /tmp/SCALAZ3_155c903ca7e7b3e2124cba9a911813b/lib-bin/libscalaz3.so: /tmp/SCALAZ3_155c903ca7e7b3e2124cba9a911813b/lib-bin/libscalaz3.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch) at java.lang.ClassLoader$NativeLibrary.load(Native Method) \vdots
Can you please help me with a piece of advice? I add that my jvm is on 64 bits.
Thanks, Lacramioara
PS I can successfully make use of the functionalities of ScalaZ3 from inside sbt, either with test or with run. So my guess is that the problem is with building the jar...