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

Sources of the following couldn't be obtained, aborting #3970

Closed
Zarickan opened this issue Aug 29, 2019 · 9 comments
Closed

Sources of the following couldn't be obtained, aborting #3970

Zarickan opened this issue Aug 29, 2019 · 9 comments

Comments

@Zarickan
Copy link

I cannot install merlin and utop through opam:

$ opam install merlin
The following actions will be performed:
  - install ocamlfind   1.8.1 [required by merlin]
  - install easy-format 1.3.2 [required by yojson]
  - install biniou      1.2.1 [required by yojson]
  - install yojson      1.7.0 [required by merlin]
  - install merlin      3.3.2
===== 5 to install =====
Do you want to continue? [Y/n] y

<><> Gathering sources >
[biniou.1.2.1] found in cache
[easy-format.1.3.2] found in cache
[merlin.3.3.2] found in cache
[ocamlfind.1.8.1] found in cache
[yojson.1.7.0] found in cache
[ERROR] The sources of the following couldn't be obtained, aborting:
          - ocamlfind.1.8.1

Running with verbose:

$ opam install merlin -vv
+ /usr/local/bin/ocamlc "-vnum"
- 4.08.1
The following actions will be performed:
  - install ocamlfind   1.8.1 [required by merlin]
  - install easy-format 1.3.2 [required by yojson]
  - install biniou      1.2.1 [required by yojson]
  - install yojson      1.7.0 [required by merlin]
  - install merlin      3.3.2
===== 5 to install =====
Do you want to continue? [Y/n] y

<><> Gathering sources >
+ /usr/bin/openssl "sha512" "/Users/Frederik 1/.opam/download-cache/sha256/35/35546c68b1929a8e6d27a3b39ecd17b38303a0d47e65eb9d1480c2061ea84335"
- SHA512(/Users/Frederik 1/.opam/download-cache/sha256/35/35546c68b1929a8e6d27a3b39ecd17b38303a0d47e65eb9d1480c2061ea84335)= 82670cc77bf3e869ee26e5fbe5a5affa45a22bc8b6c4bd7e85473912780e0111baca59b34a2c14feae3543ce6e239d7fddaeab24b686a65bfe642cdb91d27ebf
[biniou.1.2.1] found in cache
+ /usr/bin/openssl "sha512" "/Users/Frederik 1/.opam/download-cache/sha256/34/3440c2b882d537ae5e9011eb06abb53f5667e651ea4bb3b460ea8230fa8c1926"
- SHA512(/Users/Frederik 1/.opam/download-cache/sha256/34/3440c2b882d537ae5e9011eb06abb53f5667e651ea4bb3b460ea8230fa8c1926)= e39377a2ff020ceb9ac29e8515a89d9bdbc91dfcfa871c4e3baafa56753fac2896768e5d9822a050dc1e2ade43c8967afb69391a386c0a8ecd4e1f774e236135
[easy-format.1.3.2] found in cache
+ /usr/bin/openssl "sha512" "/Users/Frederik 1/.opam/download-cache/sha256/1d/1d1c71e663b1e58acf19069cebd1e8d18f7dbe513c6065347d162cdd2c2de801"
- SHA512(/Users/Frederik 1/.opam/download-cache/sha256/1d/1d1c71e663b1e58acf19069cebd1e8d18f7dbe513c6065347d162cdd2c2de801)= 3ae021669808a40b4449f1cbdaca40b605ea5779a6204addd8b0ee4af9f14f528d55ca43a8dd3c7d547fb8e4cb256c09a9151d5559ef24dad83b5ab05aa146a2
[merlin.3.3.2] found in cache
+ /usr/bin/tar "xfj" "/Users/Frederik 1/.opam/download-cache/sha256/34/3440c2b882d537ae5e9011eb06abb53f5667e651ea4bb3b460ea8230fa8c1926" "-C" "/var/folders/xz/9bn42jq56rj7gbdh0h914gy40000gn/T/opam-62093-ffb3fd"
[ocamlfind.1.8.1] found in cache
+ /usr/bin/tar "xfj" "/Users/Frederik 1/.opam/download-cache/sha256/35/35546c68b1929a8e6d27a3b39ecd17b38303a0d47e65eb9d1480c2061ea84335" "-C" "/var/folders/xz/9bn42jq56rj7gbdh0h914gy40000gn/T/opam-62093-42bb52"
[yojson.1.7.0] found in cache
+ /usr/bin/tar "xfz" "/Users/Frederik 1/.opam/download-cache/md5/18/18ca650982c15536616dea0e422cbd8c" "-C" "/var/folders/xz/9bn42jq56rj7gbdh0h914gy40000gn/T/opam-62093-a71bb4"
+ /usr/bin/tar "xfj" "/Users/Frederik 1/.opam/download-cache/md5/b8/b89d39ca3f8c532abe5f547ad3b8f84d" "-C" "/var/folders/xz/9bn42jq56rj7gbdh0h914gy40000gn/T/opam-62093-e4db2f"
+ /usr/bin/tar "xfj" "/Users/Frederik 1/.opam/download-cache/sha256/1d/1d1c71e663b1e58acf19069cebd1e8d18f7dbe513c6065347d162cdd2c2de801" "-C" "/var/folders/xz/9bn42jq56rj7gbdh0h914gy40000gn/T/opam-62093-e7966f"
[ERROR] The sources of the following couldn't be obtained, aborting:
          - ocamlfind.1.8.1:
            "/bin/cp -PRp /var/folders/xz/9bn42jq56rj7gbdh0h914gy40000gn/T/opam-62093-a71bb4/findlib-1.8.1/INSTALL /var/folders/xz/9bn42jq56rj7gbdh0h914gy40000gn/T/opam-62093-a71bb4/findlib-1.8.1/LICENSE
            /var/folders/xz/9bn42jq56rj7gbdh0h914gy40000gn/T/opam-62093-a71bb4/findlib-1.8.1/Makefile /var/folders/xz/9bn42jq56rj7gbdh0h914gy40000gn/T/opam-62093-a71bb4/findlib-1.8.1/Makefile.config.pattern
            /var/folders/xz/9bn42jq56rj7gbdh0h914gy40000gn/T/opam-62093-a71bb4/findlib-1.8.1/configure /var/folders/xz/9bn42jq56rj7gbdh0h914gy40000gn/T/opam-62093-a71bb4/findlib-1.8.1/doc
            /var/folders/xz/9bn42jq56rj7gbdh0h914gy40000gn/T/opam-62093-a71bb4/findlib-1.8.1/findlib.conf.in /var/folders/xz/9bn42jq56rj7gbdh0h914gy40000gn/T/opam-62093-a71bb4/findlib-1.8.1/itest
            /var/folders/xz/9bn42jq56rj7gbdh0h914gy40000gn/T/opam-62093-a71bb4/findlib-1.8.1/itest-aux /var/folders/xz/9bn42jq56rj7gbdh0h914gy40000gn/T/opam-62093-a71bb4/findlib-1.8.1/mini
            /var/folders/xz/9bn42jq56rj7gbdh0h914gy40000gn/T/opam-62093-a71bb4/findlib-1.8.1/site-lib-src /var/folders/xz/9bn42jq56rj7gbdh0h914gy40000gn/T/opam-62093-a71bb4/findlib-1.8.1/src
            /var/folders/xz/9bn42jq56rj7gbdh0h914gy40000gn/T/opam-62093-a71bb4/findlib-1.8.1/tools /Users/Frederik 1/.opam/default/.opam-switch/sources/ocamlfind.1.8.1" exited with code 1

'opam install merlin -vv' failed.

Config report:

# opam config report
# opam-version      2.0.5
# self-upgrade      no
# system            arch=x86_64 os=macos os-distribution=homebrew os-version=10.15
# solver            builtin-mccs+glpk
# install-criteria  -removed,-count[version-lag,request],-count[version-lag,changed],-changed
# upgrade-criteria  -removed,-count[version-lag,solution],-new
# jobs              7
# repositories      1 (http) (default repo at fa7886ff)
# pinned            0
# current-switch    default
@AltGr
Copy link
Member

AltGr commented Aug 29, 2019

Apparently the final copy failed, so maybe a permission error at the destination ? Or is your disk full ?

@Zarickan
Copy link
Author

Zarickan commented Aug 29, 2019

Disk is not full.

It should not be permissions related. Unless there is more to installing opam on mac than doing a "brew install opam" as described on the homepage?

