caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* ocamlc problem on Mac OS X
@ 2007-03-13  5:44 Roberto Bagnara
  2007-03-13 13:46 ` [Caml-list] " Xavier Leroy
  0 siblings, 1 reply; 4+ messages in thread
From: Roberto Bagnara @ 2007-03-13  5:44 UTC (permalink / raw)
  To: caml-list


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] ocamlc problem on Mac OS X
  2007-03-13  5:44 ocamlc problem on Mac OS X Roberto Bagnara
@ 2007-03-13 13:46 ` Xavier Leroy
  2007-03-13 16:12   ` Roberto Bagnara
  0 siblings, 1 reply; 4+ messages in thread
From: Xavier Leroy @ 2007-03-13 13:46 UTC (permalink / raw)
  To: Roberto Bagnara; +Cc: caml-list

> I have a problem compiling mlgmp
>     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

> which seems to suggest there is a bug in ocamlc (at least in the Mac OS
> X version).

I believe the problem comes from the way your configured mlgmp in your
Mac OS X build.  If I guess correctly, in Makefile you left GMP_LIBDIR
empty and kept the Linux definition of RLIBFLAGS instead of selecting
the MacOS X one.  You will be readily excused, as mlgmp's
configuration is hardly described.  But if you have further problems,
may I suggest you take them with the author of mlgmp first?

- Xavier Leroy


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] ocamlc problem on Mac OS X
  2007-03-13 13:46 ` [Caml-list] " Xavier Leroy
@ 2007-03-13 16:12   ` Roberto Bagnara
  0 siblings, 0 replies; 4+ messages in thread
From: Roberto Bagnara @ 2007-03-13 16:12 UTC (permalink / raw)
  To: Xavier Leroy; +Cc: caml-list

Xavier Leroy wrote:
>> I have a problem compiling mlgmp
>>     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
> 
>> which seems to suggest there is a bug in ocamlc (at least in the Mac OS
>> X version).
> 
> I believe the problem comes from the way your configured mlgmp in your
> Mac OS X build.  If I guess correctly, in Makefile you left GMP_LIBDIR
> empty and kept the Linux definition of RLIBFLAGS instead of selecting
> the MacOS X one.  You will be readily excused, as mlgmp's
> configuration is hardly described.

Thanks Xavier: I have been told (I do not use Mac OS X myself) that that
was indeed the problem.

> But if you have further problems,
> may I suggest you take them with the author of mlgmp first?

This is what I did one month ago, but got no answer.  Moreover, it seemed
that ocamlc was generating an invalid gcc '-L' option.
Thanks a lot,

     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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* ocamlc problem on Mac OS X
@ 2007-02-14 20:01 Roberto Bagnara
  0 siblings, 0 replies; 4+ messages in thread
From: Roberto Bagnara @ 2007-02-14 20:01 UTC (permalink / raw)
  To: caml-list


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-03-13 16:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-13  5:44 ocamlc problem on Mac OS X Roberto Bagnara
2007-03-13 13:46 ` [Caml-list] " Xavier Leroy
2007-03-13 16:12   ` Roberto Bagnara
  -- strict thread matches above, loose matches on Subject: below --
2007-02-14 20:01 Roberto Bagnara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).