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

Conan v2 support for LibTomMath #16558

Closed
wants to merge 30 commits into from
Closed

Conversation

jowr
Copy link

@jowr jowr commented Mar 14, 2023

Specify library name and version: libtommath/1.2.0-dev

I regularly use this package and I would like to help porting to Conan v2.

I have not touched the old version 1.2.0, but it seems that it is outdated with respect to conan's Python tools. I am not sure what to do about it. Is it possible to completely remove the old release from the recipe?


@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@jowr jowr closed this Mar 14, 2023
@jowr jowr force-pushed the package/libtommath branch from 28de65a to 8e75f72 Compare March 14, 2023 13:52
@jowr jowr reopened this Mar 14, 2023
@conan-center-bot

This comment has been minimized.

@jowr jowr marked this pull request as ready for review March 14, 2023 22:13
@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.

Signed-off-by: Uilian Ries <uilianries@gmail.com>
@conan-center-bot

This comment has been minimized.

Signed-off-by: Uilian Ries <uilianries@gmail.com>
@conan-center-bot

This comment has been minimized.

Signed-off-by: Uilian Ries <uilianries@gmail.com>
@conan-center-bot

This comment has been minimized.

Signed-off-by: Uilian Ries <uilianries@gmail.com>
@conan-center-bot

This comment has been minimized.

@ghost ghost mentioned this pull request Jul 23, 2023
@stale
Copy link

stale bot commented Aug 7, 2023

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 7, 2023
@jacobfriedman
Copy link

bump

@github-actions github-actions bot removed the stale label Feb 15, 2024
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

Signed-off-by: Uilian Ries <uilianries@gmail.com>
@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ❌

