ocaml can't find it's standard libraries. #188

Closed
slaskis opened this Issue Dec 9, 2009 · 7 comments

Projects

None yet

3 participants

@slaskis
Contributor
slaskis commented Dec 9, 2009

It seems there's an issue with the ocaml formula. If i try to run a simple example "ocamlc unix.cmx foo -o bar" or just trying to start "camlp4o" i get this error:

Fatal error: cannot load shared library dllunix
Reason: dlopen(/usr/local/Cellar/objective-caml/3.11.1/lib/ocaml/stublibs/dllunix.so, 138): Symbol   not found: _caml_atom_table
  Referenced from: /usr/local/Cellar/objective-caml/3.11.1/lib/ocaml/stublibs/dllunix.so
  Expected in: flat namespace
 in /usr/local/Cellar/objective-caml/3.11.1/lib/ocaml/stublibs/dllunix.so

However, compiling using ocamlopt and using unix.cmxa instead works.

This problem is keeping my haxe formula back so it would be nice with a fix. Perhaps there's some path setting or such I've missed?

@slaskis
Contributor
slaskis commented Dec 9, 2009
@slaskis
Contributor
slaskis commented Dec 9, 2009

Tried the things in that thread (setting LD_LIBRARY_PATH, OCAMLLIB, CAMLLIB) and also tried some patches and build arguments from the macport version and it's still not working.

@joewilliams

I am trying to compile ocamlfind and am having the same issue.

@joewilliams

I built ocaml from source myself and had no issues with it, I'm not exactly sure what is the cause of the dllunix issue. I used:

./configure -prefix /opt/ocaml
make world
make opt
make install

I also tried doing this in the formula rather than what is currently in there but it didn't work either.

@joewilliams

After a bit of working on it, building without a prefix (/usr/local) works fine as well, my best guess is that the symlinks that homebrew uses is causing ocaml to have problems finding its libraries. Suggestions on changes to ./configure or to the ENV to make this work is appreciated. I am more than happy to integrate these into the Formula.

@mxcl
Member
mxcl commented Dec 16, 2009

best guess is that we shouldn't strip something. Try:

def skip_clean? path; true; end
@joewilliams

That worked great, I added a branch with this change to my fork http://github.com/joewilliams/homebrew/tree/188 if you would like to pull it from me.

@Sharpie Sharpie pushed a commit to Sharpie/homebrew that referenced this issue Sep 12, 2012
@mxcl Joe + mxcl Skip clean all of ocaml
Fixes #188.

Signed-off-by: Max Howell <max@methylblue.com>

I tested just cleaning lib and the test cases still didn't work.
20b5eea
@snakeyroc3 snakeyroc3 pushed a commit to snakeyroc3/homebrew that referenced this issue Dec 17, 2012
@mxcl Joe + mxcl Skip clean all of ocaml
Fixes #188.

Signed-off-by: Max Howell <max@methylblue.com>

I tested just cleaning lib and the test cases still didn't work.
eecb4c3
@traymond traymond pushed a commit to traymond/homebrew that referenced this issue Jul 22, 2014
@dpo dpo New formula for Arpack.
Closes #188.
Closes #511.
4673166
@ClashTheBunny ClashTheBunny pushed a commit to ClashTheBunny/homebrew that referenced this issue Jan 22, 2015
@mistydemeo mistydemeo glib: fix g_get_monotonic_time on non-Intel Macs
Fixes #188.
6a1d374
@amirmc amirmc referenced this issue in mirage/mirage-www Apr 20, 2015
Closed

Site build error locally #310

@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.