Package static library as part of -devel pkg #1

Merged
jengelh merged 1 commits from VaiTon/oneapi-unified-runtime:enable_static_lib into master 2025-01-17 02:21:32 +01:00
Collaborator
No description provided.
VaiTon added 1 commit 2025-01-06 14:43:54 +01:00
Owner

Hm, we usually do not ship static libraries in openSUSE and you would need a good reason why this should be different for UR.
https://en.opensuse.org/openSUSE:Packaging_guidelines#Static_Libraries

Hm, we usually do not ship static libraries in openSUSE and you would need a good reason why this should be different for UR. https://en.opensuse.org/openSUSE:Packaging_guidelines#Static_Libraries
Author
Collaborator

Unfortunately when importing the package via CMake with find_package it complains if the .a lib is not present. I don't know how to patch the CMakeLists.txt to make sure that it doesn't crash without it

/usr/lib/cmake/unified-runtime/unified-runtime-targets.cmake:

# Loop over all imported files and verify that they actually exist
foreach(_cmake_target IN LISTS _cmake_import_check_targets)
  if(CMAKE_VERSION VERSION_LESS "3.28"
      OR NOT DEFINED _cmake_import_check_xcframework_for_${_cmake_target}
      OR NOT IS_DIRECTORY "${_cmake_import_check_xcframework_for_${_cmake_target}}")
    foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}")
      if(NOT EXISTS "${_cmake_file}")
        message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file
   \"${_cmake_file}\"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   \"${CMAKE_CURRENT_LIST_FILE}\"
but not all the files it references.
")
      endif()
    endforeach()
  endif()
  unset(_cmake_file)
  unset("_cmake_import_check_files_for_${_cmake_target}")
endforeach()
unset(_cmake_target)
unset(_cmake_import_check_targets)
Unfortunately when importing the package via CMake with `find_package` it complains if the .a lib is not present. I don't know how to patch the CMakeLists.txt to make sure that it doesn't crash without it /usr/lib/cmake/unified-runtime/unified-runtime-targets.cmake: ```cmake # Loop over all imported files and verify that they actually exist foreach(_cmake_target IN LISTS _cmake_import_check_targets) if(CMAKE_VERSION VERSION_LESS "3.28" OR NOT DEFINED _cmake_import_check_xcframework_for_${_cmake_target} OR NOT IS_DIRECTORY "${_cmake_import_check_xcframework_for_${_cmake_target}}") foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}") if(NOT EXISTS "${_cmake_file}") message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file \"${_cmake_file}\" but this file does not exist. Possible reasons include: * The file was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. * The installation package was faulty and contained \"${CMAKE_CURRENT_LIST_FILE}\" but not all the files it references. ") endif() endforeach() endif() unset(_cmake_file) unset("_cmake_import_check_files_for_${_cmake_target}") endforeach() unset(_cmake_target) unset(_cmake_import_check_targets) ```
Author
Collaborator

I could create a -devel-static package and then require it from the -devel package

I could create a `-devel-static` package and then require it from the `-devel` package
Owner

That split is not worth the byte price if the .a archive is hardrequired. I'll ponder a bit if cmake can be nudged to not require it.

That split is not worth the byte price if the .a archive is hardrequired. I'll ponder a bit if cmake can be nudged to not require it.
VaiTon force-pushed enable_static_lib from 9876b48195 to 5310eda124 2025-01-10 19:47:35 +01:00 Compare
jengelh merged commit 5310eda124 into master 2025-01-17 02:21:32 +01:00
VaiTon deleted branch enable_static_lib 2025-01-17 16:42:52 +01:00
Owner

That split is not worth the byte price if the .a archive is hardrequired. I'll ponder a bit if cmake can be nudged to not require it.

As for zstd, the static archive from the export set. https://build.opensuse.org/request/show/1255925
This might point to a solution for unified-runtime.

> That split is not worth the byte price if the .a archive is hardrequired. I'll ponder a bit if cmake can be nudged to not require it. As for zstd, the static archive from the export set. https://build.opensuse.org/request/show/1255925 This might point to a solution for unified-runtime.
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: clibs/unified-runtime#1
No description provided.