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

jemalloc: Revise the recipe to support Conan v2 #17722

Closed
wants to merge 25 commits into from

Conversation

0xFireWolf
Copy link
Contributor

Specify library name and version: jemalloc/5.2.1, 5.3.0

This PR contains the following changes:

  • Revise the recipe to make it compatible with both Conan v1 and v2.
  • Build the library with MSYS2 and MSVC on Windows instead of using the MSVC solution files.
  • Add support for Apple Silicon Mac (v5.3.0 or later)

Known Issues:
When testing the recipe with the option shared=True on Windows, Conan reports an error that the library jemalloc cannot be found in the package, even though the dynamic library has been built successfully and can be found in the package folder. This error occurs on Windows only; The dynamic library can be found and linked properly on macOS and Ubuntu. Need some help here.

Error Messages
======== Testing the package ========
Removing previously existing 'test_package' build folder: C:\Users\FireWolf\Desktop\conan-center-index\recipes\jemalloc\all\test_package\build\msvc-193-x86_64-17-release
jemalloc/5.3.0 (test package): Test package build: build\msvc-193-x86_64-17-release
jemalloc/5.3.0 (test package): Test package build folder: C:\Users\FireWolf\Desktop\conan-center-index\recipes\jemalloc\all\test_package\build\msvc-193-x86_64-17-release
jemalloc/5.3.0 (test package): Writing generators to C:\Users\FireWolf\Desktop\conan-center-index\recipes\jemalloc\all\test_package\build\msvc-193-x86_64-17-release\generators
jemalloc/5.3.0 (test package): Generator 'CMakeToolchain' calling 'generate()'
jemalloc/5.3.0 (test package): CMakeToolchain generated: conan_toolchain.cmake
jemalloc/5.3.0 (test package): CMakeToolchain generated: CMakePresets.json
jemalloc/5.3.0 (test package): CMakeToolchain generated: ..\..\..\CMakeUserPresets.json
jemalloc/5.3.0 (test package): Generator 'CMakeDeps' calling 'generate()'
jemalloc/5.3.0 (test package): Generator 'VirtualRunEnv' calling 'generate()'
jemalloc/5.3.0 (test package): Generating aggregated env files
jemalloc/5.3.0 (test package): Generated aggregated env files: ['conanrun.bat', 'conanbuild.bat']

======== Testing the package: Building ========
jemalloc/5.3.0 (test package): Calling build()
jemalloc/5.3.0 (test package): Running CMake.configure()
jemalloc/5.3.0 (test package): RUN: cmake -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE="C:/Users/FireWolf/Desktop/conan-center-index/recipes/jemalloc/all/test_package/build/msvc-193-x86_64-17-release/generators/conan_to
olchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/Users/FireWolf/Desktop/conan-center-index/recipes/jemalloc/all/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "C:\Users\FireWolf\Desktop\conan-center-index\recipes\jemalloc\all\test_package\."
-- Using Conan toolchain: C:/Users/FireWolf/Desktop/conan-center-index/recipes/jemalloc/all/test_package/build/msvc-193-x86_64-17-release/generators/conan_toolchain.cmake
-- Conan toolchain: C++ Standard 17 with extensions OFF
-- The C compiler identification is MSVC 19.36.32532.0
-- The CXX compiler identification is MSVC 19.36.32532.0
-- Detecting C compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Conan: Target declared 'jemalloc::jemalloc'
CMake Error at build/msvc-193-x86_64-17-release/generators/cmakedeps_macros.cmake:64 (message):
  Library 'jemalloc' not found in package.  If 'jemalloc' is a system
  library, declare it with 'cpp_info.system_libs' property
Call Stack (most recent call first):
  build/msvc-193-x86_64-17-release/generators/jemalloc-Target-release.cmake:24 (conan_package_library_targets)
  build/msvc-193-x86_64-17-release/generators/jemallocTargets.cmake:26 (include)
  build/msvc-193-x86_64-17-release/generators/jemalloc-config.cmake:16 (include)
  CMakeLists.txt:4 (find_package)


-- Configuring incomplete, errors occurred!

*********************************************************
Recipe 'jemalloc/5.3.0 (test package)' cannot build its binary
It is possible that this recipe is not Conan 2.0 ready
If the recipe comes from ConanCenter check: https://conan.io/cci-v2.html
If it is your recipe, check if it is updated to 2.0
*********************************************************

…nd use it to initialize `self.cpp_info.libs`.
@github-actions
Copy link
Contributor

🤖 Beep Boop! This pull request is making changes to 'recipes/jemalloc//'.

👋 @Hopobcn you might be interested. 😉

@ghost
Copy link

ghost commented May 27, 2023

I detected other pull requests that are modifying jemalloc/all recipe:

This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there.

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

@jabbas
Copy link
Contributor

jabbas commented Jul 13, 2023

@0xFireWolf Hey, are you still working on that?

@conan-center-bot

This comment has been minimized.

1 similar comment
@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ❌

Failure in build 3 (e0aa5ec5cb9fc5221b316d49732b06e6a2a83de2):

  • jemalloc/5.2.1:
    CI failed to create some packages (All logs)

    Logs for packageID 3351525b86ae76e433445f442868ab9f6d6392b7:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=Visual Studio
    compiler.runtime=MD
    compiler.version=16
    os=Windows
    [options]
    jemalloc:shared=True
    
    [...]
    overriding '/MT' with '/MD'
    cl : Command line warning D9025 : overriding '/MT' with '/MD'
    cl : Command line warning D9025 : overriding '/MT' with '/MD'
    cl : Command line warning D9025 : overriding '/MT' with '/MD'
    cl : Command line warning D9025 : overriding '/MT' with '/MD'
    cl : Command line warning D9025 : overriding '/MT' with '/MD'
    cl : Command line warning D9025 : overriding '/MT' with '/MD'
    cl : Command line warning D9025 : overriding '/MT' with '/MD'
    cl : Command line warning D9025 : overriding '/MT' with '/MD'
    cl : Command line warning D9025 : overriding '/MT' with '/MD'
    cl : Command line warning D9025 : overriding '/MT' with '/MD'
    cl : Command line warning D9025 : overriding '/MT' with '/MD'
    cl : Command line warning D9025 : overriding '/MT' with '/MD'
    make: Circular src/jemalloc.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/arena.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/background_thread.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/base.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/bin.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/bitmap.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/ckh.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/ctl.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/div.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/extent.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/extent_dss.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/extent_mmap.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/hash.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/hook.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/large.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/log.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/malloc_io.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/mutex.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/mutex_pool.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/nstime.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/pages.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/prng.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/prof.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/rtree.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/safety_check.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/stats.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/sc.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/sz.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/tcache.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/test_hooks.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/ticker.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/tsd.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    make: Circular src/witness.sym.obj <- include/jemalloc/internal/private_namespace.gen.h dependency dropped.
    jemalloc/5.2.1: 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
    [HOOK - conan-center.py] post_package_info(): ERROR: [LIBRARY DOES NOT EXIST (KB-H054)] Component jemalloc::jemalloc library 'jemalloc' is listed in the recipe, but not found installed at self.cpp_info.libdirs. Make sure you compiled the library correctly. If so, then the library name should probably be fixed. Otherwise, then the component should be removed. (https://github.com/conan-io/conan-center-index/blob/master/docs/error_knowledge_base.md#KB-H054-LIBRARY-DOES-NOT-EXIST) 
    ERROR: 
    	ConanException: [HOOK - conan-center.py] post_package_info(): Some checks failed running the hook, check the output
    
  • jemalloc/5.3.0:
    Didn't run or was cancelled before finishing


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 may be required once they are on the v2 ready list

The v2 pipeline failed. Please, review the errors and note this will be required for pull requests to be merged in the near future.

See details:

Sorry, the system is under maintenance and it doesn't accept builds right now.
Please, check https://status.conan.io to obtain more information.
Thanks for your understanding and help with the Conan Center Index!

@AbrilRBS AbrilRBS self-assigned this Sep 8, 2023
@stale
Copy link

stale bot commented Oct 15, 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.

@AbrilRBS
Copy link
Member

Finally ported, closing this one, thanks a lot for your initial contribution! :)

@AbrilRBS AbrilRBS closed this Jan 15, 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.

5 participants