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

mysqlcpp: add recipe #24678

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

mysqlcpp: add recipe #24678

wants to merge 122 commits into from

Conversation

husitawi
Copy link

@husitawi husitawi commented Jul 21, 2024

Summary

Add new recipe: mysqlcpp/9.0.0

Motivation

No C++ MySQL connector recipe available.

Details

No changes. New recipe with test package.

closes samuaz#2
closes #16312
closes #374
closes #17594


@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.

@husitawi husitawi marked this pull request as ready for review July 26, 2024 06:13
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@CLAassistant
Copy link

CLAassistant commented Jul 26, 2024

CLA assistant check
All committers have signed the CLA.

@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.

---------

Co-authored-by: PerseoGI <perseog@jfrog.com>
@husitawi
Copy link
Author

husitawi commented Sep 6, 2024

Hi @AbrilRBS can you please explain some of the changes being done?

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@perseoGI
Copy link
Contributor

perseoGI commented Sep 6, 2024

Hi @husitawi !
Here is the explanation:

  • Remove the fixed version on the recipe as in CCI we delegate versioning to the CI which will look in the conandata.yml file to generate all possibilities.
  • If there is not specific and clear reason to use a very old openssl version, prefer use version range: https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/dependencies.md
  • Use packaged dependencies instead of relaying on third party libs in upstream
  • Avoid relaying on ninja, let consumers decide which generator to use. Also, we do not understand which criteria were chosen to use ninja in every os but windows
  • In the generate method, use packaged versions instead of compiling upstream third party dependencies

Take a look at this template https://github.com/conan-io/conan-center-index/blob/master/docs/package_templates/cmake_package/all/conanfile.py, that may help you with some ordering and other commented stuff!

@husitawi
Copy link
Author

husitawi commented Sep 6, 2024

Hi @husitawi ! Here is the explanation:

  • Remove the fixed version on the recipe as in CCI we delegate versioning to the CI which will look in the conandata.yml file to generate all possibilities.

This will require more patching done on the package, it already includes weird mechanisms to find compression libraries and protobuf.

Newer versions kept creating duplicate symbols for some reason, reverting back into an older version fixed it.

  • Use packaged dependencies instead of relaying on third party libs in upstream
  • Avoid relaying on ninja, let consumers decide which generator to use. Also, we do not understand which criteria were chosen to use ninja in every os but windows

Ninja was memory efficient on Linux subsystems in Winodws, otherwise the build broke and ran out of memory.

  • In the generate method, use packaged versions instead of compiling upstream third party dependencies

Again, needs more patches on the package itself, won't work on its own

Take a look at this template https://github.com/conan-io/conan-center-index/blob/master/docs/package_templates/cmake_package/all/conanfile.py, that may help you with some ordering and other commented stuff!

I appreciate the help, but please suggest the changes instead of committing them directly, it only makes it harder to understand the edits and make them work.

@conan-center-bot

This comment has been minimized.

@valgur valgur mentioned this pull request Sep 6, 2024
3 tasks
@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.

@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ❌

Failure in build 123 (0b2ee155b2cef90e8bc1c5e54d4936c591911328):

  • mysql-connector-cpp/9.0.0:
    CI failed to create some packages (All logs)

    Logs for packageID f47b14d9bc6110f83e6e268a34c1413b3c1c0987:
    [settings]
    arch=x86_64
    build_type=Debug
    compiler=gcc
    compiler.libcxx=libstdc++11
    compiler.version=11
    os=Linux
    [options]
    mysql-connector-cpp:shared=False
    
    [...]
    Preparing to merge STATIC library: connector (xapi;devapi)
    Connector library name: mysqlcppconnx-static
    Building version 9.0.0
    Generating INFO_SRC
    Generating INFO_BIN
    Install location: /home/conan/workspace/prod-v1/bsr/93988/cfccc/.conan/data/mysql-connector-cpp/9.0.0/_/_/package/f47b14d9bc6110f83e6e268a34c1413b3c1c0987
    Connector libraries will be installed at: lib64
    
    Project configuration options:
    
    : BUILD_STATIC: ON
    Build static version of connector library
    
    : WITH_PROTOBUF: /home/conan/workspace/prod-v1/bsr/93988/cfccc/.conan/data/protobuf/3.21.12/_/_/package/d0dc15bd1c53d3bfb809f9d49d6162baddf534f4
    Enable, disable or point to PROTOBUF installation.
    
    : WITH_ZLIB: /home/conan/workspace/prod-v1/bsr/93988/cfccc/.conan/data/zlib/1.3.1/_/_/package/be27726f9885116da1158027505be62e913cd585
    Enable, disable or point to ZLIB installation.
    
    : WITH_LZ4: /home/conan/workspace/prod-v1/bsr/93988/cfccc/.conan/data/lz4/1.10.0/_/_/package/be27726f9885116da1158027505be62e913cd585
    Enable, disable or point to LZ4 installation.
    
    : WITH_ZSTD: /home/conan/workspace/prod-v1/bsr/93988/cfccc/.conan/data/zstd/1.5.6/_/_/package/2177ebad8f53eadc62cd13ac2535f24587cb3ca5
    Enable, disable or point to ZSTD installation.
    
    : WITH_JDBC: OFF
    Whether to build a variant of connector library which implements legacy JDBC API
    
    CMake Warning:
      Manually-specified variables were not used by the project:
    
        BOOST_DIR
        CMAKE_TOOLCHAIN_FILE
    
    
    make[2]: *** No rule to make target 'library-NOTFOUND', needed by 'libconnector-deps.so'.  Stop.
    make[2]: *** Waiting for unfinished jobs....
    make[1]: *** [CMakeFiles/connector-deps.dir/all] Error 2
    make: *** [all] Error 2
    WARN: *** Conan 1 is legacy and on a deprecation path ***
    WARN: *** Please upgrade to Conan 2 ***
    WARN: openssl/3.3.1: requirement zlib/[>=1.2.11 <2] overridden by mysql-connector-cpp/9.0.0 to zlib/1.3.1 
    WARN: protobuf/3.21.12: requirement zlib/[>=1.2.11 <2] overridden by mysql-connector-cpp/9.0.0 to zlib/1.3.1 
    mysql-connector-cpp/9.0.0: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
    mysql-connector-cpp/9.0.0: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
    mysql-connector-cpp/9.0.0: ERROR: Package 'f47b14d9bc6110f83e6e268a34c1413b3c1c0987' build failed
    mysql-connector-cpp/9.0.0: WARN: Build folder /home/conan/workspace/prod-v1/bsr/93988/cfccc/.conan/data/mysql-connector-cpp/9.0.0/_/_/build/f47b14d9bc6110f83e6e268a34c1413b3c1c0987/build/Debug
    ERROR: mysql-connector-cpp/9.0.0: Error in build() method, line 190
    	cmake.build()
    	ConanException: Error 2 while executing cmake --build "/home/conan/workspace/prod-v1/bsr/93988/cfccc/.conan/data/mysql-connector-cpp/9.0.0/_/_/build/f47b14d9bc6110f83e6e268a34c1413b3c1c0987/build/Debug" '--' '-j3'
    

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.

