[covid-19] Help for ocaml package needed

classic Classic list List threaded Threaded
31 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[covid-19] Help for ocaml package needed

Andreas Tille-5
Hi,

in the Debian Med Covid-19 sprint we have a set of packages that can be
used to help researching the disease.  To this set of packages belongs
pplacer which I injected into Salsa[1].  I admit I never packaged
software written in ocaml and my initial attempt was probably weak.  It
ends with:


...
make[2]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
ocamlbuild pplacer.native
/usr/bin/ocamlopt.opt unix.cmxa -I /usr/lib/ocaml/ocamlbuild /usr/lib/ocaml/ocamlbuild/ocamlbuildlib.cmxa myocamlbuild.ml /usr/lib/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
+ /usr/bin/ocamlopt.opt unix.cmxa -I /usr/lib/ocaml/ocamlbuild /usr/lib/ocaml/ocamlbuild/ocamlbuildlib.cmxa myocamlbuild.ml /usr/lib/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
File "myocamlbuild.ml", line 24, characters 6-78:
24 | ......Lexing.from_string &
25 |       run_and_read "ocamlfind list | cut -d' ' -f1"
Error: This expression has type Lexing.lexbuf
       but an expression was expected of type
         Ocamlbuild_pack.Loc.source = string
Command exited with code 2.
make[2]: *** [Makefile:21: pplacer.native] Error 10
...


Any hint what to do next and to fix this bug?

Thanks for any help

      Andreas.


[1] https://salsa.debian.org/med-team/pplacer

--
http://fam-tille.de

Reply | Threaded
Open this post in threaded view
|

Re: [covid-19] Help for ocaml package needed

Ralf Treinen
Hello Andreas,

On Sat, May 23, 2020 at 03:09:09PM +0200, Andreas Tille wrote:

> in the Debian Med Covid-19 sprint we have a set of packages that can be
> used to help researching the disease.  To this set of packages belongs
> pplacer which I injected into Salsa[1].  I admit I never packaged
> software written in ocaml and my initial attempt was probably weak.  It
> ends with:

I had a look at this, but without much success. It seems that this
software is a bit out of date and needs updating to current versions
of libraries and the build tools.

I do not know much about ocamlbuild, but to me it looks as if the author was
trying to do crazy stuff, like generating ocamlbuild configuration
lines for all installed ocamlfind packages *installed on the system*
(ocamlfind is an ocaml helper tool, it has its own notion of packages).
I tried to patch the find_packages function by setting its result to
a fixed list ["batteries"; "csv"] but then ran into a typing error
when using the csv ocaml library. The software seems to depend on
an old version of that library (1.2.2, according to
opam-requirements.txt) while the current version of that library in
debian is 2.4.

Sorry. Maybe someone else on the ocaml-team can help ?

Cheers -Ralf.

Reply | Threaded
Open this post in threaded view
|

Re: [covid-19] Help for ocaml package needed

Andreas Tille-5
Hi Ralf,

On Sat, May 23, 2020 at 09:15:56PM +0200, Ralf Treinen wrote:

> Hello Andreas,
>
> On Sat, May 23, 2020 at 03:09:09PM +0200, Andreas Tille wrote:
>
> > in the Debian Med Covid-19 sprint we have a set of packages that can be
> > used to help researching the disease.  To this set of packages belongs
> > pplacer which I injected into Salsa[1].  I admit I never packaged
> > software written in ocaml and my initial attempt was probably weak.  It
> > ends with:
>
> I had a look at this, but without much success. It seems that this
> software is a bit out of date and needs updating to current versions
> of libraries and the build tools.

Thanks a lot for having a look.

> I do not know much about ocamlbuild, but to me it looks as if the author was
> trying to do crazy stuff, like generating ocamlbuild configuration
> lines for all installed ocamlfind packages *installed on the system*
> (ocamlfind is an ocaml helper tool, it has its own notion of packages).
> I tried to patch the find_packages function by setting its result to
> a fixed list ["batteries"; "csv"] but then ran into a typing error
> when using the csv ocaml library. The software seems to depend on
> an old version of that library (1.2.2, according to
> opam-requirements.txt) while the current version of that library in
> debian is 2.4.

Would you mind providing a patch (via merge request or even git
format-patch attached to some e-mail)?  Even if you say you was not
successful it might be worth keeping your investigations in code
rather than in an e-mail text.
 
> Sorry. Maybe someone else on the ocaml-team can help ?

That would be really great since I have absolutely no idea what to do.

Kind regards

       Andreas.

--
http://fam-tille.de

Reply | Threaded
Open this post in threaded view
|

Re: [covid-19] Help for ocaml package needed

Ralf Treinen
Hi,

On Sun, May 24, 2020 at 12:11:05AM +0200, Andreas Tille wrote:

> Hi Ralf,
>
> On Sat, May 23, 2020 at 09:15:56PM +0200, Ralf Treinen wrote:
> > Hello Andreas,
> >
> > On Sat, May 23, 2020 at 03:09:09PM +0200, Andreas Tille wrote:
> >
> > > in the Debian Med Covid-19 sprint we have a set of packages that can be
> > > used to help researching the disease.  To this set of packages belongs
> > > pplacer which I injected into Salsa[1].  I admit I never packaged
> > > software written in ocaml and my initial attempt was probably weak.  It
> > > ends with:
> >
> > I had a look at this, but without much success. It seems that this
> > software is a bit out of date and needs updating to current versions
> > of libraries and the build tools.
>
> Would you mind providing a patch (via merge request or even git
> format-patch attached to some e-mail)?  Even if you say you was not
> successful it might be worth keeping your investigations in code
> rather than in an e-mail text.

OK did a merge request. Good luck -Ralf.

Reply | Threaded
Open this post in threaded view
|

Re: [covid-19] Help for ocaml package needed

Andreas Tille-5
Hi Ralf,

On Sun, May 24, 2020 at 11:33:51AM +0200, Ralf Treinen wrote:
> >
> > Would you mind providing a patch (via merge request or even git
> > format-patch attached to some e-mail)?  Even if you say you was not
> > successful it might be worth keeping your investigations in code
> > rather than in an e-mail text.
>
> OK did a merge request. Good luck -Ralf.

Thanks a lot.  When inspecting the build log I'm wondering whether
ocamlbuild has an issue that is affecting this package:

...
make[2]: Entering directory '/build/pplacer-1.1~alpha19'
ocamlbuild rppr.native
ocamlbuild guppy.native
ocamlbuild pplacer.native
+ mkdir '/build/pplacer-1.1~alpha19/_build'
mkdir: cannot create directory ‘/build/pplacer-1.1~alpha19/_build’: File exists
Command exited with code 1.
Failure:
  Error during command "mkdir '/build/pplacer-1.1~alpha19/_build'": Ocamlbuild_pack.My_std.Exit_with_code(10).
make[2]: *** [Makefile:21: rppr.native] Error 2
make[2]: Leaving directory '/build/pplacer-1.1~alpha19'
make[1]: *** [Makefile:16: rppr] Error 2
make[1]: *** Waiting for unfinished jobs....
+ mkdir '/build/pplacer-1.1~alpha19/_build'
mkdir: cannot create directory ‘/build/pplacer-1.1~alpha19/_build’: File exists
Command exited with code 1.
Failure:
  Error during command "mkdir '/build/pplacer-1.1~alpha19/_build'": Ocamlbuild_pack.My_std.Exit_with_code(10).
...

I wonder whether `mkdir` needs to be replaced by `mkdir -p`.

Kind regards

     Andreas.

--
http://fam-tille.de

Reply | Threaded
Open this post in threaded view
|

Re: [covid-19] Help for ocaml package needed

Pierre Boutillier
In reply to this post by Andreas Tille-5
Hi Andreas,

