matsen / pplacer

Phylogenetic placement and downstream analysis
http://matsen.fredhutch.org/pplacer/
GNU General Public License v3.0
75 stars 18 forks source link

issues with compilation #377

Open kbipinkumar opened 1 year ago

kbipinkumar commented 1 year ago

i am trying to package pplacer for arch linux. as part of the process i followed instructions given here

while following the instruction initializing opam and installing dependencies i getting following error while adding repo as mentioned in the instruction

$ opam repo add pplacer-deps http://matsen.github.com/pplacer-opam-repository
$ opam update pplacer-deps
[ERROR] Could not update repository "pplacer-deps": OpamDownload.Download_fail(_, "curl: code 404 while downloading http://matsen.github.com/pplacer-opam-repository/index.tar.gz")
[ERROR] Initial repository fetch failed

looks like repository url has expired/deleted.

is it possible to fix it?

Edit: as a workaround i was able to create a local repo for pplacer-deps. However upon running cat opam-requirements.txt | xargs opam install -y i getting following error stating two modules failed to build

∗ installed ocamlfind.1.9.6
∗ installed batteries.2.1.0
∗ installed camlzip.1.05
[ERROR] The compilation of mcl.12-068oasis4 failed at "ocaml setup.ml -build".
[ERROR] The compilation of ocaml-gsl.0.6.3 failed at "make".
∗ installed ocamlify.0.0.1
∗ installed ocamlmod.0.0.9
∗ installed ounit.1.1.2
∗ installed sqlite3.4.0.0
∗ installed type_conv.108.08.00
∗ installed xmlm.1.1.1
∗ installed ocaml-data-notation.0.0.11
∗ installed oasis.0.3.0
∗ installed csv.1.2.2

#=== ERROR while compiling ocaml-gsl.0.6.3 ====================================#
# context              2.1.4 | linux/x86_64 | ocaml-base-compiler.3.12.1 | git+file:///build/pplacer/src/pplacer-1.1.alpha19/pplacer-opam-repository
# path                 ~/.opam/3.12.1/.opam-switch/build/ocaml-gsl.0.6.3
# command              ~/.opam/opam-init/hooks/sandbox.sh build make
# exit-code            2
# env-file             ~/.opam/log/ocaml-gsl-8590-db8187.env
# output-file          ~/.opam/log/ocaml-gsl-8590-db8187.out
### output ###
# mlgsl_fit.c:154:35: warning: passing argument 2 of ‘gsl_multifit_linear_svd’ from incompatible pointer type [-Wincompatible-pointer-types]
# [...]
# In file included from mlgsl_fit.c:6:
# /usr/include/gsl/gsl_multifit.h:85:58: note: expected ‘gsl_multifit_linear_workspace *’ but argument is of type ‘gsl_vector *’
#    85 |                          gsl_multifit_linear_workspace * work);
#       |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
# mlgsl_fit.c:154:5: error: too many arguments to function ‘gsl_multifit_linear_svd’
#   154 |     gsl_multifit_linear_svd(&m_x, &v_y,
#       |     ^~~~~~~~~~~~~~~~~~~~~~~
# /usr/include/gsl/gsl_multifit.h:84:1: note: declared here
#    84 | gsl_multifit_linear_svd (const gsl_matrix * X,
#       | ^~~~~~~~~~~~~~~~~~~~~~~
# make: *** [Makefile:220: mlgsl_fit.o] Error 2

#=== ERROR while compiling mcl.12-068oasis4 ===================================#
# context              2.1.4 | linux/x86_64 | ocaml-base-compiler.3.12.1 | git+file:///build/pplacer/src/pplacer-1.1.alpha19/pplacer-opam-repository
# path                 ~/.opam/3.12.1/.opam-switch/build/mcl.12-068oasis4
# command              ~/.opam/opam-init/hooks/sandbox.sh build ocaml setup.ml -build
# exit-code            1
# env-file             ~/.opam/log/mcl-8590-2ffdac.env
# output-file          ~/.opam/log/mcl-8590-2ffdac.out
### output ###
# [...]
# /usr/bin/ld: ../impala/libimpala.a(stream.o):(.bss+0x28): multiple definition of `nu_diff_zip'; clmformat.o:(.bss+0x28): first defined here
# /usr/bin/ld: ../impala/libimpala.a(stream.o):(.bss+0x30): multiple definition of `nu_magic'; clmformat.o:(.bss+0x30): first defined here
# /usr/bin/ld: ../impala/libimpala.a(stream.o):(.bss+0x38): multiple definition of `mclx_n_thread_g'; clmformat.o:(.bss+0x38): first defined here
# collect2: error: ld returned 1 exit status
# make[3]: *** [Makefile:318: clmformat] Error 1
# make[3]: Leaving directory '/build/.opam/3.12.1/.opam-switch/build/mcl.12-068oasis4/src/shcl'
# make[2]: *** [Makefile:233: all-recursive] Error 1
# make[2]: Leaving directory '/build/.opam/3.12.1/.opam-switch/build/mcl.12-068oasis4/src'
# make[1]: *** [Makefile:278: all-recursive] Error 1
# make[1]: Leaving directory '/build/.opam/3.12.1/.opam-switch/build/mcl.12-068oasis4'
# make: *** [Makefile:216: all] Error 2
# E: Failure("Command 'make' terminated with error code 2")

<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build mcl       12-068oasis4
│ λ build ocaml-gsl 0.6.3
matsen commented 1 year ago

Hello-- for that specific error my guess is that you need to have an old version of GSL installed.

kbipinkumar commented 1 year ago

Hello-- for that specific error my guess is that you need to have an old version of GSL installed.

archlinux being a rolling release distro that could pose some issues

kbipinkumar commented 1 year ago

there is newer version of ocaml-gsl that builds with recent versions of gsl. however, ocaml-mcl cannot be built. it seems even Debian med project has given up on patching in ocaml binding for current releases of mcl

Description: add OCaml support
 Add OCaml support. This patch has been generated by taking the diff of an mcl
 clone that has implemented OCaml support and upstream's version of mcl 12-068,
 stripping out unnecessary changes and refreshing it over the Debian mcl packed
 version 14-137.
 .
 This patch is deactivated since it does not work any more.
Author: Shayan Doust <hello@shayandoust.me>
Last-Update: 2020-06-02
Origin: https://github.com/fhcrc/mcl