Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006046OCamlOCaml internal build/install (Makefiles, configure)public2013-06-21 17:362013-07-23 17:30
Reporteravsm 
Assigned Todoligez 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
Platformdebian wheezyOSOS Version
Product Version 
Target Version4.01.0+devFixed in Version 
Summary0006046: testsuite picks up the wrong ocamlrun dlls
DescriptionI 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
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0009767)
doligez (administrator)
2013-07-12 17:09

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.
(0009773)
avsm (reporter)
2013-07-12 17:38

I got the ordering from the manual here: http://caml.inria.fr/pub/docs/manual-ocaml/manual024.html [^]
(section 10.3)
(0009835)
doligez (administrator)
2013-07-23 17:30

Reproduced on Mac OS.

Patch applied (4.01 branch, rev 13925).

- Issue History
Date Modified Username Field Change
2013-06-21 17:36 avsm New Issue
2013-06-21 17:46 gasche Assigned To => doligez
2013-06-21 17:46 gasche Status new => assigned
2013-07-12 17:09 doligez Note Added: 0009767
2013-07-12 17:09 doligez Target Version => 4.01.0+dev
2013-07-12 17:38 avsm Note Added: 0009773
2013-07-15 11:22 frisch Target Version 4.01.0+dev => 4.01.1+dev
2013-07-23 16:52 doligez Target Version 4.01.1+dev => 4.01.0+dev
2013-07-23 17:30 doligez Note Added: 0009835
2013-07-23 17:30 doligez Status assigned => closed
2013-07-23 17:30 doligez Resolution open => fixed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker