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

problem with lambda-term/lwt #275

Closed
yminsky opened this issue Nov 2, 2012 · 14 comments
Closed

problem with lambda-term/lwt #275

yminsky opened this issue Nov 2, 2012 · 14 comments

Comments

@yminsky
Copy link

yminsky commented Nov 2, 2012

My install is in a weird situation. Installing of lambda-term doesn't
work, for reasons that are not obvious to me.

Yarons-iMac:async_extra yminsky$ opam install lambda-term
The following actions will be performed:
 - install lambda-term.1.2
1 to install | 0 to reinstall | 0 to upgrade | 0 to downgrade | 0 to remove

=-=-= lambda-term.1.2 =-=-=
The archive for lambda-term.1.2 is in the local cache.
Extracting /Users/yminsky/.opam/archives/lambda-term.1.2+opam.tar.gz
Build commands:
  ocaml setup.ml -configure --prefix /Users/yminsky/.opam/4.00.1+short-types
  ocaml setup.ml -build
  ocaml setup.ml -install
Uninstalling lambda-term.1.2
The compilation of lambda-term.1.2 failed in /Users/yminsky/.opam/4.00.1+short-types/build/lambda-term.1.2.

[ERROR] while installing lambda-term.1.2
= [RUN] "ocaml setup.ml -configure --prefix /Users/yminsky/.opam/4.00.1+short-types"
= [CWD] "/Users/yminsky/.opam/4.00.1+short-types/build/lambda-term.1.2"
= TERM_PROGRAM=iTerm.app
= TERM=xterm
= SHELL=/bin/bash
= TMPDIR=/var/folders/cf/g0m371n16f9_ktm928ttg5zh0000gn/T/
= Apple_PubSub_Socket_Render=/tmp/launch-afSoO1/Render
= USER=yminsky
= COMMAND_MODE=unix2003
= SSH_AUTH_SOCK=/tmp/launch-xgKozY/Listeners
= __CF_USER_TEXT_ENCODING=0x1F5:0:0
= Apple_Ubiquity_Message=/tmp/launch-XTPctw/Apple_Ubiquity_Message
= PATH=/Users/yminsky/.opam/4.00.1+short-types/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin
= PWD=/Users/yminsky/.opam/4.00.1+short-types/lib/async_extra
= LANG=en_US.UTF-8
= ITERM_PROFILE=Default
= SHLVL=1
= COLORFGBG=7;0
= HOME=/Users/yminsky
= ITERM_SESSION_ID=w1t0p0
= LOGNAME=yminsky
= DISPLAY=/tmp/launch-X7VUas/org.macosforge.xquartz:0
= SECURITYSESSIONID=186a3
= _=/usr/local/bin/opam
= OLDPWD=/Users/yminsky/.opam/4.00.1+short-types/lib
= CAML_LD_LIBRARY_PATH=/Users/yminsky/.opam/4.00.1+short-types/lib/stublibs
= 
* ocamlfind: Package `lwt.unix' not found
* W: Field 'pkg_lwt_unix' is not set: Command ''/Users/yminsky/.opam/4.00.1+short-types/bin/ocamlfind' query -format %d lwt.unix > '/var/folders/cf/g0m371n16f9_ktm928ttg5zh0000gn/T/oasis-5c0c78.txt'' terminated with error code 2
* E: Cannot find findlib package lwt.unix
* E: Failure("1 configuration error")
  'opam install lambda-term' failed
@lefessan
Copy link
Contributor

lefessan commented Nov 2, 2012

It looks like "ocamlfind" is just used to install the package, but fails because it cannot find "lwt.unix". I think "lwt.unix" is supposed to be installed automatically by lwt, as long as the "base-unix" optional dependency is present (but it is supposed to be provided by the compiler, so it should be present on your system). Maybe you can check whether -enable-unix is present when re-installing lwt ?

@avsm
Copy link
Member

avsm commented Nov 2, 2012

Try opam install base-unix to see if that's not installed for some reason.

@yminsky
Copy link
Author

yminsky commented Nov 2, 2012

I tried, and this happened:

Yarons-iMac:~ yminsky$ opam install base-unix
The following actions will be performed:
 - install base-unix.base
 - recompile lwt.2.4.2
1 to install | 1 to reinstall | 0 to upgrade | 0 to downgrade | 0 to remove
Do you want to continue ? [Y/n] 

=-=-= base-unix.base =-=-=
The archive for base-unix.base is in the local cache.
Extracting /Users/yminsky/.opam/archives/base-unix.base+opam.tar.gz
Build commands:
  ./build.sh
Installing base-unix.base

=-=-= lwt.2.4.2 =-=-=
Uninstalling lwt.2.4.2
The archive for lwt.2.4.2 is in the local cache.
Extracting /Users/yminsky/.opam/archives/lwt.2.4.2+opam.tar.gz
Build commands:
  ./configure --disable-libev --enable-react --disable-ssl --enable-unix --enable-extra --disable-preemptive --disable-glib
  make build
  make install
Uninstalling lwt.2.4.2
The recompilation of lwt.2.4.2 failed in /Users/yminsky/.opam/4.00.1+short-types/build/lwt.2.4.2.


Recovering from errors:
Uninstalling lwt.2.4.2
[ERROR] while recompiling lwt.2.4.2
= [RUN] "./configure --disable-libev --enable-react --disable-ssl --enable-unix --enable-extra --disable-preemptive --disable-glib"
= [CWD] "/Users/yminsky/.opam/4.00.1+short-types/build/lwt.2.4.2"
= TERM_PROGRAM=iTerm.app
= TERM=xterm
= SHELL=/bin/bash
= TMPDIR=/var/folders/cf/g0m371n16f9_ktm928ttg5zh0000gn/T/
= Apple_PubSub_Socket_Render=/tmp/launch-afSoO1/Render
= USER=yminsky
= COMMAND_MODE=unix2003
= SSH_AUTH_SOCK=/tmp/launch-xgKozY/Listeners
= __CF_USER_TEXT_ENCODING=0x1F5:0:0
= Apple_Ubiquity_Message=/tmp/launch-XTPctw/Apple_Ubiquity_Message
= PATH=/Users/yminsky/.opam/4.00.1+short-types/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin
= PWD=/Users/yminsky
= LANG=en_US.UTF-8
= ITERM_PROFILE=Default
= SHLVL=1
= COLORFGBG=7;0
= HOME=/Users/yminsky
= ITERM_SESSION_ID=w1t0p0
= LOGNAME=yminsky
= DISPLAY=/tmp/launch-X7VUas/org.macosforge.xquartz:0
= SECURITYSESSIONID=186a3
= _=/usr/local/bin/opam
= OLDPWD=/Users/yminsky/.opam/4.00.1+short-types/lib/async_extra
= CAML_LD_LIBRARY_PATH=/Users/yminsky/.opam/4.00.1+short-types/lib/stublibs
= 
* E: Cannot find buildable internal library 'lwt-preemptive' when checking build depends
* E: Failure("1 configuration error")
  'opam install base-unix' failed

@avsm
Copy link
Member

avsm commented Nov 3, 2012

For some reason, all your base packages are missing. This error is due to base-threads being missing (and an issue with the upstream Lwt build system not being buildable without Lwt_preemptive.

It's easily fixed by opam install base-threads, but the real question is why the base packages disappeared in the first place.

@yminsky
Copy link
Author

yminsky commented Nov 3, 2012

Yeah, that fixed it. Don't know where the problem came from, though.

On Fri, Nov 2, 2012 at 8:44 PM, Anil Madhavapeddy
notifications@github.comwrote:

For some reason, all your base packages are missing. This error is due to
base-threads being missing (and an issue with the upstream Lwt build
system not being buildable without Lwt_preemptive.

It's easily fixed by opam install base-threads, but the real question is
why the base packages disappeared in the first place.


Reply to this email directly or view it on GitHubhttps://github.com/OCamlPro/opam/issues/275#issuecomment-10034602.

@samoht samoht closed this as completed in 59375dc Nov 7, 2012
@samoht
Copy link
Member

samoht commented Nov 7, 2012

I don't know where the problem came from (something went wrong during the installation of base packages apparently), but for sure opam should not let the user in a inconsistent state as you were. So I've pushed a fix to roll-back to the current switch (and delete the new one) in case something go wrong when installing the base packages.

@camlspotter
Copy link

I faced the same problem today. Just like Ron had. base-* were not marked installed. I guess some opam (I use 0.8.1) forgot to add base-* when it is updated by opam upgrade opam?

@samoht
Copy link
Member

samoht commented Dec 14, 2012

the more than I though, the more than I think than updating opam through opam is a finally not a so good idea. I guess it easier to just warm the user that its opam version is not up-to-date and let him install a newer version at the right place (ie. /usr/local/bin/opam). I'm reopening the issue to double-check the code which install the base packages to see what could have gone wrong there.

@samoht samoht reopened this Dec 14, 2012
@samoht
Copy link
Member

samoht commented Dec 17, 2012

@camlspotter did you get this error after reinstalling a compiler or just after upgrading opam ?

@camlspotter
Copy link

Sorry but I do not remember well what happend. But probably because I went between opam 0.7.x and 0.8.1. Here is what I did roughly:

  • /usr/local/bin/opam was an old 0.7.x
  • opam install opam installed 0.8.1
  • used opam 0.8.1 for a while
  • opam remove opam, and I went back to 0.7.x
  • opam install opam to reinstall 0.8.1
  • opam update does not update base-*

So the issue might be caused by multiple versions of opam. In this situation I imagine anything strange could happen...

@samoht
Copy link
Member

samoht commented Dec 20, 2012

I had a quick look at this and I haven't found any clear cause. I'm pushing this to post-beta (ie. 1.0).

@samoht
Copy link
Member

samoht commented Feb 6, 2013

I've added some safety checks which should detect if some base packages are not installed and warm the user. Hopefully this situation will not happen again, so closing this issue.

@samoht samoht closed this as completed Feb 6, 2013
@jeffsco
Copy link

jeffsco commented Dec 22, 2013

I am seeing this error today on OS X 10.9.1, opam 1.1.0.

=-=-= Installing lambda-term.1.5 =-=-=
Building lambda-term.1.5:
  ocaml setup.ml -configure --prefix /Users/jeffsco/.opam/system
  ocaml setup.ml -build
  ocaml setup.ml -install
[ERROR] The compilation of lambda-term.1.5 failed.
Removing lambda-term.1.5.
  ocamlfind remove lambda-term

[ERROR] Due to some errors while processing lambda-term.1.5, the following actions will NOT proceed:
 - install utop.1.10

===== ERROR while installing lambda-term.1.5 =====
# opam-version 1.1.0
# os           darwin
# command      ocaml setup.ml -configure --prefix /Users/jeffsco/.opam/system
# path         /Users/jeffsco/.opam/system/build/lambda-term.1.5
# compiler     system (4.01.0)
# exit-code    1
# env-file     /Users/jeffsco/.opam/system/build/lambda-term.1.5/lambda-term-38109-05296d.env
# stdout-file  /Users/jeffsco/.opam/system/build/lambda-term.1.5/lambda-term-38109-05296d.out
# stderr-file  /Users/jeffsco/.opam/system/build/lambda-term.1.5/lambda-term-38109-05296d.err
### stderr ###
# ocamlfind: Package `lwt.unix' not found
# W: Field 'pkg_lwt_unix' is not set: Command ''/Users/jeffsco/.opam/system/bin/ocamlfind' query -format %d lwt.unix > '/var/folders/w4/1tgxn_s936b148fdgb8l9xv80000gn/T/oasis-b90741.txt'' terminated with error code 2
# E: Cannot find findlib package lwt.unix
# E: Failure("1 configuration error")

 The former state can be restored with opam switch import -f "/Users/jeffsco/.opam/system/backup/state-20131122040658.export"
'opam install utop' failed.

@samoht samoht reopened this Dec 22, 2013
@AltGr AltGr closed this as completed Mar 6, 2014
@AltGr
Copy link
Member

AltGr commented Mar 6, 2014

This seems to be an issue with ocamlfind ; opam reinstall lwt should fix it.

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

7 participants