* ocamlbuild with pack
@ 2007-06-17 12:36 Sean McLaughlin
2007-06-18 19:25 ` [Caml-list] " Nicolas Pouillard
0 siblings, 1 reply; 2+ messages in thread
From: Sean McLaughlin @ 2007-06-17 12:36 UTC (permalink / raw)
To: Caml List
[-- Attachment #1: Type: text/plain, Size: 948 bytes --]
Hello
I've run into a problem with ocamlbuild and -pack.
It will build bytecode packages, but not native ones.
E.g.,
I have 2 files:
$ cat a.ml <http://a.ml> :
type t = int
$ cat lib.mlpack:
A
Then the bytecode package works
$ ocamlbuild -classic-display lib.byte
/sw/bin/ocamldep.opt -modules a.ml > a.ml.depends
/sw/bin/ocamlc.opt -c -o a.cmo a.ml
/sw/bin/ocamlc.opt -pack a.cmo -o lib.cmo
/sw/bin/ocamlc.opt lib.cmo -o lib.byte
but not the native code
~/tmp/tmp2
$ ocamlbuild -classic-display lib.native
/sw/bin/ocamlopt.opt -c -o a.cmx a.ml
touch lib.mli ; if /sw/bin/ocamlopt.opt -pack a.cmx -o lib.cmx ; then rm
-f lib.mli ; else rm -f lib.mli ; exit 1; fi
+ touch lib.mli ; if /sw/bin/ocamlopt.opt -pack a.cmx -o lib.cmx ; then
rm -f lib.mli ; else rm -f lib.mli ; exit 1; fi
File a.cmx was not compiled with the `-for-pack Lib' option
Command exited with code 1.
What am I doing wrong?
Thanks for your time,
Sean
[-- Attachment #2: Type: text/html, Size: 1345 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] ocamlbuild with pack
2007-06-17 12:36 ocamlbuild with pack Sean McLaughlin
@ 2007-06-18 19:25 ` Nicolas Pouillard
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Pouillard @ 2007-06-18 19:25 UTC (permalink / raw)
To: seanmcl; +Cc: Caml List
On 6/17/07, Sean McLaughlin <seanmcl@gmail.com> wrote:
> Hello
>
> I've run into a problem with ocamlbuild and -pack.
> It will build bytecode packages, but not native ones.
> E.g.,
>
[...]
> File a.cmx was not compiled with the `-for-pack Lib' option
> Command exited with code 1.
>
>
> What am I doing wrong?
ocamlbuild does not keep track of -for-pack options. There is way to
provide the architecture of your project in order to give for-pack
option nicely but that worth only for big projects.
The easy way is:
$ cat _tags
"a.cmx": for-pack(Lib)
Regards,
--
Nicolas Pouillard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-06-18 19:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-17 12:36 ocamlbuild with pack Sean McLaughlin
2007-06-18 19:25 ` [Caml-list] " Nicolas Pouillard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox