Version française
Home     About     Download     Resources     Contact us    
Browse thread
ocamlc problem on Mac OS X
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Roberto Bagnara <bagnara@c...>
Subject: ocamlc problem on Mac OS X

Dear all,

I have a problem compiling mlgmp (http://www.di.ens.fr/~monniaux/programmes.html.en)
under Mac OS X.  At some stage, the make process invokes

     ocamlc -g -custom gmp.cma test_suite.cmo -o test_suite

which results into

     gcc  -o 'test_suite' -I'/opt/local/lib/ocaml'  /tmp/camlprimd07b82.c  '-L/opt/local/lib/ocaml' '-lmlgmp' '-L.' \
       '-L' '-Wl,-rpath' '-lmpfr' '-lgmp' '-L/opt/local/lib/ocaml/gmp' -lcamlrun -lcurses -lpthread

and thus in the error

     /usr/bin/ld: -L: directory name missing

For comparison, under Linux the ocamlc command above results into

     gcc -Wl,-E -o 'test_suite' -I'/usr/lib/ocaml'  /tmp/camlprim8c1318.c  '-L/usr/lib/ocaml' '-lmlgmp' '-L.' \
       '-L/usr/lib' '-Wl,-rpath' '/usr/lib' '-lmpfr' '-lgmp' '-L/usr/lib/ocaml/gmp' -lcamlrun -lm  -ldl -lcurses -lpthread

which seems to suggest there is a bug in ocamlc (at least in the Mac OS X version).
Notice that using Objective Caml version 3.09.3 from Fink or version 3.09.2
from DarwinPorts does not make any difference.
Does anyone know what the problem might be?
All the best,

     Roberto

-- 
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara@cs.unipr.it