(Someone NOT involved in debian (beyond following debian-ocaml-maint
list) speaking here. I want for years taking the time to become involved
but never did and won't in the near future :-/).

As Ralf told you, your first problem is that the software you're trying
to package is using an old version of `ocamlbuild`. A quick and awful
fix is (The correct thing would be to give the "origin" of the thing
you're lexing instead of `"foobar"`):

```

diff --git a/myocamlbuild.ml b/myocamlbuild.ml
index fd877a9..cf75d2c 100644
--- a/myocamlbuild.ml
+++ b/myocamlbuild.ml
@@ -14,7 +14,7 @@ open Ocamlbuild_plugin

  let run_and_read      = Ocamlbuild_pack.My_unix.run_and_read

-let blank_sep_strings = Ocamlbuild_pack.Lexers.blank_sep_strings
+let blank_sep_strings = Ocamlbuild_pack.Lexers.blank_sep_strings "foobar"

  module OCamlFind =
  struct
```

but I fear you will still be very far from home with only this. You'll
then run into the failure:

```
File "pplacer_src/guppy_mcl.ml", line 23, characters 2-9:
Error: Unbound module Mcl
```

I see you're the uploader of `mcl` in debian but what is needed here is
not mcl binaries but "OCaml bindings to the mcl C functions" which looks
to me not available in debian. Google found them at
https://github.com/fhcrc/mcl. As you can see, it is a "fork" of mcl so
it duplicates all its code which, if I'm correct, forbids to easily make
a package out of it as duplication of code is forbidden in debian!

 From the other end, the situation is not better as, if I'm correct, mcl
as packaged provides binaries but no C libraries you can link to. That
means that it is not easy to take the `caml` folder of fhcrc/mcl and
"simply" tweak the build system so that it finds the C functions in a
"libmcs shared library" instead of in the C files it duplicated from mcl...

Maybe, the """easiest""" path is to replace mcl pristine tarball by one
from https://github.com/fhcrc/mcl (if only it is upto date...) so that
mcl source package provides at the same time the binaries and an ocaml
library...

Anyway, once the puzzle of packaging mcl OCaml bindings is solved,
`make` in pplacer finally worked for me.

For the record, here is how I managed to compile mcl OCaml bindings from
https://github.com/fhcrc/mcl (in stable, Sorry I realize only now I
should retry in sid...) :

- I had to apply the following patch (because OCaml headers are not
compatible with c89 anymore)

```
diff --git a/_oasis b/_oasis
index 22e106a..c0c93c3 100644
--- a/_oasis
+++ b/_oasis
@@ -13,5 +13,5 @@ Library mcl
    Path: caml
    BuildTools: ocamlbuild
    CSources: caml_mcl.c
-  CCOpt: -fPIC -std=c89
+  CCOpt: -fPIC -std=c99
    Modules: Mcl
diff --git a/caml/caml_mcl.c b/caml/caml_mcl.c
index 37bd0d6..d5f92e0 100644
--- a/caml/caml_mcl.c
+++ b/caml/caml_mcl.c
@@ -17,7 +17,7 @@ void caml_mcl_initialize(void)
      if (caml_mcl_initialized)
          return;

-    srandom(mcxSeed(315));
+    srand(mcxSeed(315));
      mclx_app_init(NULL);
      caml_mcl_initialized = 1;
  }
diff --git a/myocamlbuild.ml b/myocamlbuild.ml
index 2ff1223..e24475a 100644
--- a/myocamlbuild.ml
+++ b/myocamlbuild.ml
@@ -602,7 +602,7 @@ let package_default =
            (["oasis_library_mcl_ccopt"; "compile"],
              [
                 (OASISExpr.EBool true,
-                 S [A "-ccopt"; A "-fPIC"; A "-ccopt"; A "-std=c89"])
+                 S [A "-ccopt"; A "-fPIC"; A "-ccopt"; A "-std=c99"])
              ])
         ];
       includes = []
diff --git a/setup.ml b/setup.ml
index 2743646..28d9025 100644
--- a/setup.ml
+++ b/setup.ml
@@ -6714,7 +6714,7 @@ let setup_t =
                        bs_c_sources = ["caml_mcl.c"];
                        bs_data_files = [];
                        bs_ccopt =
-                        [(OASISExpr.EBool true, ["-fPIC"; "-std=c89"])];
+                        [(OASISExpr.EBool true, ["-fPIC"; "-std=c99"])];
                        bs_cclib = [(OASISExpr.EBool true, [])];
                        bs_dlllib = [(OASISExpr.EBool true, [])];
                        bs_dllpath = [(OASISExpr.EBool true, [])];
```

- Then I build by `ocaml setup.ml -all` and installed by hand with
`ocaml setup.ml -install` (which simply runs `ocamlfind' install mcl
caml/META _build/caml/mcl.cmx _build/caml/mcl.cmi _build/caml/mcl.cmxs
_build/caml/mcl.a _build/caml/mcl.cmxa _build/caml/mcl.cma
_build/caml/dllmcl_stubs.so _build/caml/libmcl_stubs.a caml/mcl.ml`)

- To build debian packages instead, here comes the part where I
humiliate myself because I've never managed to learn Ocaml packaging in
debian so I know dh-ocaml provides all the automation necessary for
these files put in their correct places to be spilt in a `libmcl-ocaml`
and a `libmcl-ocaml-dev` but I can't spell it...

Best,
Pierre B.

Le 23/05/2020 à 15:09, Andreas Tille a écrit :

> Hi,
>
> in the Debian Med Covid-19 sprint we have a set of packages that can be
> used to help researching the disease.  To this set of packages belongs
> pplacer which I injected into Salsa[1].  I admit I never packaged
> software written in ocaml and my initial attempt was probably weak.  It
> ends with:
>
>
> ...
> make[2]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
> ocamlbuild pplacer.native
> /usr/bin/ocamlopt.opt unix.cmxa -I /usr/lib/ocaml/ocamlbuild /usr/lib/ocaml/ocamlbuild/ocamlbuildlib.cmxa myocamlbuild.ml /usr/lib/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
> + /usr/bin/ocamlopt.opt unix.cmxa -I /usr/lib/ocaml/ocamlbuild /usr/lib/ocaml/ocamlbuild/ocamlbuildlib.cmxa myocamlbuild.ml /usr/lib/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
> File "myocamlbuild.ml", line 24, characters 6-78:
> 24 | ......Lexing.from_string &
> 25 |       run_and_read "ocamlfind list | cut -d' ' -f1"
> Error: This expression has type Lexing.lexbuf
>         but an expression was expected of type
>           Ocamlbuild_pack.Loc.source = string
> Command exited with code 2.
> make[2]: *** [Makefile:21: pplacer.native] Error 10
> ...
>
>
> Any hint what to do next and to fix this bug?
>
> Thanks for any help
>
>        Andreas.
>
>
> [1] https://salsa.debian.org/med-team/pplacer
>

Reply | Threaded
Open this post in threaded view
|

Re: [covid-19] Help for ocaml package needed

Andreas Tille-5
Hi Pierra,

On Sun, May 24, 2020 at 05:11:59PM +0200, Pierre Boutillier wrote:
> Hi Andreas,
>
> (Someone NOT involved in debian (beyond following debian-ocaml-maint list)
> speaking here. I want for years taking the time to become involved but never
> did and won't in the near future :-/).

Its very cool that you provide this valuable information anyway.
 

> As Ralf told you, your first problem is that the software you're trying to
> package is using an old version of `ocamlbuild`. A quick and awful fix is
> (The correct thing would be to give the "origin" of the thing you're lexing
> instead of `"foobar"`):
>
> ```
>
> diff --git a/myocamlbuild.ml b/myocamlbuild.ml
> index fd877a9..cf75d2c 100644
> --- a/myocamlbuild.ml
> +++ b/myocamlbuild.ml
> @@ -14,7 +14,7 @@ open Ocamlbuild_plugin
>
>  let run_and_read      = Ocamlbuild_pack.My_unix.run_and_read
>
> -let blank_sep_strings = Ocamlbuild_pack.Lexers.blank_sep_strings
> +let blank_sep_strings = Ocamlbuild_pack.Lexers.blank_sep_strings "foobar"
>
>  module OCamlFind =
>  struct
> ```
>
> but I fear you will still be very far from home with only this. You'll then
> run into the failure:
>
> ```
> File "pplacer_src/guppy_mcl.ml", line 23, characters 2-9:
> Error: Unbound module Mcl
> ```
>
> I see you're the uploader of `mcl` in debian but what is needed here is not
> mcl binaries but "OCaml bindings to the mcl C functions" which looks to me
> not available in debian. Google found them at https://github.com/fhcrc/mcl.
> As you can see, it is a "fork" of mcl so it duplicates all its code which,
> if I'm correct, forbids to easily make a package out of it as duplication of
> code is forbidden in debian!
>
> From the other end, the situation is not better as, if I'm correct, mcl as
> packaged provides binaries but no C libraries you can link to. That means
> that it is not easy to take the `caml` folder of fhcrc/mcl and "simply"
> tweak the build system so that it finds the C functions in a "libmcs shared
> library" instead of in the C files it duplicated from mcl...
>
> Maybe, the """easiest""" path is to replace mcl pristine tarball by one from
> https://github.com/fhcrc/mcl (if only it is upto date...) so that mcl source
> package provides at the same time the binaries and an ocaml library...

I agree that this sounds very sensible approach.  Mcl seems to be in
very low maintenance mode.  In case the fork was done on top of the code
base which we have in Debian anyway I'd be in favour to follow your
suggestion and package the ocaml-enhanced code to enable us to package
pplacer (which is also used by other tools needed for covid-19 relevant
packages).
 
> Anyway, once the puzzle of packaging mcl OCaml bindings is solved, `make` in
> pplacer finally worked for me.

Thanks for checking all this.

Pranav or Nilesh, are you up for taking this challenge?

Kind regards

     Andreas.

> For the record, here is how I managed to compile mcl OCaml bindings from
> https://github.com/fhcrc/mcl (in stable, Sorry I realize only now I should
> retry in sid...) :
>
> - I had to apply the following patch (because OCaml headers are not
> compatible with c89 anymore)
>
> ```
> diff --git a/_oasis b/_oasis
> index 22e106a..c0c93c3 100644
> --- a/_oasis
> +++ b/_oasis
> @@ -13,5 +13,5 @@ Library mcl
>    Path: caml
>    BuildTools: ocamlbuild
>    CSources: caml_mcl.c
> -  CCOpt: -fPIC -std=c89
> +  CCOpt: -fPIC -std=c99
>    Modules: Mcl
> diff --git a/caml/caml_mcl.c b/caml/caml_mcl.c
> index 37bd0d6..d5f92e0 100644
> --- a/caml/caml_mcl.c
> +++ b/caml/caml_mcl.c
> @@ -17,7 +17,7 @@ void caml_mcl_initialize(void)
>      if (caml_mcl_initialized)
>          return;
>
> -    srandom(mcxSeed(315));
> +    srand(mcxSeed(315));
>      mclx_app_init(NULL);
>      caml_mcl_initialized = 1;
>  }
> diff --git a/myocamlbuild.ml b/myocamlbuild.ml
> index 2ff1223..e24475a 100644
> --- a/myocamlbuild.ml
> +++ b/myocamlbuild.ml
> @@ -602,7 +602,7 @@ let package_default =
>            (["oasis_library_mcl_ccopt"; "compile"],
>              [
>                 (OASISExpr.EBool true,
> -                 S [A "-ccopt"; A "-fPIC"; A "-ccopt"; A "-std=c89"])
> +                 S [A "-ccopt"; A "-fPIC"; A "-ccopt"; A "-std=c99"])
>              ])
>         ];
>       includes = []
> diff --git a/setup.ml b/setup.ml
> index 2743646..28d9025 100644
> --- a/setup.ml
> +++ b/setup.ml
> @@ -6714,7 +6714,7 @@ let setup_t =
>                        bs_c_sources = ["caml_mcl.c"];
>                        bs_data_files = [];
>                        bs_ccopt =
> -                        [(OASISExpr.EBool true, ["-fPIC"; "-std=c89"])];
> +                        [(OASISExpr.EBool true, ["-fPIC"; "-std=c99"])];
>                        bs_cclib = [(OASISExpr.EBool true, [])];
>                        bs_dlllib = [(OASISExpr.EBool true, [])];
>                        bs_dllpath = [(OASISExpr.EBool true, [])];
> ```
>
> - Then I build by `ocaml setup.ml -all` and installed by hand with `ocaml
> setup.ml -install` (which simply runs `ocamlfind' install mcl caml/META
> _build/caml/mcl.cmx _build/caml/mcl.cmi _build/caml/mcl.cmxs
> _build/caml/mcl.a _build/caml/mcl.cmxa _build/caml/mcl.cma
> _build/caml/dllmcl_stubs.so _build/caml/libmcl_stubs.a caml/mcl.ml`)
>
> - To build debian packages instead, here comes the part where I humiliate
> myself because I've never managed to learn Ocaml packaging in debian so I
> know dh-ocaml provides all the automation necessary for these files put in
> their correct places to be spilt in a `libmcl-ocaml` and a
> `libmcl-ocaml-dev` but I can't spell it...
>
> Best,
> Pierre B.
>
> Le 23/05/2020 à 15:09, Andreas Tille a écrit :
> > Hi,
> >
> > in the Debian Med Covid-19 sprint we have a set of packages that can be
> > used to help researching the disease.  To this set of packages belongs
> > pplacer which I injected into Salsa[1].  I admit I never packaged
> > software written in ocaml and my initial attempt was probably weak.  It
> > ends with:
> >
> >
> > ...
> > make[2]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
> > ocamlbuild pplacer.native
> > /usr/bin/ocamlopt.opt unix.cmxa -I /usr/lib/ocaml/ocamlbuild /usr/lib/ocaml/ocamlbuild/ocamlbuildlib.cmxa myocamlbuild.ml /usr/lib/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
> > + /usr/bin/ocamlopt.opt unix.cmxa -I /usr/lib/ocaml/ocamlbuild /usr/lib/ocaml/ocamlbuild/ocamlbuildlib.cmxa myocamlbuild.ml /usr/lib/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
> > File "myocamlbuild.ml", line 24, characters 6-78:
> > 24 | ......Lexing.from_string &
> > 25 |       run_and_read "ocamlfind list | cut -d' ' -f1"
> > Error: This expression has type Lexing.lexbuf
> >         but an expression was expected of type
> >           Ocamlbuild_pack.Loc.source = string
> > Command exited with code 2.
> > make[2]: *** [Makefile:21: pplacer.native] Error 10
> > ...
> >
> >
> > Any hint what to do next and to fix this bug?
> >
> > Thanks for any help
> >
> >        Andreas.
> >
> >
> > [1] https://salsa.debian.org/med-team/pplacer
> >
>

--
http://fam-tille.de

Reply | Threaded
Open this post in threaded view
|

Re: [covid-19] Help for ocaml package needed

Shayan Doust
Hello Andreas,

I've read through the mails. I'll have a look at the sources and
packages and see where I can go from there. I'll keep this thread up to
date if anything new arises from my side.

Kind regards,
Shayan Doust

Reply | Threaded
Open this post in threaded view
|

Re: [covid-19] Help for ocaml package needed

Shayan Doust
In reply to this post by Andreas Tille-5
Hello Andreas,

I had a look at the currently packaged mcl and the mcl clone (the one
with the bindings on github).

The mcl[1] clone seems to be a lot older than the debian packaged;
looking at the _oasis file it seems like the version is 12-068~oasis4
compared to the packaged one which is 1:14-137. This means that the mcl
clone would actually be in sync and would be built on top of presumably
this debian mcl state[2] which is 8 years old. I'm worried about any
incompatibilities should the code base or the pristine tarball now
reflect the mcl clone instead.

Any suggestions as to how I can go forward and incorporate this
OCaml-enhanced mcl, presumably not in a separate package due to the
duplication of code?

Kind regards,
Shayan Doust


[1]: https://github.com/fhcrc/mcl
[2]:
https://salsa.debian.org/med-team/mcl/-/commit/96b51bfc7549accf6306ad8000599ec16a174c30

0x6D7D441919D02395.asc (3K) Download Attachment
signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [covid-19] Help for ocaml package needed

Andreas Tille-2
Hi Shayan,

On Thu, May 28, 2020 at 09:04:56PM +0100, Shayan Doust wrote:

> I had a look at the currently packaged mcl and the mcl clone (the one
> with the bindings on github).
>
> The mcl[1] clone seems to be a lot older than the debian packaged;
> looking at the _oasis file it seems like the version is 12-068~oasis4
> compared to the packaged one which is 1:14-137. This means that the mcl
> clone would actually be in sync and would be built on top of presumably
> this debian mcl state[2] which is 8 years old. I'm worried about any
> incompatibilities should the code base or the pristine tarball now
> reflect the mcl clone instead.

I confirm that

   https://github.com/fhcrc/mcl/blob/master/VERSION

says "12-068" which is actually the 8 years old state.  In Debian we
upgraded to version "14-137".  I wonder whether the author of the clone
could try to re-check the code base?
 
> Any suggestions as to how I can go forward and incorporate this
> OCaml-enhanced mcl, presumably not in a separate package due to the
> duplication of code?

I assume the mcl development is really stalled.  But I'd love to see a
discussion between upstream and the maintainer of the 12-068 fork
whether they could settle with a common code base which also includes
the OCaml support.  May be the first step could be to open an issue
at [1] and ask for updating the code base?
 
Thanks a lot for your investigation.

Kind regards

      Andreas.

> [1]: https://github.com/fhcrc/mcl
> [2]:
> https://salsa.debian.org/med-team/mcl/-/commit/96b51bfc7549accf6306ad8000599ec16a174c30


--
http://fam-tille.de

Reply | Threaded
Open this post in threaded view
|

Re: [covid-19] Help for ocaml package needed

Shayan Doust
Hello Andreas,

> I assume the mcl development is really stalled.  But I'd love to see a
> discussion between upstream and the maintainer of the 12-068 fork
> whether they could settle with a common code base which also includes
> the OCaml support.  May be the first step could be to open an issue
> at [1] and ask for updating the code base?

I will open an issue with [1] and see if I can suggest and co-ordinate
for a common code base, that of the latest mcl release that's been packaged.

> Thanks a lot for your investigation.

No problem :)

Kind regards,
Shayan Doust

On 29/05/2020 11:08, Andreas Tille wrote:

> Hi Shayan,
>
> On Thu, May 28, 2020 at 09:04:56PM +0100, Shayan Doust wrote:
>> I had a look at the currently packaged mcl and the mcl clone (the one
>> with the bindings on github).
>>
>> The mcl[1] clone seems to be a lot older than the debian packaged;
>> looking at the _oasis file it seems like the version is 12-068~oasis4
>> compared to the packaged one which is 1:14-137. This means that the mcl
>> clone would actually be in sync and would be built on top of presumably
>> this debian mcl state[2] which is 8 years old. I'm worried about any
>> incompatibilities should the code base or the pristine tarball now
>> reflect the mcl clone instead.
>
> I confirm that
>
>    https://github.com/fhcrc/mcl/blob/master/VERSION
>
> says "12-068" which is actually the 8 years old state.  In Debian we
> upgraded to version "14-137".  I wonder whether the author of the clone
> could try to re-check the code base?
>  
>> Any suggestions as to how I can go forward and incorporate this
>> OCaml-enhanced mcl, presumably not in a separate package due to the
>> duplication of code?
>
> I assume the mcl development is really stalled.  But I'd love to see a
> discussion between upstream and the maintainer of the 12-068 fork
> whether they could settle with a common code base which also includes
> the OCaml support.  May be the first step could be to open an issue
> at [1] and ask for updating the code base?
>  
> Thanks a lot for your investigation.
>
> Kind regards
>
>       Andreas.
>
>> [1]: https://github.com/fhcrc/mcl
>> [2]:
>> https://salsa.debian.org/med-team/mcl/-/commit/96b51bfc7549accf6306ad8000599ec16a174c30
>
>

