Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems installing topkg and topkg-care with system switch. #34

Closed
mor1 opened this issue May 12, 2016 · 7 comments
Closed

Problems installing topkg and topkg-care with system switch. #34

mor1 opened this issue May 12, 2016 · 7 comments

Comments

@mor1
Copy link

mor1 commented May 12, 2016

Tried installing topkg having just had homebrew upgrade my system compiler to 4.03.0. Seem to get conflicts -- isn't topkg-care supposed to be independent of topkg (I may have misread the mail you sent though)

: mort@greyjay:~$; opam install topkg-care

=-=- Synchronising pinned packages =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
[topkg-care] https://github.com/dbuenzli/topkg.git already up-to-date
The following actions will be performed:
  ∗  install topkg      *                     [required by topkg-care]
  ∗  install topkg-care *
===== ∗  2 =====
Do you want to continue ? [Y/n] y

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
[topkg-care] https://github.com/dbuenzli/topkg.git already up-to-date
[topkg] https://github.com/dbuenzli/topkg.git already up-to-date

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
[ERROR] The compilation of topkg failed at "ocaml pkg/pkg.ml build --pkg-name topkg --installer true".

#=== ERROR while installing topkg.~unknown ====================================#
# opam-version 1.2.2
# os           darwin
# command      ocaml pkg/pkg.ml build --pkg-name topkg --installer true
# path         /Users/mort/.opam/system/build/topkg.~unknown
# compiler     system (4.03.0)
# exit-code    2
# env-file     /Users/mort/.opam/system/build/topkg.~unknown/topkg-36614-d0f245.env
# stdout-file  /Users/mort/.opam/system/build/topkg.~unknown/topkg-36614-d0f245.out
# stderr-file  /Users/mort/.opam/system/build/topkg.~unknown/topkg-36614-d0f245.err
### stdout ###
# Cannot find file topfind.
### stderr ###
# Unknown directive `require'.



=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
The following actions were aborted
  ∗  install topkg-care ~unknown
The following actions failed
  ∗  install topkg ~unknown
No changes have been performed

Installed and pinned packages are:

: mort@greyjay:~$; opam list
# Installed packages for system:
astring                    0.8.1  Alternative String module for OCaml
base-bytes                  base  Bytes library distributed with the OCaml compiler
base-unix                   base  Unix library distributed with the OCaml compiler
bos                     ~unknown (pinned)
camlp4               4.03+system  Camlp4 is a system for writing extensible parsers for programming languages
cmdliner                   0.9.8  Declarative definition of command line interfaces for OCaml
conf-m4                        1  Virtual package relying on m4
conf-ncurses            1+system  Virtual package relying on ncurses
conf-perl                      1  Virtual package relying on perl
cppo                       1.3.2  Equivalent of the C preprocessor for OCaml programs
cstruct                    2.1.0  access C structures via a camlp4 extension
cudf                         0.7  CUDF library (part of the Mancoosi tools)
dose                  3.2.2+opam  Dose library (part of Mancoosi tools)
extlib                     1.7.0  A complete yet small extension for OCaml standard library (reduced, recommended)
fmt                        0.7.1 (pinned)  OCaml Format pretty-printer combinators
fpath                   ~unknown (pinned)
functoria                  1.1.0  A DSL to organize functor applications.
io-page                    1.6.0  Allocate memory pages suitable for aligned I/O
ipaddr                     2.7.0  IP (and MAC) address representation library
jsonm                      0.9.1  Non-blocking streaming JSON codec for OCaml
logs                       0.5.0 (pinned)  Logging infrastructure for OCaml
lwt                        2.5.2  A cooperative threads library for OCaml
mirage                     2.9.0  The MirageOS library operating system
mirage-types               2.8.0  Module type definitions for Mirage-compatible applications
mirage-types-lwt           2.8.0  Lwt module type definitions for Mirage-compatible applications
ocamlbuild                 0.9.2  OCamlbuild is a build system with builtin rules to easily build most OCaml projects.
ocamlfind                  1.6.2  A library manager for OCaml
ocamlgraph                 1.8.5  A generic graph library for OCaml
ocplib-endian                0.8  Optimised functions to read and write int16/32/64 from strings and bigarrays, based on new primitives added in version 4
opam-lib                   1.2.2  The OPAM library
ppx_core          113.33.01+4.03  Standard library for ppx rewriters
ppx_deriving                 3.3  Type-driven code generation for OCaml >=4.02
ppx_driver        113.33.01+4.03  Feature-full driver for OCaml AST transformers
ppx_optcomp       113.33.00+4.03  Optional compilation for OCaml
ppx_sexp_conv     113.33.01+4.03  Generation of S-expression conversion functions from type definitions
ppx_tools             5.0+4.03.0  Tools for authors of ppx rewriters and other syntactic tools
ppx_type_conv     113.33.01+4.03  Support Library for type-driven code generators
re                         1.5.0  RE is a regular expression library for OCaml
result                       1.2  Compatibility Result module
rresult                    0.3.0 (pinned)  Result value combinators for OCaml
sexplib           113.33.00+4.03  Library for serializing OCaml values to and from S-expressions
uutf                       0.9.4  Non-blocking streaming Unicode codec for OCaml
: mort@greyjay:~$; opam pin
bos.~unknown                         git  https://github.com/dbuenzli/bos.git
fmt.0.7.1                            git  https://github.com/dbuenzli/fmt.git
fpath.~unknown                       git  https://github.com/dbuenzli/fpath.git
logs.0.5.0                           git  https://github.com/dbuenzli/logs.git
rresult.0.3.0                        git  https://github.com/dbuenzli/rresult.git
topkg.~unknown        (uninstalled)  git  https://github.com/dbuenzli/topkg.git
topkg-care.~unknown   (uninstalled)  git  https://github.com/dbuenzli/topkg.git
@mor1
Copy link
Author

mor1 commented May 12, 2016

FWIW, all installs fine after switching to 4.02.3

@dbuenzli
Copy link
Owner

dbuenzli commented May 19, 2016

isn't topkg-care supposed to be independent of topkg (I may have misread the mail you sent though)

No it's the converse,

Cannot find file topfind.

The problem seems to be different. Apparently in system switches #use "topfind" directive fails. Not exactly sure what to do about this.

@dbuenzli dbuenzli changed the title Problems installing topkg and topkg-care with 4.03.0 Problems installing topkg and topkg-care with system switch. May 19, 2016
@dbuenzli
Copy link
Owner

So the problem here is that in non-system switches the topfind file is installed in the lib/ocaml, this means that we can simply do a #use "topfind" to load it. However this doesn't work in system switches where the topfind file is installed in lib/toplevel.

@dbuenzli
Copy link
Owner

@Samoth suggested that this was solved by the ~/.ocamlinit that opam writes, but that file is not read when ocaml is invoked in script mode.

@dbuenzli
Copy link
Owner

Opened an issue on the OCaml OPAM repository. ocaml/opam-repository#6579

@dbuenzli
Copy link
Owner

Ok we think we figured a way with @Samoth, see ocaml/opam-repository#6592. This should make topkg work alright in system switches aswell.

@ghasshee
Copy link

ghasshee commented Sep 24, 2017

the same issue that it cannot find lib/topfind

so

cd ~/.opam/system/lib
ln -s toplevel topfind
source ~/.zshrc

it worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants