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

Download of external projects during build fails with 'Protocol "https" not supported or disabled in libcurl' #214

Closed
zangobot opened this issue Feb 8, 2018 · 8 comments

Comments

@zangobot
Copy link

zangobot commented Feb 8, 2018

On Ubuntu 16.04, succesfully cloned the repository, build directory created, cmake with installation path correctly set then...

make -jN (for each N it does the same)
 build git:(master) make    
[  0%] Performing download step (download, verify and extract) for 'capstone-project'
CMake Error at capstone-project-stamp/capstone-project-download-Release.cmake:16 (message):
  Command failed: 1

   '/usr/local/bin/cmake' '-Dmake=' '-Dconfig=' '-P' '/home/USR/retdec/build/external/src/capstone-project-stamp/capstone-project-download-Release-impl.cmake'
  See also
/home/USR/retdec/build/external/src/capstone-project-stamp/capstone-project-download-*.log

deps/capstone/CMakeFiles/capstone-project.dir/build.make:89: recipe for target 'external/src/capstone-project-stamp/capstone-project-download' failed
make[2]: *** [external/src/capstone-project-stamp/capstone-project-download] Error 1
CMakeFiles/Makefile2:133: recipe for target 'deps/capstone/CMakeFiles/capstone-project.dir/all' failed
make[1]: *** [deps/capstone/CMakeFiles/capstone-project.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

It tries to download the archives (from a not existing pages, it seems), if I'm not wrong.
Sorry if it's a bug reposting.

@zangobot zangobot changed the title Installation: make not working Installation: make not working [Make] Feb 8, 2018
@zangobot zangobot changed the title Installation: make not working [Make] [Make] Installation: make not working Feb 8, 2018
@zangobot zangobot changed the title [Make] Installation: make not working Installation: make not working Feb 8, 2018
@s3rvac s3rvac changed the title Installation: make not working Build fails because 'capstone-project' cannot be downloaded Feb 9, 2018
@s3rvac
Copy link
Member

s3rvac commented Feb 9, 2018

Hi. I am unable to reproduce the problem. I tried building RetDec on Arch Linux (desktop PC), Ubuntu 16.04 (Travis CI), and Ubuntu 18.04 (Docker), and in all cases, the build succeeded.

Can you please post the contents of the following two log files from your system?

/home/USR/retdec/build/external/src/capstone-project-stamp/capstone-project-download-err.log
/home/USR/retdec/build/external/src/capstone-project-stamp/capstone-project-download-out.log

I believe that this might be either a network-related issue (GitHub was unavailable or your Internet connection dropped), or your system lacks support for downloading of files via HTTPS. Apart from providing the output of the log files above, can you also try downloading the file manually via the following command?

wget https://github.com/avast-tl/capstone/archive/27c713fe4f6eaf9721785932d850b6291a6073fe.zip

@zangobot
Copy link
Author

zangobot commented Feb 9, 2018

err.out

CMake Error at capstone-project-stamp/download-capstone-project.cmake:157 (message):
  Each download failed!

    error: downloading 'https://github.com/avast-tl/capstone/archive/27c713fe4f6eaf9721785932d850b6291a6073fe.zip' failed
         status_code: 1
         status_string: "Unsupported protocol"
         log:
         --- LOG BEGIN ---
         Protocol "https" not supported or disabled in libcurl

  Closing connection -1



         --- LOG END ---
         error: downloading 'https://github.com/avast-tl/capstone/archive/27c713fe4f6eaf9721785932d850b6291a6073fe.zip' failed
         status_code: 1
         status_string: "Unsupported protocol"
         log:
         --- LOG BEGIN ---
         Protocol "https" not supported or disabled in libcurl

  Closing connection -1



         --- LOG END ---
         error: downloading 'https://github.com/avast-tl/capstone/archive/27c713fe4f6eaf9721785932d850b6291a6073fe.zip' failed
         status_code: 1
         status_string: "Unsupported protocol"
         log:
         --- LOG BEGIN ---
         Protocol "https" not supported or disabled in libcurl

  Closing connection -1



         --- LOG END ---
         error: downloading 'https://github.com/avast-tl/capstone/archive/27c713fe4f6eaf9721785932d850b6291a6073fe.zip' failed
         status_code: 1
         status_string: "Unsupported protocol"
         log:
         --- LOG BEGIN ---
         Protocol "https" not supported or disabled in libcurl

  Closing connection -1



         --- LOG END ---
         error: downloading 'https://github.com/avast-tl/capstone/archive/27c713fe4f6eaf9721785932d850b6291a6073fe.zip' failed
         status_code: 1
         status_string: "Unsupported protocol"
         log:
         --- LOG BEGIN ---
         Protocol "https" not supported or disabled in libcurl

  Closing connection -1



         --- LOG END ---
         error: downloading 'https://github.com/avast-tl/capstone/archive/27c713fe4f6eaf9721785932d850b6291a6073fe.zip' failed
         status_code: 1
         status_string: "Unsupported protocol"
         log:
         --- LOG BEGIN ---
         Protocol "https" not supported or disabled in libcurl

  Closing connection -1



         --- LOG END ---




CMake Error at capstone-project-stamp/capstone-project-download-Release-impl.cmake:9 (message):
  Command failed (1):

   '/usr/local/bin/cmake' '-P' '/home/USR/retdec/build/external/src/capstone-project-stamp/download-capstone-project.cmake'

out.log

-- verifying file...
       file='/home/USR/retdec/build/external/src/capstone.zip'
-- SHA256 hash of
    /home/USR/retdec/build/external/src/capstone.zip
  does not match expected value
    expected: '4d8d0461d7d5737893253698cd0b6d0d64545c1a74b166e8b1d823156a3109cb'
      actual: 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
-- File already exists but hash mismatch. Removing...
-- Downloading...
   dst='/home/USR/retdec/build/external/src/capstone.zip'
   timeout='none'
-- Using src='https://github.com/avast-tl/capstone/archive/27c713fe4f6eaf9721785932d850b6291a6073fe.zip'
-- Retrying...
-- Using src='https://github.com/avast-tl/capstone/archive/27c713fe4f6eaf9721785932d850b6291a6073fe.zip'
-- Retry after 5 seconds (attempt #2) ...
-- Using src='https://github.com/avast-tl/capstone/archive/27c713fe4f6eaf9721785932d850b6291a6073fe.zip'
-- Retry after 5 seconds (attempt #3) ...
-- Using src='https://github.com/avast-tl/capstone/archive/27c713fe4f6eaf9721785932d850b6291a6073fe.zip'
-- Retry after 15 seconds (attempt #4) ...
-- Using src='https://github.com/avast-tl/capstone/archive/27c713fe4f6eaf9721785932d850b6291a6073fe.zip'
-- Retry after 60 seconds (attempt #5) ...
-- Using src='https://github.com/avast-tl/capstone/archive/27c713fe4f6eaf9721785932d850b6291a6073fe.zip'

wget is working fine, I can download the zip without problems.

@s3rvac
Copy link
Member

s3rvac commented Feb 9, 2018

CMake uses libcurl to download the archive. What curl and cmake versions do you use? Can you post the output from curl --version and cmake --version? It looks like that your libcurl was compiled without SSL support, which prevents it from downloading the archive via HTTPS.

@s3rvac s3rvac changed the title Build fails because 'capstone-project' cannot be downloaded Download of external projects during build fails with 'Protocol "https" not supported or disabled in libcurl' Feb 9, 2018
@s3rvac
Copy link
Member

s3rvac commented Feb 9, 2018

BTW, you wrote that you use Ubuntu 16.04. It ships with CMake 3.5, but RetDec requires at least CMake 3.6 to build. How did you install CMake >= 3.6 into your system? If you compiled it by yourself, you most probably compiled it without SSL support. I suggest either installing newer CMake from a Ubuntu repository, or re-building CMake with SSL support.

@zangobot
Copy link
Author

I installed the latest CMake version, maybe I missed that part!
I'll try and let you know as soon as possible!

@zangobot
Copy link
Author

zangobot commented Feb 12, 2018

curl 7.55.1 (x86_64-conda_cos6-linux-gnu) libcurl/7.55.1 OpenSSL/1.0.2l zlib/1.2.11 libssh2/1.8.0
cmake version 3.10.0

I purged the 3.5 cmake and installed (not compiled) using the latest on CMake website.
I'm going to download the source code and compile it by myself.
EDIT
compiled Cmake 3.10.2, still nothing. I have to figure out how can I setup openSSL during the installation.

@s3rvac
Copy link
Member

s3rvac commented Feb 15, 2018

compiled Cmake 3.10.2, still nothing. I have to figure out how can I setup openSSL during the installation.

You can try the following approach, which appears to be working for other users:

$ git clone -b v3.10.2 https://cmake.org/cmake.git cmake
$ cd cmake
$ ./bootstrap --system-curl
$ make
$ sudo make install

Nevertheless, I think it would be best to install CMake via a Ubuntu repository that provides CMake >= 3.6.

@zangobot
Copy link
Author

Correctly installed CMake and RetDec.
Thank you for your help and support!

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

2 participants