intel / SGX-TDX-DCAP-QuoteVerificationLibrary

Other
5 stars 1 forks source link

Does not compile due to openssl sources have moved #15

Closed matti closed 1 month ago

matti commented 1 month ago

Following https://github.com/intel/SGX-TDX-DCAP-QuoteVerificationService/issues/24 I tried to manually compile this using the README:

$ cd Src
$ ./release

which then fails like https://github.com/intel/SGX-TDX-DCAP-QuoteVerificationService/issues/24 because openssl sources have moved

-- Using src='https://www.openssl.org/source/openssl-3.0.10.tar.gz'
-- [download 0% complete]
CMake Error at /root/.cache/hunter/4ENz9/OpenSSL/OpenSSL-prefix/src/OpenSSL-stamp/download-OpenSSL.cmake:170 (message):
  Each download failed!

    error: downloading 'https://www.openssl.org/source/openssl-3.0.10.tar.gz' failed
          status_code: 22
          status_string: "HTTP response code said error"
          log:
          --- LOG BEGIN ---
            Trying 34.36.58.177:443...
matti commented 1 month ago

Looks like openssl has correct path in https://github.com/intel/SGX-TDX-DCAP-QuoteVerificationLibrary/blob/812e0fa140a284b772b2d8b08583c761e23ec3b3/Src/ThirdParty/hunter/openssl/hunter.cmake#L19 but the build still omits this and uses the default(?) which points to legacy sources.

specio commented 1 month ago

Hi @matti It seems that OpenSSL made website migration: https://github.com/openssl/openssl/issues/25003 And various files including release packages, license files, etc. has been temporarily affected.

We noticed some disruptions with OpenSSL package downloads in local build systems, but they stabilized and work now. Do you still encounter the issue? I cleared Hunter cache and tested building QVL with ./release script locally and it seems to work fine:

-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (0.4s)
-- Generating done (0.0s)
-- Build files have been written to: /home/specio/.cache/hunter/bkpcG/OpenSSL
[ 12%] Creating directories for 'OpenSSL'
[ 25%] Performing download step (download, verify and extract) for 'OpenSSL'
-- Downloading...
   dst='/home/specio/.cache/hunter/_Base/Download/OpenSSL/3.0.10/f6ce698/openssl-3.0.10.tar.gz'
   timeout='none'
   inactivity timeout='none'
-- Using src='https://www.openssl.org/source/openssl-3.0.10.tar.gz'
-- [download 0% complete]
-- [download 1% complete]
-- [download 2% complete]
-- [download 3% complete]
-- [download 4% complete]
-- [download 5% complete]
-- [download 6% complete]
-- [download 7% complete]
-- [download 8% complete]
-- [download 9% complete]
-- [download 10% complete]
-- [download 21% complete]
-- [download 31% complete]
-- [download 42% complete]
-- [download 53% complete]
-- [download 64% complete]
-- [download 69% complete]
-- [download 80% complete]
-- [download 91% complete]
-- [download 100% complete]
-- verifying file...
       file='/home/specio/.cache/hunter/_Base/Download/OpenSSL/3.0.10/f6ce698/openssl-3.0.10.tar.gz'
-- Downloading... done
-- extracting...
     src='/home/specio/.cache/hunter/_Base/Download/OpenSSL/3.0.10/f6ce698/openssl-3.0.10.tar.gz'
     dst='/home/specio/.cache/hunter/_Base/69e4a05/347e47c/f25e1c0/Build/OpenSSL/Source'
-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
[ 37%] No update step for 'OpenSSL'
[ 50%] No patch step for 'OpenSSL'
[ 62%] Performing configure step for 'OpenSSL'

Please tell me if the problem still occurs.

matti commented 1 month ago

Hey @specio if you have a look at your own log file it says Using src='https://www.openssl.org/source/openssl-3.0.10.tar.gz'

I don't think you cleared your cache as it's coming from there?

I'm using a fresh machine, so my cache is cleared.

What if you actually clear your cache for example with mv /home/specio/.cache/hunter /home/specio/.cache/hunter.old and try again to get it failing?

matti commented 1 month ago

also, this fails also in docker build, which is by nature cacheless

specio commented 1 month ago

yes, I did move entire hunter folder to hunter.bak We can see Download progress from 1% to 100% indicating that it is actually being downloaded from: https://www.openssl.org/source/openssl-3.0.10.tar.gz If You click the link You will see that it is actually working fine.

When I do not clear the cache I get:

-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
HUNTER_GATE_ROOT: /home/specio/.cache/hunter
-- [hunter] Calculating Toolchain-SHA1
-- [hunter] Calculating Config-SHA1
-- [hunter] HUNTER_ROOT: /home/specio/.cache/hunter
-- [hunter] [ Hunter-ID: 69e4a05 | Toolchain-ID: 347e47c | Config-ID: f25e1c0 ]
-- [hunter] OPENSSL_ROOT: /home/specio/.cache/hunter/_Base/69e4a05/347e47c/f25e1c0/Install (ver.: 3.0.10)
-- [hunter] GTEST_ROOT: /home/specio/.cache/hunter/_Base/69e4a05/347e47c/f25e1c0/Install (ver.: 1.11.0)
-- [hunter] HUNTER_ROOT: /home/specio/.cache/hunter
-- [hunter] [ Hunter-ID: 69e4a05 | Toolchain-ID: 347e47c | Config-ID: f25e1c0 ]
-- [hunter] OPENSSL_ROOT: /home/specio/.cache/hunter/_Base/69e4a05/347e47c/f25e1c0/Install (ver.: 3.0.10)
-- Found OpenSSL: /home/specio/.cache/hunter/_Base/69e4a05/347e47c/f25e1c0/Install/lib/libssl.a;/home/specio/.cache/hunter/_Base/69e4a05/347e47c/f25e1c0/Install/lib/libcrypto.a;dl (found version "3.0.10") 
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- [hunter] OPENSSL_ROOT: /home/specio/.cache/hunter/_Base/69e4a05/347e47c/f25e1c0/Install (ver.: 3.0.10)

So the entire download step is skipped.

Please verify if indeed build still fails as it seems to be fine and given OpenSSL package URL is working (release package has not been moved - it was temporarily unavailable). As i can't reproduce this issue. please also check if possibly the URL is not being block by a proxy or firewall.

edit: I double checked even on my mobile phone: https://www.openssl.org/source/openssl-3.0.10.tar.gz is a valid URL and package has not been moved.

matti commented 1 month ago

aaah right, now I got it, yes now it will work