vcpkg
vcpkg copied to clipboard
[openssl] Build error
Host Environment
- OS: [Linux centos7 64bit ]
- Compiler: gcc-9.3.0
To Reproduce Steps to reproduce the behavior: `../vcpkg install openssl
Failure logs
Additional context
/usr/local/vcpkg_msft/vcpkg/buildtrees/openssl/install-x64-linux-dbg-out.log:
same too
@what951006 Can you please provide all the text logs in buildtrees/openssl?
Thanks.
Ping for response.
I have the same problem in ubuntu focal docker image GCC Version: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 Logs
Detecting compiler hash for triplet x64-linux...
The following packages will be built and installed:
curl[core,non-http,openssl,ssl]:x64-linux -> 7.82.0 -- /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/buildtrees/versioning_/versions/curl/203696f71dd43fa55a1b1104570135bebf869819
* libiconv[core]:x64-linux -> 1.16#13 -- /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/buildtrees/versioning_/versions/libiconv/cc4f1edf5a444934d4a757420a6cd3fed596e1d5
* liblzma[core]:x64-linux -> 5.2.5#5 -- /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/buildtrees/versioning_/versions/liblzma/18b7cbd0972b536a6bd4c0ef0f41dce9c3f047ac
libxml2[core]:x64-linux -> 2.9.12#5 -- /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/buildtrees/versioning_/versions/libxml2/582189632eff9dc4ba2ef262a853c339d2838bd9
* nlohmann-json[core]:x64-linux -> 3.10.5#2 -- /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/buildtrees/versioning_/versions/nlohmann-json/becf6a86f7e28342840fc807840c68b133c6fad8
openssl[core]:x64-linux -> 3.0.2#2 -- /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/buildtrees/versioning_/versions/openssl/66e7ff434d21a4fc00cab9bbe6167db295ffefd3
opentelemetry-cpp[core]:x64-linux -> 1.3.0 -- /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/buildtrees/versioning_/versions/opentelemetry-cpp/0ab7ef25acedde2552479fda46f92716afa53c98
* vcpkg-cmake[core]:x64-linux -> 2022-04-07 -- /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/buildtrees/versioning_/versions/vcpkg-cmake/3dcb01563c0de941013579456d19ce5b0bd08a6e
* vcpkg-cmake-config[core]:x64-linux -> 2022-02-06 -- /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/buildtrees/versioning_/versions/vcpkg-cmake-config/24dc7dfc704406e9f745f033643dc25f56e4ca18
* zlib[core]:x64-linux -> 1.2.12 -- /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/buildtrees/versioning_/versions/zlib/9c4edb1fabbd87dd236a200ba55eaf241cd8c8d0
Additional packages (*) will be modified to complete this operation.
Restored 0 packages from /root/.cache/vcpkg/archives in 37.32 us. Use --debug to see more details.
Starting package 1/10: vcpkg-cmake-config:x64-linux
Building package vcpkg-cmake-config[core]:x64-linux...
-- Installing port from location: /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/buildtrees/versioning_/versions/vcpkg-cmake-config/24dc7dfc704406e9f745f033643dc25f56e4ca18
-- Installing: /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/packages/vcpkg-cmake-config_x64-linux/share/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake
-- Installing: /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/packages/vcpkg-cmake-config_x64-linux/share/vcpkg-cmake-config/vcpkg-port-config.cmake
-- Installing: /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/packages/vcpkg-cmake-config_x64-linux/share/vcpkg-cmake-config/copyright
-- Performing post-build validation
-- Performing post-build validation done
Stored binary cache: /root/.cache/vcpkg/archives/ed/edc986b8bbe336853bf2386c3f0c91e5a28c0c2ecd28ce189ef9ee4e9fc6907b.zip
Installing package vcpkg-cmake-config[core]:x64-linux...
Elapsed time for package vcpkg-cmake-config:x64-linux: 32.95 ms
Starting package 2/10: vcpkg-cmake:x64-linux
Building package vcpkg-cmake[core]:x64-linux...
-- Installing port from location: /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/buildtrees/versioning_/versions/vcpkg-cmake/3dcb01563c0de941013579456d19ce5b0bd08a6e
-- Installing: /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/packages/vcpkg-cmake_x64-linux/share/vcpkg-cmake/vcpkg_cmake_configure.cmake
-- Installing: /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/packages/vcpkg-cmake_x64-linux/share/vcpkg-cmake/vcpkg_cmake_build.cmake
-- Installing: /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/packages/vcpkg-cmake_x64-linux/share/vcpkg-cmake/vcpkg_cmake_install.cmake
-- Installing: /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/packages/vcpkg-cmake_x64-linux/share/vcpkg-cmake/vcpkg_cmake_get_vars.cmake
-- Installing: /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/packages/vcpkg-cmake_x64-linux/share/vcpkg-cmake/cmake_get_vars
-- Installing: /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/packages/vcpkg-cmake_x64-linux/share/vcpkg-cmake/cmake_get_vars/CMakeLists.txt
-- Installing: /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/packages/vcpkg-cmake_x64-linux/share/vcpkg-cmake/vcpkg-port-config.cmake
-- Installing: /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/packages/vcpkg-cmake_x64-linux/share/vcpkg-cmake/copyright
-- Performing post-build validation
-- Performing post-build validation done
Stored binary cache: /root/.cache/vcpkg/archives/e2/e26a0eb7b9b1810386fa8864368d91047c16bc1a5d4a0c66628a782d7e838193.zip
Installing package vcpkg-cmake[core]:x64-linux...
Elapsed time for package vcpkg-cmake:x64-linux: 38.47 ms
Starting package 3/10: openssl:x64-linux
Building package openssl[core]:x64-linux...
-- Installing port from location: /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/buildtrees/versioning_/versions/openssl/66e7ff434d21a4fc00cab9bbe6167db295ffefd3
CMake Warning at buildtrees/versioning_/versions/openssl/66e7ff434d21a4fc00cab9bbe6167db295ffefd3/portfile.cmake:7 (message):
openssl currently requires the following library from the system package
manager:
linux-headers
It can be installed on alpine systems via apk add linux-headers.
Call Stack (most recent call first):
scripts/ports.cmake:145 (include)
-- Downloading https://www.openssl.org/source/openssl-3.0.2.tar.gz -> openssl-3.0.2.tar.gz...
-- Extracting source /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/downloads/openssl-3.0.2.tar.gz
-- Using source at /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/buildtrees/openssl/src/3.0.2-67d457a95e.clean
-- Configuring x64-linux-dbg
-- Configuring x64-linux-rel
-- Building x64-linux-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:158 (message):
Command failed: /usr/local/bin/cmake --build . --config Debug --target install -- -v -j3
Working Directory: /1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/buildtrees/openssl/x64-linux-dbg
See logs for more information:
/1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/_deps/vcpkg-src/buildtrees/openssl/install-x64-linux-dbg-out.log
Call Stack (most recent call first):
/1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/vcpkg_installed/x64-linux/share/vcpkg-cmake/vcpkg_cmake_build.cmake:111 (vcpkg_execute_build_process)
/1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/vcpkg_installed/x64-linux/share/vcpkg-cmake/vcpkg_cmake_install.cmake:41 (vcpkg_cmake_build)
buildtrees/versioning_/versions/openssl/66e7ff434d21a4fc00cab9bbe6167db295ffefd3/unix/portfile.cmake:27 (vcpkg_cmake_install)
buildtrees/versioning_/versions/openssl/66e7ff434d21a4fc00cab9bbe6167db295ffefd3/portfile.cmake:34 (include)
scripts/ports.cmake:145 (include)
error: building openssl:x64-linux failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `git pull` and `./vcpkg update`.
Then check for known issues at:
https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+openssl
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[openssl]+Build+error
including:
package: openssl[core]:x64-linux -> 3.0.2#2
vcpkg-tool version: 2022-03-30-692785ac944e81417840c6de244fb3e18a4b35eb
vcpkg-scripts version: f0aa678b7 2022-04-18 (5 months ago)
Additionally, attach any relevant sections from the log files above.
@gurkanindibay Please provide failure log _/1.1.0.citus~git.20220914.e687448/vendor/azure-sdk-for-cpp/build/deps/vcpkg-src/buildtrees/openssl/install-x64-linux-dbg-out.log.
Thanks.
@JackBoosY I've just added the failures of the log. I hope it's enough for you openssl_logs.log I'm using a Makefile to be able to build the azure sdk.Yesterday I noticed a new aspect for the error. When I enter into the azure sdk directory and manually execute cmake cmake passes but it's giving error when I execute it in makefile After executing manually once, I do not get the same error again in Makefile even I delete all directories including azure sdk source and clone it again
@gurkanindibay Should be the same issue with https://github.com/openssl/openssl/issues/9928
@JackBoosY I added these flags into cmake but still got the same errors
cmake -DCPPFLAGS="-ansi ./config no-asm --strict-warnings -D_DEFAULT_SOURCE" -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_STANDARD_REQUIRED=ON -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_MAKE_PROGRAM=/usr/bin/make -DCMAKE_CXX_FLAGS="-ansi ./config no-asm --strict-warnings -D_DEFAULT_SOURCE" -G 'Unix Makefiles' -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Debug ..
@JackBoosY I added these flags into cmake but still got the same errors
cmake -DCPPFLAGS="-ansi ./config no-asm --strict-warnings -D_DEFAULT_SOURCE" -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_STANDARD_REQUIRED=ON -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_MAKE_PROGRAM=/usr/bin/make -DCMAKE_CXX_FLAGS="-ansi ./config no-asm --strict-warnings -D_DEFAULT_SOURCE" -G 'Unix Makefiles' -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Debug ..
I think we should wait for the upstream fix this bug first.
Hi @JackBoosY I fixed the issue by setting dialect in Makefile I realizded that we have PG_CFLAGS parameter which is set to CFLAGS in Makefile and has the argument -std=c99. I changed this into -std=gnu99 and openssl successfully built. Therefore, one should validate that CFLAGS and CPPFLAGS variables should include the dialect that is supported by openssl.
Hi @JackBoosY I fixed the issue by setting dialect in Makefile I realizded that we have PG_CFLAGS parameter which is set to CFLAGS in Makefile and has the argument -std=c99. I changed this into -std=gnu99 and openssl successfully built. Therefore, one should validate that CFLAGS and CPPFLAGS variables should include the dialect that is supported by openssl.
Can you please report this bug to the openssl upstream?
Hi @JackBoosY I fixed the issue by setting dialect in Makefile I realizded that we have PG_CFLAGS parameter which is set to CFLAGS in Makefile and has the argument -std=c99. I changed this into -std=gnu99 and openssl successfully built. Therefore, one should validate that CFLAGS and CPPFLAGS variables should include the dialect that is supported by openssl.
Hi, I encountered the same problem. I want to know where the Makefile is located.
@zhihuiLiang We set -std=gnu99 in CFLAGS variable in our own Makefile. It was c99 before
Port openssl is at 3.0.8, and the non-windows build of openssl was changed significantly with #27261. If you still need special compiler flags, please state them clearly. Basically, openssl should get the same flags that CMake would use.
This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.