Failure in build 123 (0b2ee155b2cef90e8bc1c5e54d4936c591911328):

  • mysql-connector-cpp/9.0.0:
    CI failed to create some packages (All logs)

    Logs for packageID 3acb189eb808929f3ad751e72be2d5704d2e9508:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=apple-clang
    compiler.cppstd=17
    compiler.libcxx=libc++
    compiler.version=13
    os=Macos
    [options]
    */*:shared=False
    
    [...]
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/b/mysqlb813507ee03ac/p/lib/libmysqlcppconnx-static.a(libcrypto-lib-eng_lib.o)
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/opensd6b8f43d10789/p/lib/libcrypto.a(libcrypto-lib-eng_lib.o)
    duplicate symbol '_ENGINE_get_ex_data' in:
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/b/mysqlb813507ee03ac/p/lib/libmysqlcppconnx-static.a(libcrypto-lib-eng_lib.o)
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/opensd6b8f43d10789/p/lib/libcrypto.a(libcrypto-lib-eng_lib.o)
    duplicate symbol '_do_engine_lock_init_ossl_ret_' in:
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/b/mysqlb813507ee03ac/p/lib/libmysqlcppconnx-static.a(libcrypto-lib-eng_lib.o)
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/opensd6b8f43d10789/p/lib/libcrypto.a(libcrypto-lib-eng_lib.o)
    duplicate symbol '_do_engine_lock_init_ossl_' in:
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/b/mysqlb813507ee03ac/p/lib/libmysqlcppconnx-static.a(libcrypto-lib-eng_lib.o)
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/opensd6b8f43d10789/p/lib/libcrypto.a(libcrypto-lib-eng_lib.o)
    duplicate symbol '_OPENSSL_wipe_cpu' in:
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/b/mysqlb813507ee03ac/p/lib/libmysqlcppconnx-static.a(libcrypto-lib-x86_64cpuid.o)
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/opensd6b8f43d10789/p/lib/libcrypto.a(libcrypto-lib-x86_64cpuid.o)
    duplicate symbol '_OPENSSL_instrument_bus' in:
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/b/mysqlb813507ee03ac/p/lib/libmysqlcppconnx-static.a(libcrypto-lib-x86_64cpuid.o)
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/opensd6b8f43d10789/p/lib/libcrypto.a(libcrypto-lib-x86_64cpuid.o)
    duplicate symbol '_OPENSSL_ia32_rdrand_bytes' in:
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/b/mysqlb813507ee03ac/p/lib/libmysqlcppconnx-static.a(libcrypto-lib-x86_64cpuid.o)
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/opensd6b8f43d10789/p/lib/libcrypto.a(libcrypto-lib-x86_64cpuid.o)
    duplicate symbol '_OPENSSL_ia32_rdseed_bytes' in:
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/b/mysqlb813507ee03ac/p/lib/libmysqlcppconnx-static.a(libcrypto-lib-x86_64cpuid.o)
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/opensd6b8f43d10789/p/lib/libcrypto.a(libcrypto-lib-x86_64cpuid.o)
    duplicate symbol '_CRYPTO_memcmp' in:
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/b/mysqlb813507ee03ac/p/lib/libmysqlcppconnx-static.a(libcrypto-lib-x86_64cpuid.o)
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/opensd6b8f43d10789/p/lib/libcrypto.a(libcrypto-lib-x86_64cpuid.o)
    duplicate symbol '_OPENSSL_cleanse' in:
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/b/mysqlb813507ee03ac/p/lib/libmysqlcppconnx-static.a(libcrypto-lib-x86_64cpuid.o)
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/opensd6b8f43d10789/p/lib/libcrypto.a(libcrypto-lib-x86_64cpuid.o)
    duplicate symbol '_OPENSSL_ia32_cpuid' in:
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/b/mysqlb813507ee03ac/p/lib/libmysqlcppconnx-static.a(libcrypto-lib-x86_64cpuid.o)
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/opensd6b8f43d10789/p/lib/libcrypto.a(libcrypto-lib-x86_64cpuid.o)
    duplicate symbol '_OPENSSL_atomic_add' in:
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/b/mysqlb813507ee03ac/p/lib/libmysqlcppconnx-static.a(libcrypto-lib-x86_64cpuid.o)
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/opensd6b8f43d10789/p/lib/libcrypto.a(libcrypto-lib-x86_64cpuid.o)
    duplicate symbol '_OPENSSL_rdtsc' in:
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/b/mysqlb813507ee03ac/p/lib/libmysqlcppconnx-static.a(libcrypto-lib-x86_64cpuid.o)
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/opensd6b8f43d10789/p/lib/libcrypto.a(libcrypto-lib-x86_64cpuid.o)
    duplicate symbol '_OPENSSL_instrument_bus2' in:
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/b/mysqlb813507ee03ac/p/lib/libmysqlcppconnx-static.a(libcrypto-lib-x86_64cpuid.o)
        /Users/jenkins/workspace/prod-v2/bsr/84222/adcfe/p/opensd6b8f43d10789/p/lib/libcrypto.a(libcrypto-lib-x86_64cpuid.o)
    ld: 95 duplicate symbols for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [PackageTest] Error 1
    make[1]: *** [CMakeFiles/PackageTest.dir/all] Error 2
    make: *** [all] Error 2
    
    ERROR: mysql-connector-cpp/9.0.0 (test package): Error in build() method, line 18
    	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.

@valgur
Copy link
Contributor

valgur commented Sep 9, 2024

@husitawi I looked into the recipe for the project and found the two culprits for most of the issues you are encountering. See #25170.

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.

[request] mysql_connector_cpp/8.0.32 [request] mysql-connector-cpp/8.0
6 participants