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

aersopike-common: new recipe #23388

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

ybogo
Copy link

@ybogo ybogo commented Apr 5, 2024

Specify library name and version: aerospike-common/0009245

This library is only needed for aerospike-client-c (PR already created #23356) but in root project it is used as a submodule thats why it needs it's own recipe.

Also there is no any version of this library officially exist (no tags, no branches, etc). That why I used commit hash a version.


@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@AbrilRBS AbrilRBS self-assigned this Apr 5, 2024
Copy link
Member

@AbrilRBS AbrilRBS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! you mention that this was only used internally from another specific library, makes me wonder if vendorizing it in that one would be easier for you, but happy to have this availale in CCI too! Let us know if you need help fixing the issues detected in CI :)

@@ -0,0 +1,4 @@
sources:
"0009245":
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For these cases, we usually use cci.YYYYMMDD with the date of the picked commit

@conan-center-bot

This comment has been minimized.

@ybogo
Copy link
Author

ybogo commented Apr 8, 2024

Thanks! you mention that this was only used internally from another specific library, makes me wonder if vendorizing it in that one would be easier for you, but happy to have this availale in CCI too! Let us know if you need help fixing the issues detected in CI :)

Actually I don't want to create separate packages for each library from aerospike client but as I said in root project it is used as a submodule. As far as I know git is not allowed to pull sources #23356 (comment) . So what is the most correct way to create a recipe for repo with submodules?

As for CI errors I have I question how to disable windows support? This package use pure make as a build tool which is not supported for windows. I raised an ConanException in validate(self) method but CI treat this as an error

And last but not least problem with cross-platform build. I implemented my own function which generate arch falgs for different compilers and it works nice. But I am getting an error during linakage of test package. Somehow tests package still building for host arch and not for specified in in build settings. Take a look at failed job logs. I managed to reproduce it locally with VERBOSE=1:

/Library/Developer/CommandLineTools/usr/bin/c++  -isystem /Users/yurybogomolov/.conan2/p/b/aeros5cd64c47a6652/p/include -stdlib=libc++ -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -std=gnu++17 -MD -MT CMakeFiles/test_package.dir/main.cpp.o -MF CMakeFiles/test_package.dir/main.cpp.o.d -o CMakeFiles/test_package.dir/main.cpp.o -c /Users/yurybogomolov/develop/conan-center-index/recipes/aerospike-common/all/test_package/main.cpp

@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ❌

Failure in build 11 (d33c02efea13819a5f0ca88899d166331c61ba0b):

  • aerospike-common/cci.20240124:
    Error running command conan info aerospike-common/cci.20240124@#dde8ddbb4cfaf4aeada18c354dbaf71b --json {jsonName} -pr {profileName}:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.libcxx=libstdc++11
    compiler.version=5
    os=Linux
    [options]
    aerospike-common:shared=False
    
    ...
    WARN: openssl/3.2.1: requirement zlib/[>=1.2.11 <2] overridden by aerospike-common/cci.20240124 to zlib/1.3.1 
    ERROR: aerospike-common/cci.20240124: Error in validate() method, line 52
    	if str(self.settings_build.compiler) not in self._compiler_arch_flags.keys():
    	AttributeError: 'AerospikeCommonConan' object has no attribute 'settings_build'
    

Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.


Conan v2 pipeline ❌

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping @conan-io/barbarians on the PR and we will help you.

See details:

Failure in build 11 (d33c02efea13819a5f0ca88899d166331c61ba0b):

  • aerospike-common/cci.20240124:
    CI failed to create some packages (All logs)

    Logs for packageID 287e1867581193d04aa56d1cedab910bb1a76f19:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=apple-clang
    compiler.cppstd=17
    compiler.libcxx=libc++
    compiler.version=13
    os=Macos
    [options]
    */*:shared=False
    
    [...]
        target_link_libraries(... aerospike-common::aerospike-common)
    aerospike-common/cci.20240124 (test package): Generator 'CMakeToolchain' calling 'generate()'
    aerospike-common/cci.20240124 (test package): CMakeToolchain generated: conan_toolchain.cmake
    aerospike-common/cci.20240124 (test package): CMakeToolchain generated: CMakePresets.json
    aerospike-common/cci.20240124 (test package): CMakeToolchain generated: ../../../CMakeUserPresets.json
    aerospike-common/cci.20240124 (test package): Generator 'VirtualRunEnv' calling 'generate()'
    aerospike-common/cci.20240124 (test package): Generating aggregated env files
    aerospike-common/cci.20240124 (test package): Generated aggregated env files: ['conanrun.sh', 'conanbuild.sh']
    
    ======== Testing the package: Building ========
    aerospike-common/cci.20240124 (test package): Calling build()
    aerospike-common/cci.20240124 (test package): Running CMake.configure()
    aerospike-common/cci.20240124 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/Users/jenkins/workspace/prod-v2/bsr/cci-e11f47e8/recipes/aerospike-common/all/test_package/build/apple-clang-13-x86_64-17-release/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/Users/jenkins/workspace/prod-v2/bsr/cci-e11f47e8/recipes/aerospike-common/all/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/Users/jenkins/workspace/prod-v2/bsr/cci-e11f47e8/recipes/aerospike-common/all/test_package"
    -- Using Conan toolchain: /Users/jenkins/workspace/prod-v2/bsr/cci-e11f47e8/recipes/aerospike-common/all/test_package/build/apple-clang-13-x86_64-17-release/generators/conan_toolchain.cmake
    -- Conan toolchain: C++ Standard 17 with extensions OFF
    -- The CXX compiler identification is AppleClang 13.0.0.13000029
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /Applications/conan/xcode/13.0/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Conan: Target declared 'aerospike-common::aerospike-common'
    -- Conan: Component target declared 'OpenSSL::Crypto'
    -- Conan: Component target declared 'OpenSSL::SSL'
    -- Conan: Target declared 'openssl::openssl'
    -- Conan: Target declared 'ZLIB::ZLIB'
    -- Conan: Including build module from '/Users/jenkins/workspace/prod-v2/bsr/16365/cabfc/p/opens8f4e480c09f04/p/lib/cmake/conan-official-openssl-variables.cmake'
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /Users/jenkins/workspace/prod-v2/bsr/cci-e11f47e8/recipes/aerospike-common/all/test_package/build/apple-clang-13-x86_64-17-release
    
    aerospike-common/cci.20240124 (test package): Running CMake.build()
    aerospike-common/cci.20240124 (test package): RUN: cmake --build "/Users/jenkins/workspace/prod-v2/bsr/cci-e11f47e8/recipes/aerospike-common/all/test_package/build/apple-clang-13-x86_64-17-release" -- -j8
    [ 50%] Building CXX object CMakeFiles/test_package.dir/main.cpp.o
    [100%] Linking CXX executable test_package
    ld: warning: ignoring file /Users/jenkins/workspace/prod-v2/bsr/16365/cabfc/p/b/aeros8941d63478b93/p/lib/libaerospike-common.a, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
    Undefined symbols for architecture x86_64:
      "_as_aerospike_destroy", referenced from:
          _main in main.cpp.o
      "_as_aerospike_init", referenced from:
          _main in main.cpp.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [test_package] Error 1
    make[1]: *** [CMakeFiles/test_package.dir/all] Error 2
    make: *** [all] Error 2
    
    ERROR: aerospike-common/cci.20240124 (test package): Error in build() method, line 21
    	cmake.build()
    	ConanException: Error 2 while executing
    

Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants