caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Current SVN head and findlib.
@ 2012-04-12 12:30 Philippe Veber
  2012-04-12 12:57 ` Jonathan Protzenko
  2012-04-12 13:27 ` Stéphane Glondu
  0 siblings, 2 replies; 6+ messages in thread
From: Philippe Veber @ 2012-04-12 12:30 UTC (permalink / raw)
  To: caml users

[-- Attachment #1: Type: text/plain, Size: 1799 bytes --]

Dear camlers,

While playing with the upcoming features of our favorite compiler, I found
that the current trunk and version/4.00 branch do not work well with
findlib (version 1.2.8). I report it here so others might confirm (or not)
what I say.

        OCaml version 4.01.0+dev1_2012-03-31

# #use "topfind";;
- : unit = ()
File "/home/pveber/usr/ocamlbrew/ocaml-svn/trunk/lib/ocaml/topfind", line
37, characters 0-22:
Error: Unbound module Topfind

What is really surprising is that the toplevel doesn't complain if I
copy/paste the contents of topfind directly in the compiler:

[gesundheit:~ 14:23]$ocaml <
/home/pveber/usr/ocamlbrew/ocaml-svn/trunk/lib/ocaml/topfind
        OCaml version 4.01.0+dev1_2012-03-31

#     * *       * * *                             - : unit = ()
#             * *     #     Findlib has been successfully loaded.
Additional directives:
  #require "package";;      to load a package
  #list;;                   to list the available packages
  #camlp4o;;                to load camlp4 (standard syntax)
  #camlp4r;;                to load camlp4 (revised syntax)
  #predicates "p,q,...";;   to set these predicates
  Topfind.reset();;         to force that packages will be reloaded
  #thread;;                 to enable threads

- : unit = ()

As you can notice, the install was done using ocamlbrew, but I could
reproduce the same problem directly installing ocaml and findlib. As I'd
rather not dump some foolishness of mine in mantis, I'd be glad somebody
could check this. Using ocamlbrew, this can be as simple as:

export OCAMLBREW_FLAGS="-t -a"
export OCAMLBREW_BASE=/home/joe/ocamlbrew
curl -kL https://raw.github.com/hcarty/ocamlbrew/master/ocamlbrew-install |
bash

The problem is present if ocamlbrew stops before installing utop.

Cheers,
  Philippe.

[-- Attachment #2: Type: text/html, Size: 4182 bytes --]

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

* Re: [Caml-list] Current SVN head and findlib.
  2012-04-12 12:30 [Caml-list] Current SVN head and findlib Philippe Veber
@ 2012-04-12 12:57 ` Jonathan Protzenko
  2012-04-12 14:24   ` Philippe Veber
  2012-04-12 13:27 ` Stéphane Glondu
  1 sibling, 1 reply; 6+ messages in thread
From: Jonathan Protzenko @ 2012-04-12 12:57 UTC (permalink / raw)
  To: Philippe Veber; +Cc: caml users

I also have this problem, and I've reported it to Gerd. What I usually 
do is edit the topfind file, remove the "new" stuff, and uncomment the 
lines marked as "old". This has been working fine so far for me.

Cheers,

jonathan

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

* Re: [Caml-list] Current SVN head and findlib.
  2012-04-12 12:30 [Caml-list] Current SVN head and findlib Philippe Veber
  2012-04-12 12:57 ` Jonathan Protzenko
@ 2012-04-12 13:27 ` Stéphane Glondu
  2012-04-12 14:25   ` Philippe Veber
  1 sibling, 1 reply; 6+ messages in thread
From: Stéphane Glondu @ 2012-04-12 13:27 UTC (permalink / raw)
  To: Philippe Veber; +Cc: caml users

Le 12/04/2012 14:30, Philippe Veber a écrit :
> While playing with the upcoming features of our favorite compiler, I
> found that the current trunk and version/4.00 branch do not work well
> with findlib (version 1.2.8). I report it here so others might confirm
> (or not) what I say.
> 
>         OCaml version 4.01.0+dev1_2012-03-31
> 
> # #use "topfind";;
> - : unit = ()
> File "/home/pveber/usr/ocamlbrew/ocaml-svn/trunk/lib/ocaml/topfind",
> line 37, characters 0-22:
> Error: Unbound module Topfind
> 
> What is really surprising is that the toplevel doesn't complain if I
> copy/paste the contents of topfind directly in the compiler:
> [...]

It works if you execute (replace /usr/lib/ocaml by `ocamlc -where`)

  #directory "/usr/lib/ocaml/findlib";;

before calling

  #use "topfind";;

The #directory is present in /usr/lib/ocaml/topfind, but it seems that
now, they don't have immediate effect.


Cheers,

-- 
Stéphane

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

* Re: [Caml-list] Current SVN head and findlib.
  2012-04-12 12:57 ` Jonathan Protzenko
@ 2012-04-12 14:24   ` Philippe Veber
  0 siblings, 0 replies; 6+ messages in thread
From: Philippe Veber @ 2012-04-12 14:24 UTC (permalink / raw)
  To: Jonathan Protzenko; +Cc: caml users

[-- Attachment #1: Type: text/plain, Size: 547 bytes --]

Thanks for your answer !

2012/4/12 Jonathan Protzenko <jonathan.protzenko@gmail.com>

> I also have this problem, and I've reported it to Gerd.

Good.


> What I usually do is edit the topfind file, remove the "new" stuff, and
> uncomment the lines marked as "old". This has been working fine so far for
> me.
>
I tried to uncomment the "old" lines (didn't see the "new") but it still
does not work. However Stéphane's trick did it so I'll be safe until the
problem's fixed.

Thanks again,
ph.


> Cheers,
>
> jonathan
>

[-- Attachment #2: Type: text/html, Size: 1151 bytes --]

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

* Re: [Caml-list] Current SVN head and findlib.
  2012-04-12 13:27 ` Stéphane Glondu
@ 2012-04-12 14:25   ` Philippe Veber
  2012-04-16 15:46     ` Gerd Stolpmann
  0 siblings, 1 reply; 6+ messages in thread
From: Philippe Veber @ 2012-04-12 14:25 UTC (permalink / raw)
  To: Stéphane Glondu; +Cc: caml users

[-- Attachment #1: Type: text/plain, Size: 1161 bytes --]

2012/4/12 Stéphane Glondu <steph@glondu.net>

> Le 12/04/2012 14:30, Philippe Veber a écrit :
> > While playing with the upcoming features of our favorite compiler, I
> > found that the current trunk and version/4.00 branch do not work well
> > with findlib (version 1.2.8). I report it here so others might confirm
> > (or not) what I say.
> >
> >         OCaml version 4.01.0+dev1_2012-03-31
> >
> > # #use "topfind";;
> > - : unit = ()
> > File "/home/pveber/usr/ocamlbrew/ocaml-svn/trunk/lib/ocaml/topfind",
> > line 37, characters 0-22:
> > Error: Unbound module Topfind
> >
> > What is really surprising is that the toplevel doesn't complain if I
> > copy/paste the contents of topfind directly in the compiler:
> > [...]
>
> It works if you execute (replace /usr/lib/ocaml by `ocamlc -where`)
>
>  #directory "/usr/lib/ocaml/findlib";;
>
> before calling
>
>  #use "topfind";;
>
Indeed, it works fine with that trick. Thanks !


>
> The #directory is present in /usr/lib/ocaml/topfind, but it seems that
> now, they don't have immediate effect.
>
Yes, that is a really surprising issue for me.

Thanks again,
  ph.

[-- Attachment #2: Type: text/html, Size: 1734 bytes --]

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

* Re: [Caml-list] Current SVN head and findlib.
  2012-04-12 14:25   ` Philippe Veber
@ 2012-04-16 15:46     ` Gerd Stolpmann
  0 siblings, 0 replies; 6+ messages in thread
From: Gerd Stolpmann @ 2012-04-16 15:46 UTC (permalink / raw)
  To: Philippe Veber; +Cc: "Stéphane Glondu", caml users


> 2012/4/12 Stéphane Glondu <steph@glondu.net>
>
>> Le 12/04/2012 14:30, Philippe Veber a écrit :
>> > While playing with the upcoming features of our favorite compiler, I
>> > found that the current trunk and version/4.00 branch do not work well
>> > with findlib (version 1.2.8). I report it here so others might confirm
>> > (or not) what I say.
>> >
>> >         OCaml version 4.01.0+dev1_2012-03-31
>> >
>> > # #use "topfind";;
>> > - : unit = ()
>> > File "/home/pveber/usr/ocamlbrew/ocaml-svn/trunk/lib/ocaml/topfind",
>> > line 37, characters 0-22:
>> > Error: Unbound module Topfind
>> >
>> > What is really surprising is that the toplevel doesn't complain if I
>> > copy/paste the contents of topfind directly in the compiler:
>> > [...]
>>
>> It works if you execute (replace /usr/lib/ocaml by `ocamlc -where`)
>>
>>  #directory "/usr/lib/ocaml/findlib";;
>>
>> before calling
>>
>>  #use "topfind";;

I tried to debug this, but the result is strange. First, I tried to create
a reproduction case which is independent of findlib (i.e. using the same
topfind script, but loading a different module). I was not successful.
There must be something very special triggering the problem. I also read
the relevant parts of the Ocaml sources to get an idea - again, no result,
the search path is simply a global variable.

The only thing I found out: If you change the topfind script so that the
#directory directive is executed before loading the modules (i.e. move
this directive right to the beginning of the script), everything works
again. Somehow the load must be incomplete when the directory of the .cma
files is not in the search path (although we load by absolute path). Maybe
the behaviour has to do with bug
http://caml.inria.fr/mantis/view.php?id=5551 .

Gerd


>>
> Indeed, it works fine with that trick. Thanks !
>
>
>>
>> The #directory is present in /usr/lib/ocaml/topfind, but it seems that
>> now, they don't have immediate effect.
>>
> Yes, that is a really surprising issue for me.
>
> Thanks again,
>   ph.
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa-roc.inria.fr/wws/info/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>


-- 
Gerd Stolpmann, Darmstadt, Germany    gerd@gerd-stolpmann.de
Creator of GODI and camlcity.org.
Contact details:        http://www.camlcity.org/contact.html
Company homepage:       http://www.gerd-stolpmann.de
*** Searching for new projects! Need consulting for system
*** programming in Ocaml? Gerd Stolpmann can help you.



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

end of thread, other threads:[~2012-04-16 15:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-12 12:30 [Caml-list] Current SVN head and findlib Philippe Veber
2012-04-12 12:57 ` Jonathan Protzenko
2012-04-12 14:24   ` Philippe Veber
2012-04-12 13:27 ` Stéphane Glondu
2012-04-12 14:25   ` Philippe Veber
2012-04-16 15:46     ` Gerd Stolpmann

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).