0x6D7D441919D02395.asc (3K) Download Attachment
signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [covid-19] Help for ocaml package needed

Andreas Tille-5
On Fri, May 29, 2020 at 04:07:10PM +0100, Shayan Doust wrote:

> Hello Andreas,
>
> > I assume the mcl development is really stalled.  But I'd love to see a
> > discussion between upstream and the maintainer of the 12-068 fork
> > whether they could settle with a common code base which also includes
> > the OCaml support.  May be the first step could be to open an issue
> > at [1] and ask for updating the code base?
>
> I will open an issue with [1] and see if I can suggest and co-ordinate
> for a common code base, that of the latest mcl release that's been packaged.

May be there is another option:  Somehow the OCaml support could be
obtained by a diff between the Debian packaged version 12-068 and the
fork[1].  No idea how large this diff might be but may be it might apply
more or less cleanly to the latest Debian packaged version as a quilt
patch.  This could give us OCaml support to the latest upstream version.

Kind regards

      Andreas.

[1] https://github.com/fhcrc/mcl

--
http://fam-tille.de

Reply | Threaded
Open this post in threaded view
|

Re: [covid-19] Help for ocaml package needed

Shayan Doust
Hello Andreas,

This may just be our only option. I've looked into ways with getting in
touch with the author of [1] and I cannot find any ways as even github
issues is disabled.

