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

urdfdom: fix CMake target name, unbundle urdfdom_headers #22928

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

valgur
Copy link
Contributor

@valgur valgur commented Feb 28, 2024

The main target exported by the project is actually urdfdom::urdf_parser, not urdfdom::urdfdom. Fixed that, but kept the existing target for backwards compatibility.

Also unbundled urdfdom_headers (requires #22927), dropped transitive_headers from tinyxml2 and added an optional project name prefix to the include dirs to match the default APPEND_PROJECT_NAME_TO_INCLUDEDIR=TRUE option.

@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 3 (6f85c136efcd4ee5d8336a7a6d0ff96885d069b1):

  • urdfdom/4.0.0:
    CI failed to create some packages (All logs)

    Logs for packageID c8fdfa55eb04a2ccce9805bed9485b751bed7d46:
    [settings]
    arch=x86_64
    build_type=Debug
    compiler=Visual Studio
    compiler.runtime=MDd
    compiler.version=16
    os=Windows
    [options]
    urdfdom:shared=False
    
    [...]
    [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
    urdfdom/4.0.0 (test package): Calling build()
    urdfdom/4.0.0 (test package): CMake command: cmake -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE="C:/J2/w/prod-v1/bsr/cci-40b9007a/recipes/urdfdom/all/test_package/build/generators/conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "C:\J2\w\prod-v1\bsr\cci-40b9007a\recipes\urdfdom\all\test_package\."
    
    ----Running------
    > cmake -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE="C:/J2/w/prod-v1/bsr/cci-40b9007a/recipes/urdfdom/all/test_package/build/generators/conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "C:\J2\w\prod-v1\bsr\cci-40b9007a\recipes\urdfdom\all\test_package\."
    -----------------
    -- Using Conan toolchain: C:/J2/w/prod-v1/bsr/cci-40b9007a/recipes/urdfdom/all/test_package/build/generators/conan_toolchain.cmake
    -- The CXX compiler identification is MSVC 19.29.30148.0
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Conan: Component target declared 'urdfdom::urdfdom_model'
    -- Conan: Component target declared 'urdfdom::urdfdom_model_state'
    -- Conan: Component target declared 'urdfdom::urdfdom_sensor'
    -- Conan: Component target declared 'urdfdom::urdfdom_world'
    -- Conan: Target declared 'urdfdom::urdf_parser'
    -- Conan: Target declared 'urdfdom_headers::urdfdom_headers'
    -- Conan: Target declared 'console_bridge::console_bridge'
    -- Conan: Target declared 'tinyxml2::tinyxml2'
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/J2/w/prod-v1/bsr/cci-40b9007a/recipes/urdfdom/all/test_package/build
    urdfdom/4.0.0 (test package): CMake command: cmake --build "C:\J2\w\prod-v1\bsr\cci-40b9007a\recipes\urdfdom\all\test_package\build" --config Debug
    
    ----Running------
    > cmake --build "C:\J2\w\prod-v1\bsr\cci-40b9007a\recipes\urdfdom\all\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:/J2/w/prod-v1/bsr/cci-40b9007a/recipes/urdfdom/all/test_package/CMakeLists.txt
      test_package.cpp
    test_package.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::shared_ptr<class urdf::ModelInterface> __cdecl urdf::parseURDF(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?parseURDF@urdf@@YA?AV?$shared_ptr@VModelInterface@urdf@@@std@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@@Z) referenced in function main [C:\J2\w\prod-v1\bsr\cci-40b9007a\recipes\urdfdom\all\test_package\build\test_package.vcxproj]
    C:\J2\w\prod-v1\bsr\cci-40b9007a\recipes\urdfdom\all\test_package\build\Debug\test_package.exe : fatal error LNK1120: 1 unresolved externals [C:\J2\w\prod-v1\bsr\cci-40b9007a\recipes\urdfdom\all\test_package\build\test_package.vcxproj]
    CMake Warning:
      Manually-specified variables were not used by the project:
    
        CMAKE_POLICY_DEFAULT_CMP0091
    
    
    urdfdom/4.0.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
    urdfdom/4.0.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: urdfdom/4.0.0 (test package): Error in build() method, line 21
    	cmake.build()
    	ConanException: Error 1 while executing cmake --build "C:\J2\w\prod-v1\bsr\cci-40b9007a\recipes\urdfdom\all\test_package\build" --config Debug
    
  • urdfdom/3.1.1:
    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 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 3 (6f85c136efcd4ee5d8336a7a6d0ff96885d069b1):

  • urdfdom/3.1.1:
    CI failed to create some packages (All logs)

    Logs for packageID 49092e898834976ee0e26562814f041b56a5d4c0:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=msvc
    compiler.cppstd=14
    compiler.runtime=dynamic
    compiler.runtime_type=Release
    compiler.version=193
    os=Windows
    [options]
    */*:shared=False
    
    [...]
    urdfdom/3.1.1 (test package): Generator 'CMakeDeps' calling 'generate()'
    urdfdom/3.1.1 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt
        find_package(urdfdom)
        target_link_libraries(... urdfdom::urdf_parser)
    urdfdom/3.1.1 (test package): Generator 'VirtualRunEnv' calling 'generate()'
    urdfdom/3.1.1 (test package): Generator 'CMakeToolchain' calling 'generate()'
    urdfdom/3.1.1 (test package): CMakeToolchain generated: conan_toolchain.cmake
    urdfdom/3.1.1 (test package): CMakeToolchain generated: CMakePresets.json
    urdfdom/3.1.1 (test package): CMakeToolchain generated: ..\..\..\CMakeUserPresets.json
    urdfdom/3.1.1 (test package): Generating aggregated env files
    urdfdom/3.1.1 (test package): Generated aggregated env files: ['conanrun.bat', 'conanbuild.bat']
    
    ======== Testing the package: Building ========
    urdfdom/3.1.1 (test package): Calling build()
    urdfdom/3.1.1 (test package): Running CMake.configure()
    urdfdom/3.1.1 (test package): RUN: cmake -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE="C:/J2/w/prod-v2/bsr@2/cci-181e28f5/recipes/urdfdom/all/test_package/build/msvc-193-x86_64-14-release/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/J2/w/prod-v2/bsr@2/cci-181e28f5/recipes/urdfdom/all/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "C:\J2\w\prod-v2\bsr@2\cci-181e28f5\recipes\urdfdom\all\test_package"
    -- Using Conan toolchain: C:/J2/w/prod-v2/bsr@2/cci-181e28f5/recipes/urdfdom/all/test_package/build/msvc-193-x86_64-14-release/generators/conan_toolchain.cmake
    -- Conan toolchain: CMAKE_GENERATOR_TOOLSET=v143
    -- Conan toolchain: C++ Standard 14 with extensions OFF
    -- The CXX compiler identification is MSVC 19.36.32532.0
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Conan: Component target declared 'urdfdom::urdfdom_model'
    -- Conan: Component target declared 'urdfdom::urdfdom_model_state'
    -- Conan: Component target declared 'urdfdom::urdfdom_sensor'
    -- Conan: Component target declared 'urdfdom::urdfdom_world'
    -- Conan: Target declared 'urdfdom::urdf_parser'
    -- Conan: Target declared 'urdfdom_headers::urdfdom_headers'
    -- Conan: Target declared 'console_bridge::console_bridge'
    -- Conan: Target declared 'tinyxml::tinyxml'
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/J2/w/prod-v2/bsr@2/cci-181e28f5/recipes/urdfdom/all/test_package/build/msvc-193-x86_64-14-release
    
    urdfdom/3.1.1 (test package): Running CMake.build()
    urdfdom/3.1.1 (test package): RUN: cmake --build "C:\J2\w\prod-v2\bsr@2\cci-181e28f5\recipes\urdfdom\all\test_package\build\msvc-193-x86_64-14-release" --config Release
    MSBuild version 17.6.3+07e294721 for .NET Framework
    
      Checking Build System
      Building Custom Rule C:/J2/w/prod-v2/bsr@2/cci-181e28f5/recipes/urdfdom/all/test_package/CMakeLists.txt
      test_package.cpp
    test_package.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::shared_ptr<class urdf::ModelInterface> __cdecl urdf::parseURDF(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?parseURDF@urdf@@YA?AV?$shared_ptr@VModelInterface@urdf@@@std@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@@Z) referenced in function main [C:\J2\w\prod-v2\bsr@2\cci-181e28f5\recipes\urdfdom\all\test_package\build\msvc-193-x86_64-14-release\test_package.vcxproj]
    C:\J2\w\prod-v2\bsr@2\cci-181e28f5\recipes\urdfdom\all\test_package\build\msvc-193-x86_64-14-release\Release\test_package.exe : fatal error LNK1120: 1 unresolved externals [C:\J2\w\prod-v2\bsr@2\cci-181e28f5\recipes\urdfdom\all\test_package\build\msvc-193-x86_64-14-release\test_package.vcxproj]
    
    ERROR: urdfdom/3.1.1 (test package): Error in build() method, line 21
    	cmake.build()
    	ConanException: Error 1 while executing
    
  • urdfdom/4.0.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.

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.

2 participants