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

New package: libq #22828

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

New package: libq #22828

wants to merge 9 commits into from

Conversation

metalMajor
Copy link
Contributor

@metalMajor metalMajor commented Feb 20, 2024

Specify library name and version: libq/20180504

I am not the creator of the library, but I am using this library for a while now, mostly in combination with libcurl to interact with a backend webserver, and wanted to hopefully promote some interest in the library by providing this package. The original author does not update it anymore it seems, but it's quite stable. Because the author never really officially released a 1.0, but mentions that the api would not change anymore before 1.0, I have used the date of the commit from which I created this package instead of 1.0.


@CLAassistant
Copy link

CLAassistant commented Feb 20, 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.

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.

Hi! Thanks a lot for taking the time to contribute the recipe, we really appreciate it!

I've left some comments on the minor changes, but I'd suggest looking into the CMake package template https://github.com/conan-io/conan-center-index/tree/master/docs/package_templates/cmake_package - basing the recipe off of this should be straightforward and will take care of some the pitfalls I've mentioned and most which I didn't :)

Let me know if you need any help with that

recipes/libq/all/conandata.yml Outdated Show resolved Hide resolved
recipes/libq/all/conanfile.py Outdated Show resolved Hide resolved
class libqConan(ConanFile):
name = "libq"
description = "A platform-independent promise library for C++, implementing asynchronous continuations."
license = "Apache license 2.0"
Copy link
Member

Choose a reason for hiding this comment

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

This should be a spdx identifier listed https://spdx.org/licenses/

Suggested change
license = "Apache license 2.0"
license = "Apache-2.0"

recipes/libq/all/conanfile.py Show resolved Hide resolved
recipes/libq/all/conanfile.py Outdated Show resolved Hide resolved
recipes/libq/all/conanfile.py Outdated Show resolved Hide resolved
@AbrilRBS AbrilRBS self-assigned this Feb 23, 2024
@conan-center-bot

This comment has been minimized.

@metalMajor
Copy link
Contributor Author

Hi! Thanks a lot for taking the time to contribute the recipe, we really appreciate it!

I've left some comments on the minor changes, but I'd suggest looking into the CMake package template https://github.com/conan-io/conan-center-index/tree/master/docs/package_templates/cmake_package - basing the recipe off of this should be straightforward and will take care of some the pitfalls I've mentioned and most which I didn't :)

Let me know if you need any help with that

Hello, I think I managed to update it based on the template. Thank for the review!