Failure in build 2 (40adbd4d9b0830e0035e8a9bd657eba3fff4d066):

  • libtommath/1.2.0:
    All packages built successfully! (All logs)

  • libtommath/1.3.0:
    CI failed to create some packages (All logs)

    Logs for packageID d057732059ea44a47760900cb5e4855d2bea8714:
    [settings]
    arch=x86_64
    build_type=Debug
    compiler=Visual Studio
    compiler.runtime=MDd
    compiler.version=16
    os=Windows
    [options]
    libtommath:shared=False
    
    [...]
    libtommath/1.3.0 (test package): Generator 'VirtualRunEnv' calling 'generate()'
    libtommath/1.3.0 (test package): Generator txt created conanbuildinfo.txt
    libtommath/1.3.0 (test package): Generator 'CMakeToolchain' calling 'generate()'
    libtommath/1.3.0 (test package): Preset 'default' added to CMakePresets.json. Invoke it manually using 'cmake --preset default'
    libtommath/1.3.0 (test package): If your CMake version is not compatible with CMakePresets (<3.19) call cmake like: 'cmake <path> -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE=C:\J\workspace\prod-v1\bsr\cci-340dcbac\recipes\libtommath\cmake\test_package\build\generators\conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW'
    libtommath/1.3.0 (test package): Aggregating env generators
    libtommath/1.3.0 (test package): Generated conaninfo.txt
    libtommath/1.3.0 (test package): Generated graphinfo
    Using lockfile: 'C:\J\workspace\prod-v1\bsr\cci-340dcbac\recipes\libtommath\cmake\test_package\build\generators/conan.lock'
    Using cached profile from lockfile
    [HOOK - conan-center.py] pre_build(): [FPIC MANAGEMENT (KB-H007)] 'fPIC' option not found
    [HOOK - conan-center.py] pre_build(): [FPIC MANAGEMENT (KB-H007)] OK
    libtommath/1.3.0 (test package): Calling build()
    libtommath/1.3.0 (test package): CMake command: cmake -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE="C:/J/workspace/prod-v1/bsr/cci-340dcbac/recipes/libtommath/cmake/test_package/build/generators/conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "C:\J\workspace\prod-v1\bsr\cci-340dcbac\recipes\libtommath\cmake\test_package\."
    
    ----Running------
    > cmake -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE="C:/J/workspace/prod-v1/bsr/cci-340dcbac/recipes/libtommath/cmake/test_package/build/generators/conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "C:\J\workspace\prod-v1\bsr\cci-340dcbac\recipes\libtommath\cmake\test_package\."
    -----------------
    -- Using Conan toolchain: C:/J/workspace/prod-v1/bsr/cci-340dcbac/recipes/libtommath/cmake/test_package/build/generators/conan_toolchain.cmake
    -- The C compiler identification is MSVC 19.29.30148.0
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Conan: Target declared 'libtommath'
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/J/workspace/prod-v1/bsr/cci-340dcbac/recipes/libtommath/cmake/test_package/build
    libtommath/1.3.0 (test package): CMake command: cmake --build "C:\J\workspace\prod-v1\bsr\cci-340dcbac\recipes\libtommath\cmake\test_package\build" --config Debug
    
    ----Running------
    > cmake --build "C:\J\workspace\prod-v1\bsr\cci-340dcbac\recipes\libtommath\cmake\test_package\build" --config Debug
    -----------------
    Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
    Copyright (C) Microsoft Corporation. All rights reserved.
    
      Checking Build System
      Building Custom Rule C:/J/workspace/prod-v1/bsr/cci-340dcbac/recipes/libtommath/cmake/test_package/CMakeLists.txt
      test_package.c
    tommath.lib(bn_s_mp_rand_platform.obj) : error LNK2019: unresolved external symbol s_read_arc4random referenced in function s_mp_rand_platform [C:\J\workspace\prod-v1\bsr\cci-340dcbac\recipes\libtommath\cmake\test_package\build\test_package.vcxproj]
    tommath.lib(bn_s_mp_rand_platform.obj) : error LNK2019: unresolved external symbol s_read_getrandom referenced in function s_mp_rand_platform [C:\J\workspace\prod-v1\bsr\cci-340dcbac\recipes\libtommath\cmake\test_package\build\test_package.vcxproj]
    tommath.lib(bn_s_mp_rand_platform.obj) : error LNK2019: unresolved external symbol s_read_urandom referenced in function s_mp_rand_platform [C:\J\workspace\prod-v1\bsr\cci-340dcbac\recipes\libtommath\cmake\test_package\build\test_package.vcxproj]
    tommath.lib(bn_s_mp_rand_platform.obj) : error LNK2019: unresolved external symbol s_read_ltm_rng referenced in function s_mp_rand_platform [C:\J\workspace\prod-v1\bsr\cci-340dcbac\recipes\libtommath\cmake\test_package\build\test_package.vcxproj]
    C:\J\workspace\prod-v1\bsr\cci-340dcbac\recipes\libtommath\cmake\test_package\build\Debug\test_package.exe : fatal error LNK1120: 4 unresolved externals [C:\J\workspace\prod-v1\bsr\cci-340dcbac\recipes\libtommath\cmake\test_package\build\test_package.vcxproj]
    libtommath/1.3.0 (test package): 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
    libtommath/1.3.0 (test package): 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
    ERROR: libtommath/1.3.0 (test package): Error in build() method, line 21
    	cmake.build()
    	ConanException: Error 1 while executing cmake --build "C:\J\workspace\prod-v1\bsr\cci-340dcbac\recipes\libtommath\cmake\test_package\build" --config Debug
    

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 2 (40adbd4d9b0830e0035e8a9bd657eba3fff4d066):

  • libtommath/1.2.0:
    All packages built successfully! (All logs)

  • libtommath/1.3.0:
    CI failed to create some packages (All logs)

    Logs for packageID ae9eaf478e918e6470fe64a4d8d4d9552b0b3606:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=msvc
    compiler.cppstd=14
    compiler.runtime=dynamic
    compiler.runtime_type=Release
    compiler.version=192
    os=Windows
    [options]
    */*:shared=True
    
    [...]
      bn_mp_sqrmod.c
      bn_mp_sqrt.c
      bn_mp_sqrtmod_prime.c
      bn_mp_sub.c
      bn_mp_sub_d.c
      bn_mp_submod.c
      bn_mp_to_radix.c
      bn_mp_to_sbin.c
      bn_mp_to_ubin.c
      bn_mp_ubin_size.c
      bn_mp_unpack.c
      bn_mp_xor.c
      bn_mp_zero.c
      bn_prime_tab.c
      bn_s_mp_add.c
      bn_s_mp_balance_mul.c
      bn_s_mp_div_3.c
      bn_s_mp_exptmod.c
      bn_s_mp_exptmod_fast.c
      bn_s_mp_get_bit.c
      bn_s_mp_invmod_fast.c
      bn_s_mp_invmod_slow.c
      bn_s_mp_karatsuba_mul.c
      bn_s_mp_karatsuba_sqr.c
      bn_s_mp_log.c
      bn_s_mp_log_2expt.c
      bn_s_mp_log_d.c
      bn_s_mp_montgomery_reduce_fast.c
      bn_s_mp_mul_digs.c
      bn_s_mp_mul_digs_fast.c
      bn_s_mp_mul_high_digs.c
      bn_s_mp_mul_high_digs_fast.c
      bn_s_mp_prime_is_divisible.c
      bn_s_mp_rand_jenkins.c
      bn_s_mp_rand_platform.c
      bn_s_mp_reverse.c
      bn_s_mp_sqr.c
      bn_s_mp_sqr_fast.c
      bn_s_mp_sub.c
      bn_s_mp_toom_mul.c
      bn_s_mp_toom_sqr.c
    tommath.def : error LNK2001: unresolved external symbol mp_set_double [C:\J\workspace\prod-v2\bsr\12098\bbaaa\p\b\libto5c503690d1313\b\build\libtommath.vcxproj]
    C:/J/workspace/prod-v2/bsr/12098/bbaaa/p/b/libto5c503690d1313/b/build/Release/tommath.lib : fatal error LNK1120: 1 unresolved externals [C:\J\workspace\prod-v2\bsr\12098\bbaaa\p\b\libto5c503690d1313\b\build\libtommath.vcxproj]
    
    libtommath/1.3.0: ERROR: 
    Package 'ae9eaf478e918e6470fe64a4d8d4d9552b0b3606' build failed
    libtommath/1.3.0: WARN: Build folder C:\J\workspace\prod-v2\bsr\12098\bbaaa\p\b\libto5c503690d1313\b\build
    ERROR: libtommath/1.3.0: Error in build() method, line 56
    	cmake.build()
    	ConanException: Error 1 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.

Copy link
Contributor

github-actions bot commented Apr 2, 2024

Hooks produced the following warnings for commit 40adbd4
libtommath/1.3.0@#8367db8c4f48075b4cc32054a39d50bd
post_package_info(): WARN: [CMAKE FILE NOT IN BUILD FOLDERS (KB-H019)] The *.cmake files have to be placed in a folder declared as `cpp_info.builddirs`. Currently folders declared: {'C:/J/workspace/prod-v1/bsr/13964/dbbce/.conan/data/libtommath/1.3.0/_/_/package/d057732059ea44a47760900cb5e4855d2bea8714/'}
post_package_info(): WARN: [CMAKE FILE NOT IN BUILD FOLDERS (KB-H019)] Found files: ./lib/cmake/conan-official-libtommath-targets.cmake
post_package_info(): WARN: [CMAKE FILE NOT IN BUILD FOLDERS (KB-H019)] The *.cmake files have to be placed in a folder declared as `cpp_info.builddirs`. Currently folders declared: {'C:/J/workspace/prod-v1/bsr/13964/fcaaf/.conan/data/libtommath/1.3.0/_/_/package/3fb49604f9c2f729b85ba3115852006824e72cab/'}

@uilianries
Copy link
Member

Need to check /Od for MSVC build:

https://github.com/libtom/libtommath/blob/42b3fb07e7d504f61a04c7fca12e996d76a25251/s_mp_rand_platform.c#L121

@valgur
Copy link
Contributor

valgur commented Apr 9, 2024

@uilianries There's a working PR at #18852.

@uilianries
Copy link
Member

@valgur I didn't saw that. Thank you!

Copy link
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label May 10, 2024
Copy link
Contributor

github-actions bot commented Jun 9, 2024

This pull request has been automatically closed because it has not had recent activity. Thank you for your contributions.

@github-actions github-actions bot closed this Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants