Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testsuite picks up the wrong ocamlrun dlls #6046

Closed
vicuna opened this issue Jun 21, 2013 · 3 comments
Closed

testsuite picks up the wrong ocamlrun dlls #6046

vicuna opened this issue Jun 21, 2013 · 3 comments
Assignees
Milestone

Comments

@vicuna
Copy link

vicuna commented Jun 21, 2013

Original bug ID: 6046
Reporter: @avsm
Assigned to: @damiendoligez
Status: closed (set by @damiendoligez on 2013-07-23T15:30:59Z)
Resolution: fixed
Priority: normal
Severity: minor
Platform: debian wheezy
Target version: 4.01.0+dev
Category: configure and build/install

Bug description

I have 3.12.1 installed as my system ocaml compiler, and then a checkout of the 4.01 branch of ocaml.

The bigarray tests fail:
~/src/git/ocaml/ocaml/testsuite$ make one DIR=tests/lib-bigarray
Running tests from 'tests/lib-bigarray' ...
... testing 'bigarrays.ml': ocamlcFatal error: unknown C primitive `caml_ba_dim_1'
make[4]: *** [run-file] Error 2
=> failed
... testing 'fftba.ml': ocamlc ocamlopt => passed
... testing 'pr5115.ml': ocamlc ocamlopt => passed

If I apply the patch below to set CAML_LD_LIBRARY_PATH instead of LD_LIBRARY_PATH, then the latest dllbigarray.so is picked up, and the test passes.

diff --git a/testsuite/makefiles/Makefile.common b/testsuite/makefiles/Makefile.common
index 5f543c6..9d2716d 100644
--- a/testsuite/makefiles/Makefile.common
+++ b/testsuite/makefiles/Makefile.common
@@ -22,7 +22,7 @@ CYGPATH=echo
DIFF=diff -q
CANKILL=true
SORT=sort
-SET_LD_PATH=LD_LIBRARY_PATH="$(LD_PATH)"
+SET_LD_PATH=CAML_LD_LIBRARY_PATH="$(LD_PATH)"

The variables above may be overridden by .../config/Makefile

OTOPDIR is either TOPDIR or WINTOPDIR, whichever is appropriate for

~/src/git/ocaml/ocaml/testsuite$ make one DIR=tests/lib-bigarray 2>&1|more
Running tests from 'tests/lib-bigarray' ...
... testing 'bigarrays.ml': ocamlc ocamlopt => passed
... testing 'fftba.ml': ocamlc ocamlopt => passed
... testing 'pr5115.ml': ocamlc ocamlopt => passed

This is because the system ocaml has a /usr/lib/ocaml/stublibs in its ld.conf, which has a higher precedence than LD_LIBRARY_PATH (but not CAML_LD_LIBRARY_PATH).

Steps to reproduce

have 3.12.1 system compiler installed

$ cd testsuite
$ make one DIR=tests/lib-bigarray

@vicuna
Copy link
Author

vicuna commented Jul 12, 2013

Comment author: @damiendoligez

Because the precedence of CAML_LD_LIBRARY_PATH is not documented, I think a better solution will be to set the OCAMLLIB variable to a directory with a ld.conf file built for this purpose.

@vicuna
Copy link
Author

vicuna commented Jul 12, 2013

Comment author: @avsm

I got the ordering from the manual here: http://caml.inria.fr/pub/docs/manual-ocaml/manual024.html
(section 10.3)

@vicuna
Copy link
Author

vicuna commented Jul 23, 2013

Comment author: @damiendoligez

Reproduced on Mac OS.

Patch applied (4.01 branch, rev 13925).

@vicuna vicuna closed this as completed Jul 23, 2013
@vicuna vicuna added this to the 4.01.0 milestone Mar 14, 2019
@vicuna vicuna added the bug label Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants