aws / aws-sdk-cpp

AWS SDK for C++
Apache License 2.0
1.98k stars 1.06k forks source link

Third party Build failing #2781

Closed shreeramk closed 11 months ago

shreeramk commented 11 months ago

Describe the bug

CMake Warning at CMakeLists.txt:19 (message):
  Building with CMake 3.12 or higher is strongly suggested; current version
  is 3.2.2

-- MINIMIZE_SIZE enabled
-- Found PythonInterp: /opt/rh/rh-python38/root/usr/bin/python3.8 (found version "3.8.13") 
-- TARGET_ARCH not specified; inferring host OS to be platform compilation target
-- Building AWS libraries as static objects
-- Generating linux build config
-- Building project version: 1.9.379
-- The CXX compiler identification is GNU 9.3.1
-- Check for working CXX compiler: /opt/rh/devtoolset-9/root/usr/bin/g++
-- Check for working CXX compiler: /opt/rh/devtoolset-9/root/usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.7") 
--   Zlib library: /usr/lib64/libz.so
-- Encryption: LibCrypto
-- Found crypto: /usr/lib64/libcrypto.so  
-- LibCrypto Include Dir: /usr/include
-- LibCrypto Shared Lib:  /usr/lib64/libcrypto.so
-- LibCrypto Static Lib:  crypto_STATIC_LIBRARY-NOTFOUND
-- Looking for include file pthread.h
CMake Error at /usr/share/cmake/Modules/CheckIncludeFiles.cmake:74 (try_compile):
  Unknown extension ".c" for file

    /tmp/psmdb/test/rpmbuild/BUILD/percona-server-mongodb-6.0.6-5/aws-sdk-cpp/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c

  try_compile() works only for enabled languages.  Currently these are:

    CXX

  See project() command to enable other languages.
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindThreads.cmake:123 (CHECK_INCLUDE_FILES)
  cmake/Findcrypto.cmake:98 (find_package)
  cmake/external_dependencies.cmake:44 (find_package)
  CMakeLists.txt:169 (include)

-- Looking for include file pthread.h - not found
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
  Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:374 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindThreads.cmake:204 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  cmake/Findcrypto.cmake:98 (find_package)
  cmake/external_dependencies.cmake:44 (find_package)
  CMakeLists.txt:169 (include)

-- Configuring incomplete, errors occurred!
See also "/tmp/psmdb/test/rpmbuild/BUILD/percona-server-mongodb-6.0.6-5/aws-sdk-cpp/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/psmdb/test/rpmbuild/BUILD/percona-server-mongodb-6.0.6-5/aws-sdk-cpp/build/CMakeFiles/CMakeError.log".
error: Bad exit status from /var/tmp/rpm-tmp.xmVdHz (%build)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.xmVdHz (%build)
+ return_code=1
+ '[' 1 '!=' 0 ']'
+ exit 1

Expected Behavior

Build should pass.

Current Behavior

Build is failing

Reproduction Steps

Download this shell script file https://raw.githubusercontent.com/percona/percona-server-mongodb/psmdb-6.0.11-8/percona-packaging/scripts/psmdb_builder.sh

And run below two commands:

First command: This is successful.. docker run -ti -u root -v /tmp/psmdb:/tmp/psmdb centos:7.9.2009 sh -c ' set -o xtrace cd /tmp/psmdb bash -x ./psmdb_builder.sh --builddir=/tmp/psmdb/test --install_deps=1 bash -x ./psmdb_builder.sh --builddir=/tmp/psmdb/test --repo=https://github.com/percona/percona-server-mongodb.git \ --branch=release-6.0.6-5 --psm_ver=6.0.6 --psm_release=5 --mongo_tools_tag=100.7.0 --enable_fipsmode=1 --jemalloc_tag=psmdb-3.2.11-3.1 --build_src_rpm=1 '

Second Command: Fails with above error logs

docker run -ti -u root -v /tmp/psmdb:/tmp/psmdb centos:7.9.2009 sh -c ' set -o xtrace cd /tmp/psmdb bash -x ./psmdb_builder.sh --builddir=/tmp/psmdb/test --install_deps=1 bash -x ./psmdb_builder.sh --builddir=/tmp/psmdb/test --repo=https://github.com/percona/percona-server-mongodb.git \ --branch=release-6.0.6-5 --psm_ver=6.0.6 --psm_release=5 --mongo_tools_tag=100.7.0 --jemalloc_tag=psmdb-3.2.11-3.1 --build_rpm=1 '

Possible Solution

No response

Additional Information/Context

No response

AWS CPP SDK version used

1.9.379

Compiler and Version used

8

Operating System and version

Amazon linux 2

jmklix commented 11 months ago

Can you first start by updating your cmake version? That is the first part of the error that you are seeing. As noted here please use a minimum cmake version of 3.13.

If that doesn't fix your error can please please provide more details about what exactly you are trying to do with your large script file. This will allow us to better understand your problem and what is causing your build failures

shreeramk commented 11 months ago

Can you first start by updating your cmake version? That is the first part of the error that you are seeing. As noted here please use a minimum cmake version of 3.13.

Current Version is 3.2.2. As shown in the log already.

If that doesn't fix your error can please please provide more details about what exactly you are trying to do with your large script file. This will allow us to better understand your problem and what is causing your build failures

I am trying to build mongodb using percona-mongodb script

jmklix commented 11 months ago

Yes, I can see that you are using cmake version 3.2.2, which is why I asked you to update to at least version 3.13.xx. We follow semantic versioning and your minor version (which is 2) needs to be at least 13. Can you please try updating your cmake version and let me know if you're still having problems with third party building

github-actions[bot] commented 11 months ago

Greetings! It looks like this issue hasn’t been active in longer than a week. We encourage you to check if this is still an issue in the latest release. Because it has been longer than a week since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or add an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one.

shreeramk commented 11 months ago

Yes, I can see that you are using cmake version 3.2.2, which is why I asked you to update to at least version 3.13.xx. We follow semantic versioning and your minor version (which is 2) needs to be at least 13. Can you please try updating your cmake version and let me know if you're still having problems with third party building

That seems like a warning, the actual error as per the log is this. Any idea what could be causing this?

-- Looking for include file pthread.h - not found CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:138 (message): Could NOT find Threads (missing: Threads_FOUND) Call Stack (most recent call first): /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:374 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake/Modules/FindThreads.cmake:204 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) cmake/Findcrypto.cmake:98 (find_package) cmake/external_dependencies.cmake:44 (find_package) CMakeLists.txt:169 (include)

jmklix commented 11 months ago

This might be caused by not using a supported version of cmake. Please install a supported version of cmake to see if that fixes your error

github-actions[bot] commented 11 months ago

Greetings! It looks like this issue hasn’t been active in longer than a week. We encourage you to check if this is still an issue in the latest release. Because it has been longer than a week since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or add an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one.