KhronosGroup / Vulkan-Tools

Vulkan Development Tools
Apache License 2.0
359 stars 152 forks source link

Cube Cmake error during downloading with glslangValidator.py #51

Closed but0n closed 5 years ago

but0n commented 6 years ago

macOS 10.14 Beta (18A326g)

cmake -DCMAKE_BUILD_TYPE=Debug -DVULKAN_LOADER_INSTALL_DIR=/Users/but0n/vulkansdk/macOS/lib/ -DMOLTENVK_REPO_ROOT=/Users/but0n/vulkansdk/macOS/lib/ ..
-- Using cmake find_program to look for glslangValidator
   Downloading glslangValidator binary from glslang releases dir
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1317, in do_open
    encode_chunked=req.has_header('Transfer-encoding'))
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1229, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1275, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1224, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1016, in _send_output
    self.send(msg)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 956, in send
    self.connect()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1392, in connect
    server_hostname=server_hostname)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 412, in wrap_socket
    session=session
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 850, in _create
    self.do_handshake()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 1108, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/but0n/Github/Vulkan-Tools/cube/scripts/fetch_glslangvalidator.py", line 63, in <module>
    urllib.request.urlretrieve(GLSLANG_COMPLETE_URL, GLSLANG_OUTFILENAME)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 247, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 525, in open
    response = self._open(req, data)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 543, in _open
    '_open', req)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 503, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1360, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1319, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)>
CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.10)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
CMake Error at macOS/cubepp/cubepp.cmake:36 (add_executable):
  Cannot find source file:

    /Users/but0n/Github/Vulkan-Tools/cube/staging-json/MoltenVK_icd.json

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx
Call Stack (most recent call first):
  CMakeLists.txt:213 (include)

CMake Warning (dev) at macOS/cubepp/cubepp.cmake:49 (add_dependencies):
  Policy CMP0046 is not set: Error on non-existent dependency in
  add_dependencies.  Run "cmake --help-policy CMP0046" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  The dependency target "MoltenVK_icd-staging-json" of target "cubepp" does
  not exist.
Call Stack (most recent call first):
  CMakeLists.txt:213 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at macOS/cube/cube.cmake:48 (add_dependencies):
  Policy CMP0046 is not set: Error on non-existent dependency in
  add_dependencies.  Run "cmake --help-policy CMP0046" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  The dependency target "MoltenVK_icd-staging-json" of target "cube" does not
  exist.
Call Stack (most recent call first):
  CMakeLists.txt:183 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error: CMake can not determine linker language for target: cubepp
CMake Error: Cannot determine link language for target "cubepp".
CMake Error: CMake can not determine linker language for target: cube
CMake Error: Cannot determine link language for target "cube".
-- Generating done
-- Build files have been written to: /Users/but0n/Github/Vulkan-Tools/cube
jeremyk-lunarg commented 6 years ago

Thank you for bringing the SSL error to our attention. We will be updating this script to fix the issue. As for the other errors you are getting, these should be fixed by pointing the VULKAN_LOADER_INSTALL_DIR and MOLTENVK_REPO_ROOT variables at their appropriate repos. These variables are meant to be pointed at repos that have been cloned and built, and are not designed to be pointed at the SDK files. Please refer to the BUILD.md file for more information.

but0n commented 6 years ago

OK, Thanks!

karl-lunarg commented 6 years ago

We should probably keep this issue open until the fixes are made, so I am reopening.

@but0n : Your problem was new to us and we could not reproduce it. We think it may have something to do with the "beta" version of 10.14 or some other security feature that you have enabled. If you have any insights about this, please let us know. For example, you may have turned on some special security setting on your machine. Also, have you been able to try it on 10.12 or 10.13?

If there is a way for us to "turn on" some security feature that allows us to reproduce the problem, then we can be more certain that our fix works.

Here is what is happening: There is CMake code that tries to download this file:

https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-osx-Release.zip

And that code is failing on your machine because of an SSL certificate checking issue. Our fix will be to modify the script to disable the certificate check, which is safe because the data does not need to be secure.

As a workaround, you can download the above file yourself, unzip it, and then create this directory structure:

Vulkan-Tools/glslang/bin/glslangValidator

You would get the glslangValidator binary from the zip file.

See scripts/fetch_glslangvalidator.py for more details.

but0n commented 6 years ago

@karl-lunarg Hi, thanks for your reply. Probably it is my network issues, I have been using socks proxy with shadowsocks. ALL_PROXY socks5://127.0.0.1:1086

karl-lunarg commented 5 years ago

Closing due to apparent user resolution of the problem and/or resolution via the applied fix. @but0n please reopen if needed.