Discussion:
[Caml-list] Oasis strange behavior
(too old to reply)
Yann Hamdaoui
2016-09-22 21:37:26 UTC
Permalink
Dear list,

I have a small toy library that I used to build using oasis, and
everything worked fine. But after I tried to add a test section for unit
testing and modify the _oasis file accordingly (I hadn't touched it for
a few months), I face a rather strange behavior : setup.ml doesn't
complain but doesn't build anything. After some investigation, it seems
that oasis only take into account the last section of my file _oasis.

If I do :

[...]

OASISFormat: 0.4
BuildTools: ocamlbuild
Plugins: META (0.4), DevFiles (0.4)

Library "mechaml"
Path: src
Modules: Agent, Page, Cookiejar
InternalModules: Infix
BuildDepends: lambdasoup, lwt, cohttp, cohttp.lwt, uri
Executable "unit_tests"
Build$: flag(tests)
Path: test
MainIs: test.ml
BuildDepends: oUnit, mechaml
Test "unit"
Command: $unit_test
WorkingDirectory: test
SourceRepository "master"
Type: git
Location: https://github.com/yannham/mechaml.git/
Branch: master
Browser: https://github.com/yannham/mechaml

Then nothing get built (after configure and build executed succesfully)
and I have :

%oasis query ListSections

SrcRepo(master)

%
Like I only have one section of the source repository.

If I comment out the last three sections (so that only Library remains),
then the library is built as before. If I comment the two last sections,
query only gives "Executable(unit_tests)" and if I try configure, the
script complains that the package "mechaml" doesn't exist, so the
section Library is indeed thrown.

I have the same behavior with an _oasis file generated automatically by
oasis quickstart. Does anybody have the same issue ? Am i doing
something wrong ?

I run oasis version 0.4.7 with compiler switch 4.03.0+flambda
--
Caml-list mailing list. Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
Simon Cruanes
2016-09-23 05:24:34 UTC
Permalink
I have had the same issue (twice), but after randomly removing setup.*, _build, and the likes it worked again (and of course I could not reproduce later).
--
Simon
--
Caml-list mailing list. Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
Hendrik Boom
2016-09-23 14:48:16 UTC
Permalink
I've had that problem with Modula 3 compilation (nothing to do with
OCaml, but the cause may be similar. It seems to be failure in the
mechnism that does dependency analysis and determined what has to be
recompiled from scratch insted of from original source. The bug
hasn't been tracked down in Modula 3 either.

Deleting all compiler-generated files (which Modula 3 conveniently
keeps segregated in a directory of their own) makes everything work
again. After doing this, of course it isn't repeatable either.

-- hendrik
Post by Simon Cruanes
I have had the same issue (twice), but after randomly removing setup.*, _build, and the likes it worked again (and of course I could not reproduce later).
--
Simon
--
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
--
Caml-list mailing list. Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
Boutillier, Pierre
2016-09-26 02:25:30 UTC
Permalink
DISCLAIMER: I don't know anything about oasis.
Post by Yann Hamdaoui
I run oasis version 0.4.7 with compiler switch 4.03.0+flambda
It seems indeed that oasis.0.4.7 hates 4.03.0+flambda
Here is my story:
I tried an `opam update` on a debian jessie machine. It had the consequence to attempt an update of `tls`. (`tls` forces an `oasis setup` during its ./configure) it fails with `none: unknown option '--enable-lwt'.`
Strange...
So I tried to install tls on a MacOS "just to see" (using switch 4.03.0+flambda too) There, the compilation of `nocrypto` fails at `oasis setup` with `E: Unknown flag 'modernity'` By random copy/paste I experience that the only way to remove this error is indeed to make `Flag modernity` the last Flag section of the file but in this case other flags seems to be ignored (let's stay factual: --enable-lwt and --disable-xen are unrecognized options)

Then I remembered about your message and I realized that we were both using +flambda. So I `opam switch 4.03.0 && opam install tls` ... Success!
Finally in my +flambda switch I downgrade oasis to 0.4.6 (on debian because on MacOS this operation was too much for opam internal solver: it suggests something implying `===== ∗ 4 ↻ 10 ↘ 15 ⊘ 18 =====` :-)) Success, I can install tls again!

I stopped here. I was too happy to be back in a working setting but there is something to investigate...

All the best,
Pierre B.
--
Caml-list mailing list. Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
Ivan Gotovchits
2016-09-28 18:30:30 UTC
Permalink
Can confirm that I've seen the same issues 100% reproducible on
4.03+flambda with oasis 0.4.7. Everything worked fine with `< oasis.0.4.6`.

I created an issue[1] on the tracker and I also CC'ed the author. It would
be nice if you, guys, will also upload your examples to the issue tracker,
so that we can fix it ASAP (mine example is too big its an _oasis file that
is more than thousand lines of code, I've tried on a smaller example, but
bug didn't manifest itself).

[1]:
https://forge.ocamlcore.org/tracker/index.php?func=detail&aid=1674&group_id=54&atid=291

On Sun, Sep 25, 2016 at 10:20 PM, Boutillier, Pierre <
Post by Boutillier, Pierre
DISCLAIMER: I don't know anything about oasis.
Post by Yann Hamdaoui
I run oasis version 0.4.7 with compiler switch 4.03.0+flambda
It seems indeed that oasis.0.4.7 hates 4.03.0+flambda
I tried an `opam update` on a debian jessie machine. It had the
consequence to attempt an update of `tls`. (`tls` forces an `oasis setup`
during its ./configure) it fails with `none: unknown option '--enable-lwt'.`
Strange...
So I tried to install tls on a MacOS "just to see" (using switch
4.03.0+flambda too) There, the compilation of `nocrypto` fails at `oasis
setup` with `E: Unknown flag 'modernity'` By random copy/paste I experience
that the only way to remove this error is indeed to make `Flag modernity`
the last Flag section of the file but in this case other flags seems to be
ignored (let's stay factual: --enable-lwt and --disable-xen are
unrecognized options)
Then I remembered about your message and I realized that we were both
using +flambda. So I `opam switch 4.03.0 && opam install tls` ... Success!
Finally in my +flambda switch I downgrade oasis to 0.4.6 (on debian
because on MacOS this operation was too much for opam internal solver: it
suggests something implying `===== ∗ 4 ↻ 10 ↘ 15 ⊘ 18 =====` :-))
Success, I can install tls again!
I stopped here. I was too happy to be back in a working setting but there
is something to investigate...
All the best,
Pierre B.
--
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
--
Caml-list mailing list. Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
Yann Hamdaoui
2016-09-28 20:25:00 UTC
Permalink
Thanks for all you answers, removing all oasis generated and compiled
files didn't help but switching to 4.03.0 without flambda solved the
problem.

I will upload my example on the tracker, mine is really small (37 lines).
Post by Ivan Gotovchits
Can confirm that I've seen the same issues 100% reproducible on
4.03+flambda with oasis 0.4.7. Everything worked fine with `<
oasis.0.4.6`.
I created an issue[1] on the tracker and I also CC'ed the author. It
would be nice if you, guys, will also upload your examples to the
issue tracker, so that we can fix it ASAP (mine example is too big its
an _oasis file that is more than thousand lines of code, I've tried on
a smaller example, but bug didn't manifest itself).
[1]: https://forge.ocamlcore.org/tracker/index.php?func=detail&aid=1674&group_id=54&atid=291
On Sun, Sep 25, 2016 at 10:20 PM, Boutillier, Pierre
DISCLAIMER: I don't know anything about oasis.
Post by Yann Hamdaoui
I run oasis version 0.4.7 with compiler switch 4.03.0+flambda
It seems indeed that oasis.0.4.7 hates 4.03.0+flambda
I tried an `opam update` on a debian jessie machine. It had the
consequence to attempt an update of `tls`. (`tls` forces an `oasis
setup` during its ./configure) it fails with `none: unknown option
'--enable-lwt'.`
Strange...
So I tried to install tls on a MacOS "just to see" (using switch
4.03.0+flambda too) There, the compilation of `nocrypto` fails at
`oasis setup` with `E: Unknown flag 'modernity'` By random
copy/paste I experience that the only way to remove this error is
indeed to make `Flag modernity` the last Flag section of the file
but in this case other flags seems to be ignored (let's stay
factual: --enable-lwt and --disable-xen are unrecognized options)
Then I remembered about your message and I realized that we were
both using +flambda. So I `opam switch 4.03.0 && opam install
tls` ... Success!
Finally in my +flambda switch I downgrade oasis to 0.4.6 (on
debian because on MacOS this operation was too much for opam
internal solver: it suggests something implying `===== ∗ 4 ↻
10 ↘ 15 ⊘ 18 =====` :-)) Success, I can install tls again!
I stopped here. I was too happy to be back in a working setting
but there is something to investigate...
All the best,
Pierre B.
--
https://sympa.inria.fr/sympa/arc/caml-list
<https://sympa.inria.fr/sympa/arc/caml-list>
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
<http://groups.yahoo.com/group/ocaml_beginners>
Bug reports: http://caml.inria.fr/bin/caml-bugs
<http://caml.inria.fr/bin/caml-bugs>
--
Caml-list mailing list. Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
Loading...