> May be there is another option:  Somehow the OCaml support could be
> obtained by a diff between the Debian packaged version 12-068 and the
> fork[1].  No idea how large this diff might be but may be it might apply
> more or less cleanly to the latest Debian packaged version as a quilt
> patch.  This could give us OCaml support to the latest upstream version.

I'll run a diff between the Debian packaged 12-068 and the fork,
assuming that nothing substantial has changed it might end up being easy
with incorporating this as a patch. I assume if there has been
substantial changes between versions, maybe different components for the
OCaml support can be nitpicked and made into a patch, that is if other
components do not break within the new version of mcl if the patch is
applied.

I'll have a look at the mcl clone[1] shortly and I'll see what I can
accomplish with the limited options we have.

Kind regards,
Shayan Doust

On 01/06/2020 14:34, Andreas Tille wrote:

> On Fri, May 29, 2020 at 04:07:10PM +0100, Shayan Doust wrote:
>> Hello Andreas,
>>
>>> I assume the mcl development is really stalled.  But I'd love to see a
>>> discussion between upstream and the maintainer of the 12-068 fork
>>> whether they could settle with a common code base which also includes
>>> the OCaml support.  May be the first step could be to open an issue
>>> at [1] and ask for updating the code base?
>>
>> I will open an issue with [1] and see if I can suggest and co-ordinate
>> for a common code base, that of the latest mcl release that's been packaged.
>
> May be there is another option:  Somehow the OCaml support could be
> obtained by a diff between the Debian packaged version 12-068 and the
> fork[1].  No idea how large this diff might be but may be it might apply
> more or less cleanly to the latest Debian packaged version as a quilt
> patch.  This could give us OCaml support to the latest upstream version.
>
> Kind regards
>
>       Andreas.
>
> [1] https://github.com/fhcrc/mcl
>

0x6D7D441919D02395.asc (4K) Download Attachment
signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [covid-19] Help for ocaml package needed

Shayan Doust
Hello Andreas,

Another quick email before I disappear for the day.

I've ran a diff and generated a patch between the plain 12-068 version
(I cannot find its source on salsa so I just downloaded this tarball
from the author's website but that shouldn't make any difference) and
the mcl clone.

~7,000 lines in the patch all featuring new files and its contents
regarding OCaml support but I will experiment tomorrow and see how
cleanly and effectively I can apply this patch over the newer Debian
packaged mcl.

Kind regards,
Shayan Doust

On 01/06/2020 16:22, Shayan Doust wrote:

> Hello Andreas,
>
> This may just be our only option. I've looked into ways with getting in
> touch with the author of [1] and I cannot find any ways as even github
> issues is disabled.
>
>> May be there is another option:  Somehow the OCaml support could be
>> obtained by a diff between the Debian packaged version 12-068 and the
>> fork[1].  No idea how large this diff might be but may be it might apply
>> more or less cleanly to the latest Debian packaged version as a quilt
>> patch.  This could give us OCaml support to the latest upstream version.
>
> I'll run a diff between the Debian packaged 12-068 and the fork,
> assuming that nothing substantial has changed it might end up being easy
> with incorporating this as a patch. I assume if there has been
> substantial changes between versions, maybe different components for the
> OCaml support can be nitpicked and made into a patch, that is if other
> components do not break within the new version of mcl if the patch is
> applied.
>
> I'll have a look at the mcl clone[1] shortly and I'll see what I can
> accomplish with the limited options we have.
>
> Kind regards,
> Shayan Doust
>
> On 01/06/2020 14:34, Andreas Tille wrote:
>> On Fri, May 29, 2020 at 04:07:10PM +0100, Shayan Doust wrote:
>>> Hello Andreas,
>>>
>>>> I assume the mcl development is really stalled.  But I'd love to see a
>>>> discussion between upstream and the maintainer of the 12-068 fork
>>>> whether they could settle with a common code base which also includes
>>>> the OCaml support.  May be the first step could be to open an issue
>>>> at [1] and ask for updating the code base?
>>>
>>> I will open an issue with [1] and see if I can suggest and co-ordinate
>>> for a common code base, that of the latest mcl release that's been packaged.
>>
>> May be there is another option:  Somehow the OCaml support could be
>> obtained by a diff between the Debian packaged version 12-068 and the
>> fork[1].  No idea how large this diff might be but may be it might apply
>> more or less cleanly to the latest Debian packaged version as a quilt
>> patch.  This could give us OCaml support to the latest upstream version.
>>
>> Kind regards
>>
>>       Andreas.
>>
>> [1] https://github.com/fhcrc/mcl
>>

0x6D7D441919D02395.asc (4K) Download Attachment
signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [covid-19] Help for ocaml package needed

