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

spirv-tools: fix shared build #25310

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

Conversation

valgur
Copy link
Contributor

@valgur valgur commented Sep 18, 2024

Summary

Changes to recipe: spirv-tools/[*]

Motivation

The spirv-tools recipe currently incorrectly builds several components as static when shared=True and skips packaging of them. This means that spirv-tools can only be used with shared=False when used together with glslang:

if self.options.enable_optimizer and self.dependencies["spirv-tools"].options.shared:
raise ConanInvalidConfiguration(
f"{self.ref} with enable_optimizer requires static spirv-tools, "
"because SPIRV-Tools-opt is not built if shared"
)

This limitation is only imposed by inconsistent naming of the CMake targets and Windows shared build issues: KhronosGroup/SPIRV-Tools#3909

Both of these can be worked around in the recipe while making the shared build actually usable on non-Windows systems.

Details

I have not tested the shared build on Windows yet.


@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ❌

Failure in build 1 (7bacecac68ec967e0e50c9f9d62833d91f1c1ea5):

  • spirv-tools/1.3.243.0:
    Didn't run or was cancelled before finishing

  • spirv-tools/1.3.268.0:
    Didn't run or was cancelled before finishing

  • spirv-tools/1.3.261.1:
    CI failed to create some packages (All logs)

    Logs for packageID 432d86a8d81e816b815c4143207048d22fb2d871:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.libcxx=libstdc++11
    compiler.version=9
    os=Linux
    [options]
    spirv-tools:shared=False
    
    [...]
    ----Running------
    > cmake --build '/home/conan/workspace/prod-v1/bsr/cci-2014fe77/recipes/spirv-tools/all/test_v1_package/build/cf90e56104b1022b12643480a25188b3925ab8d3' '--' '-j3'
    -----------------
    Scanning dependencies of target test_package_c
    Scanning dependencies of target test_package_cpp
    [ 25%] Building C object test_package/CMakeFiles/test_package_c.dir/test_package.c.o
    [ 50%] Building CXX object test_package/CMakeFiles/test_package_cpp.dir/test_package.cpp.o
    [ 75%] Linking CXX executable ../bin/test_package_cpp
    [ 75%] Built target test_package_cpp
    CMake Warning:
      Manually-specified variables were not used by the project:
    
        CMAKE_EXPORT_NO_PACKAGE_REGISTRY
        CMAKE_INSTALL_BINDIR
        CMAKE_INSTALL_DATAROOTDIR
        CMAKE_INSTALL_INCLUDEDIR
        CMAKE_INSTALL_LIBDIR
        CMAKE_INSTALL_LIBEXECDIR
        CMAKE_INSTALL_OLDINCLUDEDIR
        CMAKE_INSTALL_SBINDIR
    
    
    /home/conan/workspace/prod-v1/bsr/cci-2014fe77/recipes/spirv-tools/all/test_package/test_package.c:1:10: fatal error: spirv-tools/libspirv.h: No such file or directory
        1 | #include "spirv-tools/libspirv.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    make[2]: *** [test_package/CMakeFiles/test_package_c.dir/build.make:82: test_package/CMakeFiles/test_package_c.dir/test_package.c.o] Error 1
    make[1]: *** [CMakeFiles/Makefile2:142: test_package/CMakeFiles/test_package_c.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....
    make: *** [Makefile:103: all] Error 2
    WARN: **************************************************
    WARN: *** Conan 1 is legacy and on a deprecation path **
    WARN: *********** Please upgrade to Conan 2 ************
    WARN: **************************************************
    spirv-tools/1.3.261.1 (test package): WARN: 
         ************************************************
         The 'cmake' generator is deprecated.
         Please update your code and remove it.
         *************************************************
    
    spirv-tools/1.3.261.1 (test package): WARN: 
         ************************************************
         The 'cmake_find_package_multi' generator is deprecated.
         Please update your code and remove it.
         *************************************************
    
    spirv-tools/1.3.261.1 (test package): WARN: **** The 'from conans import CMake' helper is deprecated. Please update your code and remove it. ****
    ERROR: spirv-tools/1.3.261.1 (test package): Error in build() method, line 12
    	cmake.build()
    	ConanException: Error 2 while executing cmake --build '/home/conan/workspace/prod-v1/bsr/cci-2014fe77/recipes/spirv-tools/all/test_v1_package/build/cf90e56104b1022b12643480a25188b3925ab8d3' '--' '-j3'
    
  • spirv-tools/1.2.198.0:
    Didn't run or was cancelled before finishing

  • spirv-tools/1.3.236.0:
    Didn't run or was cancelled before finishing

  • spirv-tools/1.3.239.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