@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 2 (991b70e95218ecdc3ca15fc5a06132e61a5c666c):

  • libq/cci.20180504:
    CI failed to create some packages (All logs)

    Logs for packageID 66c5327ebdcecae0a01a863939964495fa019a06:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.libcxx=libstdc++11
    compiler.version=7
    os=Linux
    [options]
    libq:shared=False
    
    [...]
    -- Installing: /home/conan/workspace/prod-v1/bsr/37771/ccaae/.conan/data/libq/cci.20180504/_/_/package/66c5327ebdcecae0a01a863939964495fa019a06/include/q/promise/defer.hpp
    -- Installing: /home/conan/workspace/prod-v1/bsr/37771/ccaae/.conan/data/libq/cci.20180504/_/_/package/66c5327ebdcecae0a01a863939964495fa019a06/include/q/promise/state.hpp
    -- Installing: /home/conan/workspace/prod-v1/bsr/37771/ccaae/.conan/data/libq/cci.20180504/_/_/package/66c5327ebdcecae0a01a863939964495fa019a06/include/q/promise/signal.hpp
    -- Installing: /home/conan/workspace/prod-v1/bsr/37771/ccaae/.conan/data/libq/cci.20180504/_/_/package/66c5327ebdcecae0a01a863939964495fa019a06/include/q/promise/make.hpp
    -- Installing: /home/conan/workspace/prod-v1/bsr/37771/ccaae/.conan/data/libq/cci.20180504/_/_/package/66c5327ebdcecae0a01a863939964495fa019a06/include/q/blocking_dispatcher.hpp
    -- Installing: /home/conan/workspace/prod-v1/bsr/37771/ccaae/.conan/data/libq/cci.20180504/_/_/package/66c5327ebdcecae0a01a863939964495fa019a06/include/q/execution_context.hpp
    -- Installing: /home/conan/workspace/prod-v1/bsr/37771/ccaae/.conan/data/libq/cci.20180504/_/_/package/66c5327ebdcecae0a01a863939964495fa019a06/include/q/static_atomic.hpp
    -- Installing: /home/conan/workspace/prod-v1/bsr/37771/ccaae/.conan/data/libq/cci.20180504/_/_/package/66c5327ebdcecae0a01a863939964495fa019a06/include/q/exception
    -- Installing: /home/conan/workspace/prod-v1/bsr/37771/ccaae/.conan/data/libq/cci.20180504/_/_/package/66c5327ebdcecae0a01a863939964495fa019a06/include/q/exception/exception_errno.hpp
    -- Installing: /home/conan/workspace/prod-v1/bsr/37771/ccaae/.conan/data/libq/cci.20180504/_/_/package/66c5327ebdcecae0a01a863939964495fa019a06/include/q/exception/exception.hpp
    -- Installing: /home/conan/workspace/prod-v1/bsr/37771/ccaae/.conan/data/libq/cci.20180504/_/_/package/66c5327ebdcecae0a01a863939964495fa019a06/include/q/pp.hpp
    -- Installing: /home/conan/workspace/prod-v1/bsr/37771/ccaae/.conan/data/libq/cci.20180504/_/_/package/66c5327ebdcecae0a01a863939964495fa019a06/include/q/channel.hpp
    -- Installing: /home/conan/workspace/prod-v1/bsr/37771/ccaae/.conan/data/libq/cci.20180504/_/_/package/66c5327ebdcecae0a01a863939964495fa019a06/include/q/scheduler.hpp
    -- Installing: /home/conan/workspace/prod-v1/bsr/37771/ccaae/.conan/data/libq/cci.20180504/_/_/package/66c5327ebdcecae0a01a863939964495fa019a06/include/q/abi.hpp
    -- Installing: /home/conan/workspace/prod-v1/bsr/37771/ccaae/.conan/data/libq/cci.20180504/_/_/package/66c5327ebdcecae0a01a863939964495fa019a06/include/q/concurrency.hpp
    -- Installing: /home/conan/workspace/prod-v1/bsr/37771/ccaae/.conan/data/libq/cci.20180504/_/_/package/66c5327ebdcecae0a01a863939964495fa019a06/include/q/async_termination.hpp
    -- Installing: /home/conan/workspace/prod-v1/bsr/37771/ccaae/.conan/data/libq/cci.20180504/_/_/package/66c5327ebdcecae0a01a863939964495fa019a06/include/q/endian.hpp
    -- Installing: /home/conan/workspace/prod-v1/bsr/37771/ccaae/.conan/data/libq/cci.20180504/_/_/package/66c5327ebdcecae0a01a863939964495fa019a06/include/q/event_dispatcher.hpp
    -- Installing: /home/conan/workspace/prod-v1/bsr/37771/ccaae/.conan/data/libq/cci.20180504/_/_/package/66c5327ebdcecae0a01a863939964495fa019a06/include/q/options.hpp
    -- Installing: /home/conan/workspace/prod-v1/bsr/37771/ccaae/.conan/data/libq/cci.20180504/_/_/package/66c5327ebdcecae0a01a863939964495fa019a06/include/q/types.hpp
    -- Installing: /home/conan/workspace/prod-v1/bsr/37771/ccaae/.conan/data/libq/cci.20180504/_/_/package/66c5327ebdcecae0a01a863939964495fa019a06/lib/libq.a
    -- Installing: /home/conan/workspace/prod-v1/bsr/37771/ccaae/.conan/data/libq/cci.20180504/_/_/package/66c5327ebdcecae0a01a863939964495fa019a06/share/q/cmake/QConfig.cmake
    -- Installing: /home/conan/workspace/prod-v1/bsr/37771/ccaae/.conan/data/libq/cci.20180504/_/_/package/66c5327ebdcecae0a01a863939964495fa019a06/share/q/cmake/QConfig-release.cmake
    [HOOK - conan-center.py] post_package(): [PACKAGE LICENSE (KB-H012)] OK
    [HOOK - conan-center.py] post_package(): [DEFAULT PACKAGE LAYOUT (KB-H013)] OK
    [HOOK - conan-center.py] post_package(): [MATCHING CONFIGURATION (KB-H014)] OK
    [HOOK - conan-center.py] post_package(): [SHARED ARTIFACTS (KB-H015)] OK
    [HOOK - conan-center.py] post_package(): [STATIC ARTIFACTS (KB-H074)] OK
    [HOOK - conan-center.py] post_package(): [EITHER STATIC OR SHARED OF EACH LIB (KB-H076)] OK
    [HOOK - conan-center.py] post_package(): [PC-FILES (KB-H020)] OK
    [HOOK - conan-center.py] post_package(): [CMAKE-MODULES-CONFIG-FILES (KB-H016)] OK
    [HOOK - conan-center.py] post_package(): [PDB FILES NOT ALLOWED (KB-H017)] OK
    [HOOK - conan-center.py] post_package(): [LIBTOOL FILES PRESENCE (KB-H018)] OK
    [HOOK - conan-center.py] post_package(): [MS RUNTIME FILES (KB-H021)] OK
    [HOOK - conan-center.py] post_package(): [SHORT_PATHS USAGE (KB-H066)] OK
    [HOOK - conan-center.py] post_package(): [MISSING SYSTEM LIBS (KB-H043)] OK
    [HOOK - conan-center.py] post_package(): [APPLE RELOCATABLE SHARED LIBS (KB-H077)] OK
    libq/cci.20180504 package(): Packaged 67 '.hpp' files
    libq/cci.20180504 package(): Packaged 1 '.a' file: libq.a
    libq/cci.20180504 package(): Packaged 1 '.txt' file: LICENSE.txt
    libq/cci.20180504: Package '66c5327ebdcecae0a01a863939964495fa019a06' created
    libq/cci.20180504: Created package revision c38401da91228596f4f7f5c5ed6dcacc
    [HOOK - conan-center.py] post_package_info(): [CMAKE FILE NOT IN BUILD FOLDERS (KB-H019)] OK
    [HOOK - conan-center.py] post_package_info(): [INCLUDE PATH DOES NOT EXIST (KB-H071)] OK
    WARN: *** Conan 1 is legacy and on a deprecation path ***
    WARN: *** Please upgrade to Conan 2 ***
    libq/cci.20180504: 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 libq::libq library 'libq' 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
    

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 (991b70e95218ecdc3ca15fc5a06132e61a5c666c):

  • libq/cci.20180504:
    CI failed to create some packages (All logs)

    Logs for packageID 13be611585c95453f1cbbd053cea04b3e64470ca:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.cppstd=17
    compiler.libcxx=libstdc++11
    compiler.version=11
    os=Linux
    [options]
    */*:shared=False
    
    [...]
    ======== Installing packages ========
    libq/cci.20180504: Already installed! (1 of 1)
    
    ======== Testing the package ========
    Removing previously existing 'test_package' build folder: /home/conan/workspace/prod-v2/bsr/cci-80e61d16/recipes/libq/all/test_package/build/gcc-11-x86_64-17-release
    libq/cci.20180504 (test package): Test package build: build/gcc-11-x86_64-17-release
    libq/cci.20180504 (test package): Test package build folder: /home/conan/workspace/prod-v2/bsr/cci-80e61d16/recipes/libq/all/test_package/build/gcc-11-x86_64-17-release
    libq/cci.20180504 (test package): Writing generators to /home/conan/workspace/prod-v2/bsr/cci-80e61d16/recipes/libq/all/test_package/build/gcc-11-x86_64-17-release/generators
    libq/cci.20180504 (test package): Generator 'CMakeDeps' calling 'generate()'
    libq/cci.20180504 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt
        find_package(libq)
        target_link_libraries(... libq::libq)
    libq/cci.20180504 (test package): Generator 'CMakeToolchain' calling 'generate()'
    libq/cci.20180504 (test package): CMakeToolchain generated: conan_toolchain.cmake
    libq/cci.20180504 (test package): CMakeToolchain generated: CMakePresets.json
    libq/cci.20180504 (test package): CMakeToolchain generated: ../../../CMakeUserPresets.json
    libq/cci.20180504 (test package): Generator 'VirtualRunEnv' calling 'generate()'
    libq/cci.20180504 (test package): Generating aggregated env files
    libq/cci.20180504 (test package): Generated aggregated env files: ['conanrun.sh', 'conanbuild.sh']
    
    ======== Testing the package: Building ========
    libq/cci.20180504 (test package): Calling build()
    libq/cci.20180504 (test package): Running CMake.configure()
    libq/cci.20180504 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/home/conan/workspace/prod-v2/bsr/cci-80e61d16/recipes/libq/all/test_package/build/gcc-11-x86_64-17-release/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/home/conan/workspace/prod-v2/bsr/cci-80e61d16/recipes/libq/all/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/home/conan/workspace/prod-v2/bsr/cci-80e61d16/recipes/libq/all/test_package"
    -- Using Conan toolchain: /home/conan/workspace/prod-v2/bsr/cci-80e61d16/recipes/libq/all/test_package/build/gcc-11-x86_64-17-release/generators/conan_toolchain.cmake
    -- Conan toolchain: C++ Standard 17 with extensions OFF
    -- The CXX compiler identification is GNU 11.4.0
    -- Check for working CXX compiler: /usr/local/bin/c++
    -- Check for working CXX compiler: /usr/local/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Conan: Target declared 'libq::libq'
    CMake Error at build/gcc-11-x86_64-17-release/generators/cmakedeps_macros.cmake:67 (message):
      Library 'libq' not found in package.  If 'libq' is a system library,
      declare it with 'cpp_info.system_libs' property
    Call Stack (most recent call first):
      build/gcc-11-x86_64-17-release/generators/libq-Target-release.cmake:23 (conan_package_library_targets)
      build/gcc-11-x86_64-17-release/generators/libqTargets.cmake:24 (include)
      build/gcc-11-x86_64-17-release/generators/libq-config.cmake:16 (include)
      CMakeLists.txt:5 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    See also "/home/conan/workspace/prod-v2/bsr/cci-80e61d16/recipes/libq/all/test_package/build/gcc-11-x86_64-17-release/CMakeFiles/CMakeOutput.log".
    
    ERROR: libq/cci.20180504 (test package): Error in build() method, line 21
    	cmake.configure()
    	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.

@AbrilRBS AbrilRBS requested a review from uilianries May 4, 2024 23:28
@metalMajor
Copy link
Contributor Author

I don't get why it says libq not found in package in the test package.

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.

4 participants