* ocamlc: how to keep sources and objects in different directories?
@ 2008-08-12 17:03 Roberto Bagnara
2008-08-13 7:22 ` [Caml-list] " Vincent Hanquez
0 siblings, 1 reply; 5+ messages in thread
From: Roberto Bagnara @ 2008-08-12 17:03 UTC (permalink / raw)
To: caml-list
Hi there,
it seems that `ocamlc' wants to create the .cmo file in the same
directories as the .ml file. More specifically I observe this:
$ ocamlc -g -c -I +gmp -I ../../../interfaces/OCaml ../../../interfaces/OCaml/ppl_ocaml_types.ml
I/O error: ../../../interfaces/OCaml/ppl_ocaml_types.cmo: Permission denied
The ../../../interfaces/OCaml directory is read-only:
is there an option causing `ocamlc' to write the .cmo
file in the current directory instead?
If not, what is the best way to achieve complete
separation of sources and objects?
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] 5+ messages in thread
* Re: [Caml-list] ocamlc: how to keep sources and objects in different directories?
2008-08-12 17:03 ocamlc: how to keep sources and objects in different directories? Roberto Bagnara
@ 2008-08-13 7:22 ` Vincent Hanquez
2008-08-13 7:32 ` Roberto Bagnara
0 siblings, 1 reply; 5+ messages in thread
From: Vincent Hanquez @ 2008-08-13 7:22 UTC (permalink / raw)
To: Roberto Bagnara; +Cc: caml-list
On Tue, Aug 12, 2008 at 07:03:06PM +0200, Roberto Bagnara wrote:
>
> Hi there,
>
> it seems that `ocamlc' wants to create the .cmo file in the same
> directories as the .ml file. More specifically I observe this:
>
> $ ocamlc -g -c -I +gmp -I ../../../interfaces/OCaml ../../../interfaces/OCaml/ppl_ocaml_types.ml
> I/O error: ../../../interfaces/OCaml/ppl_ocaml_types.cmo: Permission denied
>
> The ../../../interfaces/OCaml directory is read-only:
> is there an option causing `ocamlc' to write the .cmo
> file in the current directory instead?
you can use "-o ./ppl_ocaml_types.cmo"
Cheers,
--
Vincent
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] ocamlc: how to keep sources and objects in different directories?
2008-08-13 7:22 ` [Caml-list] " Vincent Hanquez
@ 2008-08-13 7:32 ` Roberto Bagnara
2008-08-13 8:03 ` Nicolas Pouillard
0 siblings, 1 reply; 5+ messages in thread
From: Roberto Bagnara @ 2008-08-13 7:32 UTC (permalink / raw)
To: Vincent Hanquez; +Cc: caml-list
Vincent Hanquez wrote:
> On Tue, Aug 12, 2008 at 07:03:06PM +0200, Roberto Bagnara wrote:
>> Hi there,
>>
>> it seems that `ocamlc' wants to create the .cmo file in the same
>> directories as the .ml file. More specifically I observe this:
>>
>> $ ocamlc -g -c -I +gmp -I ../../../interfaces/OCaml ../../../interfaces/OCaml/ppl_ocaml_types.ml
>> I/O error: ../../../interfaces/OCaml/ppl_ocaml_types.cmo: Permission denied
>>
>> The ../../../interfaces/OCaml directory is read-only:
>> is there an option causing `ocamlc' to write the .cmo
>> file in the current directory instead?
>
> you can use "-o ./ppl_ocaml_types.cmo"
Thanks Vincent, but it does not work:
$ ocamlc -g -c -I +gmp -I ../../../interfaces/OCaml ../../../interfaces/OCaml/ppl_ocaml_types.ml
I/O error: ../../../interfaces/OCaml/ppl_ocaml_types.cmo: Permission denied
$ ocamlc -g -c -I +gmp -I ../../../interfaces/OCaml ../../../interfaces/OCaml/ppl_ocaml_types.ml -o ./ppl_ocaml_types.cmo
I/O error: ../../../interfaces/OCaml/ppl_ocaml_types.cmo: Permission denied
$ ocamlc -version
3.10.1
Any other idea?
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] 5+ messages in thread
* Re: [Caml-list] ocamlc: how to keep sources and objects in different directories?
2008-08-13 7:32 ` Roberto Bagnara
@ 2008-08-13 8:03 ` Nicolas Pouillard
2008-08-13 10:33 ` Roberto Bagnara
0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Pouillard @ 2008-08-13 8:03 UTC (permalink / raw)
To: Roberto Bagnara; +Cc: Vincent Hanquez, Caml_mailing list
[-- Attachment #1: Type: text/plain, Size: 1290 bytes --]
Excerpts from Roberto Bagnara's message of Wed Aug 13 09:32:51 +0200 2008:
> Vincent Hanquez wrote:
> > On Tue, Aug 12, 2008 at 07:03:06PM +0200, Roberto Bagnara wrote:
> >> Hi there,
> >>
> >> it seems that `ocamlc' wants to create the .cmo file in the same
> >> directories as the .ml file. More specifically I observe this:
> >>
> >> $ ocamlc -g -c -I +gmp -I ../../../interfaces/OCaml ../../../interfaces/OCaml/ppl_ocaml_types.ml
> >> I/O error: ../../../interfaces/OCaml/ppl_ocaml_types.cmo: Permission denied
> >>
> >> The ../../../interfaces/OCaml directory is read-only:
> >> is there an option causing `ocamlc' to write the .cmo
> >> file in the current directory instead?
> >
> > you can use "-o ./ppl_ocaml_types.cmo"
>
> Thanks Vincent, but it does not work:
>
> $ ocamlc -g -c -I +gmp -I ../../../interfaces/OCaml ../../../interfaces/OCaml/ppl_ocaml_types.ml
> I/O error: ../../../interfaces/OCaml/ppl_ocaml_types.cmo: Permission denied
> $ ocamlc -g -c -I +gmp -I ../../../interfaces/OCaml ../../../interfaces/OCaml/ppl_ocaml_types.ml -o ./ppl_ocaml_types.cmo
> I/O error: ../../../interfaces/OCaml/ppl_ocaml_types.cmo: Permission denied
> $ ocamlc -version
> 3.10.1
>
> Any other idea?
The -o option should be before the .ml.
Regards,
--
Nicolas Pouillard aka Ertai
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] ocamlc: how to keep sources and objects in different directories?
2008-08-13 8:03 ` Nicolas Pouillard
@ 2008-08-13 10:33 ` Roberto Bagnara
0 siblings, 0 replies; 5+ messages in thread
From: Roberto Bagnara @ 2008-08-13 10:33 UTC (permalink / raw)
To: Nicolas Pouillard; +Cc: Vincent Hanquez, Caml_mailing list
Nicolas Pouillard wrote:
> Excerpts from Roberto Bagnara's message of Wed Aug 13 09:32:51 +0200 2008:
>> Vincent Hanquez wrote:
>>> On Tue, Aug 12, 2008 at 07:03:06PM +0200, Roberto Bagnara wrote:
>>>> Hi there,
>>>>
>>>> it seems that `ocamlc' wants to create the .cmo file in the same
>>>> directories as the .ml file. More specifically I observe this:
>>>>
>>>> $ ocamlc -g -c -I +gmp -I ../../../interfaces/OCaml ../../../interfaces/OCaml/ppl_ocaml_types.ml
>>>> I/O error: ../../../interfaces/OCaml/ppl_ocaml_types.cmo: Permission denied
>>>>
>>>> The ../../../interfaces/OCaml directory is read-only:
>>>> is there an option causing `ocamlc' to write the .cmo
>>>> file in the current directory instead?
>>> you can use "-o ./ppl_ocaml_types.cmo"
>> Thanks Vincent, but it does not work:
>>
>> $ ocamlc -g -c -I +gmp -I ../../../interfaces/OCaml ../../../interfaces/OCaml/ppl_ocaml_types.ml
>> I/O error: ../../../interfaces/OCaml/ppl_ocaml_types.cmo: Permission denied
>> $ ocamlc -g -c -I +gmp -I ../../../interfaces/OCaml ../../../interfaces/OCaml/ppl_ocaml_types.ml -o ./ppl_ocaml_types.cmo
>> I/O error: ../../../interfaces/OCaml/ppl_ocaml_types.cmo: Permission denied
>> $ ocamlc -version
>> 3.10.1
>>
>> Any other idea?
>
> The -o option should be before the .ml.
Thanks!
All the best,
Roberto
P.S. Perhaps this should be written in the documentation...
I have just reread http://caml.inria.fr/pub/docs/manual-ocaml/manual022.html
but found no mention of this important detail.
--
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] 5+ messages in thread
end of thread, other threads:[~2008-08-13 10:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-12 17:03 ocamlc: how to keep sources and objects in different directories? Roberto Bagnara
2008-08-13 7:22 ` [Caml-list] " Vincent Hanquez
2008-08-13 7:32 ` Roberto Bagnara
2008-08-13 8:03 ` Nicolas Pouillard
2008-08-13 10:33 ` Roberto Bagnara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox