Octachron / olivine

Ocaml binding generator for vulkan
40 stars 2 forks source link

Host name resolution broken in install #2

Open mrvn opened 5 years ago

mrvn commented 5 years ago
mrvn@gamebook:~$ opam install olivine

<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[olivine.0.1] no changes from git+https://github.com/Octachron/olivine.git

The following actions will be performed:
  ∗ install olivine 0.1*

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of olivine failed at
    "/home/mrvn/.opam/opam-init/hooks/sandbox.sh build ./configure.sh".

#=== ERROR while compiling olivine.0.1 ========================================#
# context     2.0.3 | linux/x86_64 | ocaml-system.4.02.3 | pinned(git+https://github.com/Octachron/olivine.git#5e3b088c)
# path        ~/.opam/default/.opam-switch/build/olivine.0.1
# command     ~/.opam/opam-init/hooks/sandbox.sh build ./configure.sh
# exit-code   4
# env-file    ~/.opam/log/olivine-12247-6cc03f.env
# output-file ~/.opam/log/olivine-12247-6cc03f.out
### output ###
# --2019-08-06 01:56:00--  https://raw.githubusercontent.com/KhronosGroup/Vulkan-Docs/1.0/src/spec/vk.xml
# Resolving raw.githubusercontent.com (raw.githubusercontent.com)... failed: Temporary failure in name resolution.
# wget: unable to resolve host address ‘raw.githubusercontent.com’

<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build olivine 0.1
└─ 
╶─ No changes have been performed
# Run eval $(opam env) to update the current shell environment

mrvn@gamebook:~$ host raw.githubusercontent.com
raw.githubusercontent.com is an alias for github.map.fastly.net.
github.map.fastly.net has address 151.101.112.133

mrvn@gamebook:~$ wget raw.githubusercontent.com
URL transformed to HTTPS due to an HSTS policy
--2019-08-06 01:59:14--  https://raw.githubusercontent.com/
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.112.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.112.133|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://github.com/ [following]
--2019-08-06 01:59:14--  https://github.com/
Resolving github.com (github.com)... 140.82.118.3
Connecting to github.com (github.com)|140.82.118.3|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘index.html’

index.html                           [ <=>                                                    ]  85.71K  --.-KB/s    in 0.09s   

2019-08-06 01:59:15 (956 KB/s) - ‘index.html’ saved [87768]

As you can see host name resolution works just fine. But not during install.

Octachron commented 5 years ago

The issue is due to opam sandboxing that blocks the downloading of the vulkan spec. For proper release, my idea was to distribute a fixed version of the vulkan xml spec to avoid both this problem and the brittleness of the xml spec.