Andreas Tille-5
On Mon, Jun 01, 2020 at 05:22:56PM +0100, Shayan Doust wrote:
> I've ran a diff and generated a patch between the plain 12-068 version
> (I cannot find its source on salsa so I just downloaded this tarball
> from the author's website but that shouldn't make any difference) and
> the mcl clone.
>
> ~7,000 lines in the patch all featuring new files and its contents
> regarding OCaml support but I will experiment tomorrow and see how
> cleanly and effectively I can apply this patch over the newer Debian
> packaged mcl.

Sounds promising - thanks a lot

    Andreas.

--
http://fam-tille.de

Reply | Threaded
Open this post in threaded view
|

Re: [covid-19] Help for ocaml package needed

Shayan Doust
Hello Andreas et al.,

I've integrated the patch and done a few tweaks overall for mcl[1].

Building within sbuild on unstable, I get the following error:

...
Making all in setops
make[5]: Entering directory '/<<PKGBUILDDIR>>/testing/setops'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/<<PKGBUILDDIR>>/testing/setops'
make[4]: Leaving directory '/<<PKGBUILDDIR>>/testing'
make[3]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
ocaml setup.ml -all
File "./setup.ml", line 247, characters 8-26:
247 |         buf.[i] <- f s.[i]
              ^^^^^^^^^^^^^^^^^^
Alert deprecated: Stdlib.String.set
Use Bytes.set instead.
File "./setup.ml", line 247, characters 8-11:
247 |         buf.[i] <- f s.[i]
              ^^^
Error: This expression has type string but an expression was expected of
type
         bytes
make[1]: *** [debian/rules:74: override_dh_auto_build] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
--------------------------------------------------------------------------------
Build finished at 2020-06-02T16:50:16Z

Finished
--------
...

I'll leave this CC'd in the list so that someone with more OCaml
experience can suggest a possible solution to this.

Kind regards,
Shayan Doust

[1]: https://salsa.debian.org/med-team/mcl

On 01/06/2020 20:04, Andreas Tille wrote:

> On Mon, Jun 01, 2020 at 05:22:56PM +0100, Shayan Doust wrote:
>> I've ran a diff and generated a patch between the plain 12-068 version
>> (I cannot find its source on salsa so I just downloaded this tarball
>> from the author's website but that shouldn't make any difference) and
>> the mcl clone.
>>
>> ~7,000 lines in the patch all featuring new files and its contents
>> regarding OCaml support but I will experiment tomorrow and see how
>> cleanly and effectively I can apply this patch over the newer Debian
>> packaged mcl.
>
> Sounds promising - thanks a lot
>
>     Andreas.
>

0x6D7D441919D02395.asc (4K) Download Attachment
signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [covid-19] Help for ocaml package needed

Pierre Boutillier
Hi Shayan,

In order to fix this error in a quick&dirty way, you can to add `oasis`
as a build-dependency and do `oasis setup` (which regenerates the file
setup.ml) before the `ocaml setup.ml -all` in rules.

Best,

Pierre B.

Le 02/06/2020 à 19:01, Shayan Doust a écrit :

> Hello Andreas et al.,
>
> I've integrated the patch and done a few tweaks overall for mcl[1].
>
> Building within sbuild on unstable, I get the following error:
>
> ...
> Making all in setops
> make[5]: Entering directory '/<<PKGBUILDDIR>>/testing/setops'
> make[5]: Nothing to be done for 'all'.
> make[5]: Leaving directory '/<<PKGBUILDDIR>>/testing/setops'
> make[4]: Leaving directory '/<<PKGBUILDDIR>>/testing'
> make[3]: Leaving directory '/<<PKGBUILDDIR>>'
> make[2]: Leaving directory '/<<PKGBUILDDIR>>'
> ocaml setup.ml -all
> File "./setup.ml", line 247, characters 8-26:
> 247 |         buf.[i] <- f s.[i]
>                ^^^^^^^^^^^^^^^^^^
> Alert deprecated: Stdlib.String.set
> Use Bytes.set instead.
> File "./setup.ml", line 247, characters 8-11:
> 247 |         buf.[i] <- f s.[i]
>                ^^^
> Error: This expression has type string but an expression was expected of
> type
>           bytes
> make[1]: *** [debian/rules:74: override_dh_auto_build] Error 2
> make[1]: Leaving directory '/<<PKGBUILDDIR>>'
> --------------------------------------------------------------------------------
> Build finished at 2020-06-02T16:50:16Z
>
> Finished
> --------
> ...
>
> I'll leave this CC'd in the list so that someone with more OCaml
> experience can suggest a possible solution to this.
>
> Kind regards,
> Shayan Doust
>
> [1]: https://salsa.debian.org/med-team/mcl
>
> On 01/06/2020 20:04, Andreas Tille wrote:
>> On Mon, Jun 01, 2020 at 05:22:56PM +0100, Shayan Doust wrote:
>>> I've ran a diff and generated a patch between the plain 12-068 version
>>> (I cannot find its source on salsa so I just downloaded this tarball
>>> from the author's website but that shouldn't make any difference) and
>>> the mcl clone.
>>>
>>> ~7,000 lines in the patch all featuring new files and its contents
>>> regarding OCaml support but I will experiment tomorrow and see how
>>> cleanly and effectively I can apply this patch over the newer Debian
>>> packaged mcl.
>> Sounds promising - thanks a lot
>>
>>      Andreas.
>>

Reply | Threaded
Open this post in threaded view
|

Re: [covid-19] Help for ocaml package needed

Shayan Doust
Hello,

Just an update from a previous email.

mcl now also generates some ocaml libraries as of today. Understanding
how to install these ocaml libraries (they go under a directory such as
/usr/local/lib/ocaml/<ocaml_version> reversing ocaml's installation
procedure) so that is the final obstacle to learn and fix within the
next couple days. I had no luck with dh_ocaml as this expects files
under debian/mcl and not debian/tmp.

Maybe I'll try moving files to debian/mcl, running dh_ocaml and seeing
what that does or perhaps "--with ocaml" has some significance here.

Kind regards,
Shayan Doust

On 02/06/2020 20:07, Pierre Boutillier wrote:

> Hi Shayan,
>
> In order to fix this error in a quick&dirty way, you can to add `oasis`
> as a build-dependency and do `oasis setup` (which regenerates the file
> setup.ml) before the `ocaml setup.ml -all` in rules.
>
> Best,
>
> Pierre B.
>
> Le 02/06/2020 à 19:01, Shayan Doust a écrit :
>> Hello Andreas et al.,
>>
>> I've integrated the patch and done a few tweaks overall for mcl[1].
>>
>> Building within sbuild on unstable, I get the following error:
>>
>> ...
>> Making all in setops
>> make[5]: Entering directory '/<<PKGBUILDDIR>>/testing/setops'
>> make[5]: Nothing to be done for 'all'.
>> make[5]: Leaving directory '/<<PKGBUILDDIR>>/testing/setops'
>> make[4]: Leaving directory '/<<PKGBUILDDIR>>/testing'
>> make[3]: Leaving directory '/<<PKGBUILDDIR>>'
>> make[2]: Leaving directory '/<<PKGBUILDDIR>>'
>> ocaml setup.ml -all
>> File "./setup.ml", line 247, characters 8-26:
>> 247 |         buf.[i] <- f s.[i]
>>                ^^^^^^^^^^^^^^^^^^
>> Alert deprecated: Stdlib.String.set
>> Use Bytes.set instead.
>> File "./setup.ml", line 247, characters 8-11:
>> 247 |         buf.[i] <- f s.[i]
>>                ^^^
>> Error: This expression has type string but an expression was expected of
>> type
>>           bytes
>> make[1]: *** [debian/rules:74: override_dh_auto_build] Error 2
>> make[1]: Leaving directory '/<<PKGBUILDDIR>>'
>> --------------------------------------------------------------------------------
>>
>> Build finished at 2020-06-02T16:50:16Z
>>
>> Finished
>> --------
>> ...
>>
>> I'll leave this CC'd in the list so that someone with more OCaml
>> experience can suggest a possible solution to this.
>>
>> Kind regards,
>> Shayan Doust
>>
>> [1]: https://salsa.debian.org/med-team/mcl
>>
>> On 01/06/2020 20:04, Andreas Tille wrote:
>>> On Mon, Jun 01, 2020 at 05:22:56PM +0100, Shayan Doust wrote:
>>>> I've ran a diff and generated a patch between the plain 12-068 version
>>>> (I cannot find its source on salsa so I just downloaded this tarball
>>>> from the author's website but that shouldn't make any difference) and
>>>> the mcl clone.
>>>>
>>>> ~7,000 lines in the patch all featuring new files and its contents
>>>> regarding OCaml support but I will experiment tomorrow and see how
>>>> cleanly and effectively I can apply this patch over the newer Debian
>>>> packaged mcl.
>>> Sounds promising - thanks a lot
>>>
>>>      Andreas.
>>>

0x6D7D441919D02395.asc (4K) Download Attachment
signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [covid-19] Help for ocaml package needed

Ralf Treinen
Hello Shayan,

On Thu, Jun 04, 2020 at 05:16:42PM +0100, Shayan Doust wrote:

> mcl now also generates some ocaml libraries as of today. Understanding
> how to install these ocaml libraries (they go under a directory such as
> /usr/local/lib/ocaml/<ocaml_version> reversing ocaml's installation
> procedure) so that is the final obstacle to learn and fix within the
> next couple days. I had no luck with dh_ocaml as this expects files
> under debian/mcl and not debian/tmp.

you probably should use a debian/<package>.install file to place
these files in the right directory (see dh_install(1)).

-Ralf.




Reply | Threaded
Open this post in threaded view
|

Re: [covid-19] Help for ocaml package needed

Shayan Doust
Hello Ralf et al.,

There has been more progress with mcl[1] now. With the ocaml built
libraries, I have moved the contents of _build/ into /usr/lib/ocaml
contained in a package called "libmcl-ocaml-dev".

Unfortunately pplacer[2], which relies on ocaml mcl bindings, generates
the following message during build time: ocamlfind: Package `mcl' not
found. With more investigation, it seems like when running "ocamlfind
list" command, mcl is not listed even though the ml library contents are
under /usr/lib/ocaml. What could be the issue? Installing the META file
into this directory still has no effect.

Ocaml is new territory for me so I am still learning with regards to
ocaml packaging.

Any help is much appreciated!

Kind regards,
Shayan Doust

[1]: https://salsa.debian.org/med-team/mcl
[2]: https://salsa.debian.org/med-team/pplacer

On 04/06/2020 21:37, Ralf Treinen wrote:

> Hello Shayan,
>
> On Thu, Jun 04, 2020 at 05:16:42PM +0100, Shayan Doust wrote:
>
>> mcl now also generates some ocaml libraries as of today. Understanding
>> how to install these ocaml libraries (they go under a directory such as
>> /usr/local/lib/ocaml/<ocaml_version> reversing ocaml's installation
>> procedure) so that is the final obstacle to learn and fix within the
>> next couple days. I had no luck with dh_ocaml as this expects files
>> under debian/mcl and not debian/tmp.
>
> you probably should use a debian/<package>.install file to place
> these files in the right directory (see dh_install(1)).
>
> -Ralf.
>
>
>
>

0x6D7D441919D02395.asc (4K) Download Attachment
signature.asc (849 bytes) Download Attachment
12