doublec / aliceml-abandoned

Moved to aliceml/aliceml
30 stars 1 forks source link

Internal exception running 'send more money' constraint example #1

Closed ardeujho closed 10 years ago

ardeujho commented 10 years ago

When running the constraint example from the Alice website an internal exception occurs:

...
import structure Search from "x-alice:/lib/gecode/Search"
Search.searchAll money  ;
### loaded signature from x-alice:/lib/gecode/Search
Internal exception
  Io {cause = Native (_val), function = "load",
   name =
      "distro/share/alice/lib/gecode/UnsafeGecode.dll"}
  while linking
      x-alice:/lib/gecode/UnsafeGecode

This is due to shared libraries needed by UnsafeGecode.dll not being in the library load path:

$ ldd UnsafeGecode.dll |grep "not found"
    libgecodekernel.so.8 => not found
    libgecodeint.so.8 => not found
    libgecodeset.so.8 => not found
    libseam.so.0 => not found
    libseam.so.0 => not found

Adding gecode/install/lib/ and distro/lib to the LD_LIBRARY_PATH fixes this issue. The build process should perhaps move the gecode/install/lib into distro/lib and include instructions to add distro/lib to the LD_LIBRARY_PATH and equivalent on Mac OS X.

doublec commented 10 years ago

Following up at aliceml/aliceml#2.