Does opam support paths with spaces in them?

@rjbou
Copy link
Collaborator

rjbou commented Aug 29, 2019

You can try to run with 3 v to catch the exact cp command that failed.
You have on your destination path a space, it shouldn't be a problem as every argument is quoted...

There is nothing more to do to install opam itself. And what is weird, is that it's juste the ocamlfind copy that fails, the others ones (cache → tmp dir → source) succeed.

@Zarickan
Copy link
Author

Alright. So I somehow managed to get past the depency stuff. However it still fails. Are you positive that opam works with paths that contain spaces?

It now fails with:

+ /Users/Frederik 1/.opam/opam-init/hooks/sandbox.sh "build" "make" "all" (CWD=/Users/Frederik 1/.opam/default/.opam-switch/build/ocamlfind.1.8.1)
- for p in findlib; do ( cd src/$p; /Users/Frederik 1/Repositories/Xcode-beta.app/Contents/Developer/usr/bin/make all ) || exit; done
- /bin/sh: /Users/Frederik: No such file or directory
- make: *** [all] Error 127
[ERROR] The compilation of ocamlfind failed at "/Users/Frederik 1/.opam/opam-init/hooks/sandbox.sh build make all".

It is looking for - /bin/sh: /Users/Frederik: No such file or directory, which is the path up until the space.

Entire output:

$ opam install merlin -vv
+ /usr/local/bin/ocamlc "-vnum"
- 4.08.1
The following actions will be performed:
  - install ocamlfind 1.8.1 [required by merlin]
  - install merlin    3.3.2
===== 2 to install =====
Do you want to continue? [Y/n] y

<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+ /usr/bin/openssl "sha512" "/Users/Frederik 1/.opam/download-cache/sha256/1d/1d1c71e663b1e58acf19069cebd1e8d18f7dbe513c6065347d162cdd2c2de801"
- SHA512(/Users/Frederik 1/.opam/download-cache/sha256/1d/1d1c71e663b1e58acf19069cebd1e8d18f7dbe513c6065347d162cdd2c2de801)= 3ae021669808a40b4449f1cbdaca40b605ea5779a6204addd8b0ee4af9f14f528d55ca43a8dd3c7d547fb8e4cb256c09a9151d5559ef24dad83b5ab05aa146a2
[merlin.3.3.2] found in cache
[ocamlfind.1.8.1] found in cache
+ /usr/bin/tar "xfz" "/Users/Frederik 1/.opam/download-cache/md5/18/18ca650982c15536616dea0e422cbd8c" "-C" "/var/folders/xz/9bn42jq56rj7gbdh0h914gy40000gn/T/opam-2617-5f1023"
+ /usr/bin/tar "xfj" "/Users/Frederik 1/.opam/download-cache/sha256/1d/1d1c71e663b1e58acf19069cebd1e8d18f7dbe513c6065347d162cdd2c2de801" "-C" "/var/folders/xz/9bn42jq56rj7gbdh0h914gy40000gn/T/opam-2617-42bb52"

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[WARNING] Command "/Users/Frederik 1/.opam/opam-init/hooks/sandbox.sh" contains space characters
+ /Users/Frederik 1/.opam/opam-init/hooks/sandbox.sh "build" "./configure" "-bindir" "/Users/Frederik 1/.opam/default/bin" "-sitelib" "/Users/Frederik 1/.opam/default/lib" "-mandir" "/Users/Frederik 1/.opam/default/man" "-config" "/Users/Frederik 1/.opam/default/lib/findlib.conf" "-no-custom" "-no-topfind" (CWD=/Users/Frederik 1/.opam/default/.opam-switch/build/ocamlfind.1.8.1)
- Welcome to findlib version 1.8.1
- Configuring core...
- Checking for #remove_directory...
- Testing threading model...
- systhread_supported: true
- Testing DLLs...
- Testing whether ppxopt can be supported...
- Checking for ocamlc -opaque...
- Configuring libraries...
- native dynlink: found
- labltk: not present
- ocamlbuild: not present
- camlp4: not present (normal since OCaml-4.02)
- compiler-libs: found
- dbm: not present (normal since OCaml-4.00)
- num: not present (normal since OCaml-4.06)
- bytes: found, installing fake library
- spacetime: found
- graphics: not found
- Configuration for dynlink written to site-lib-src/dynlink/META
- Configuration for str written to site-lib-src/str/META
- Configuration for threads written to site-lib-src/threads/META
- Configuration for unix written to site-lib-src/unix/META
- Configuration for stdlib written to site-lib-src/stdlib/META
- Configuration for bigarray written to site-lib-src/bigarray/META
- Configuration for ocamldoc written to site-lib-src/ocamldoc/META
- Configuration for compiler-libs written to site-lib-src/compiler-libs/META
- Configuration for bytes written to site-lib-src/bytes/META
- Configuration for raw_spacetime written to site-lib-src/raw_spacetime/META
- Detecting compiler arguments: (extractor built) ok
-
- About the OCAML core installation:
-     Standard library:      /usr/local/lib/ocaml
-     Binaries:              /usr/local/bin
-     Manual pages:          /usr/local/man
-     Multi-threading type:  posix
- The directory of site-specific packages will be
-     site-lib:              /Users/Frederik 1/.opam/default/lib
- The configuration file is written to:
-     findlib config file:   /Users/Frederik 1/.opam/default/lib/findlib.conf
- Software will be installed:
-     Libraries:             in <site-lib>/findlib
-     Binaries:              /Users/Frederik 1/.opam/default/bin
-     Manual pages:          /Users/Frederik 1/.opam/default/man
-     topfind script:        omitted
- Topfind ppxopt support:    yes
- Toolbox:                   no
- Link custom runtime:       no
- Need bytes compatibility:  no
-
- Configuration has been written to Makefile.config
-
- You can now do 'make all', and optionally 'make opt', to build ocamlfind.
[WARNING] Command "/Users/Frederik 1/.opam/opam-init/hooks/sandbox.sh" contains space characters
+ /Users/Frederik 1/.opam/opam-init/hooks/sandbox.sh "build" "make" "all" (CWD=/Users/Frederik 1/.opam/default/.opam-switch/build/ocamlfind.1.8.1)
- for p in findlib; do ( cd src/$p; /Users/Frederik 1/Repositories/Xcode-beta.app/Contents/Developer/usr/bin/make all ) || exit; done
- /bin/sh: /Users/Frederik: No such file or directory
- make: *** [all] Error 127
[ERROR] The compilation of ocamlfind failed at "/Users/Frederik 1/.opam/opam-init/hooks/sandbox.sh build make all".

#=== ERROR while compiling ocamlfind.1.8.1 ====================================#
# context     2.0.5 | macos/x86_64 | ocaml-system.4.08.1 | https://opam.ocaml.org#fa7886ff
# path        ~/.opam/default/.opam-switch/build/ocamlfind.1.8.1
# command     ~/.opam/opam-init/hooks/sandbox.sh build make all
# exit-code   2
# env-file    ~/.opam/log/ocamlfind-2617-d0f245.env
# output-file ~/.opam/log/ocamlfind-2617-d0f245.out
### output ###
# for p in findlib; do ( cd src/$p; /Users/Frederik 1/Repositories/Xcode-beta.app/Contents/Developer/usr/bin/make all ) || exit; done
# /bin/sh: /Users/Frederik: No such file or directory
# make: *** [all] Error 127



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+- The following actions were aborted
| - install merlin 3.3.2
+-
+- The following actions failed
| - build ocamlfind 1.8.1
+-
- No changes have been performed
'opam install merlin -vv' failed.

@dra27
Copy link
Member

dra27 commented Aug 29, 2019

That’s an error in findlib’s build system, by the look of it. Packaging is improving, but older build systems often have missing quotes in commands which break as soon as there’s a space

@Zarickan
Copy link
Author

Is there any way to get around this?

@dra27
Copy link
Member

dra27 commented Aug 29, 2019

You could initialise a new opam root by setting OPAMROOT to a location with no spaces - I’m not sure there’s much else to suggest beyond attempting to fix findlib’s build system

@Zarickan
Copy link
Author

Thank you everyone for helping. I'll try to work around it.

I'll leave it up to you whether or not to close the issue or leave it up.

@Kamilnaja
Copy link

Please try open cygwin or other bash as admin and then run opam command, that works for me :)

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

No branches or pull requests

5 participants