The `antlr4-runtime` CMake package provided by `antlr4-cpp-runtime-devel` seems to require both `/usr/lib64/libantlr4-runtime.so` and `/usr/lib64/libantlr4-runtime.a` to function properly, since it has two targets (`antlr4_shared` and `antlr4_static`) and will check if both are configured properly. However the static library is missing in the package. Error message: ``` CMake Error at /usr/lib64/cmake/antlr4-runtime/antlr4-targets.cmake:85 (message): The imported target "antlr4_static" references the file "/usr/lib64/libantlr4-runtime.a" 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 "/usr/lib64/cmake/antlr4-runtime/antlr4-targets.cmake" but not all the files it references. Call Stack (most recent call first): /usr/lib64/cmake/antlr4-runtime/antlr4-runtime-config.cmake:42 (include) CMakeLists.txt:57 (find_package) ``` Reproducible: Always Steps to Reproduce: 1. Create a new CMake project 2. Add `find_package(antlr4-runtime REQUIRED)` to the `CMakeLists.txt` 3. Run `cmake .` Actual Results: CMake Error at /usr/lib64/cmake/antlr4-runtime/antlr4-targets.cmake:85 (message): The imported target "antlr4_static" references the file "/usr/lib64/libantlr4-runtime.a" 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 "/usr/lib64/cmake/antlr4-runtime/antlr4-targets.cmake" but not all the files it references. Call Stack (most recent call first): /usr/lib64/cmake/antlr4-runtime/antlr4-runtime-config.cmake:42 (include) CMakeLists.txt:57 (find_package) Expected Results: Load the CMake package normally without errors. Related CMake file contents (/usr/lib64/cmake/antlr4-runtime/antlr4-runtime-config.cmake): ``` foreach(_cmake_expected_target IN ITEMS antlr4_shared antlr4_static) list(APPEND _cmake_expected_targets "${_cmake_expected_target}") if(TARGET "${_cmake_expected_target}") list(APPEND _cmake_targets_defined "${_cmake_expected_target}") else() list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}") endif() endforeach() ... # Loop over all imported files and verify that they actually exist foreach(_cmake_target IN LISTS _cmake_import_check_targets) 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() unset(_cmake_file) unset("_cmake_import_check_files_for_${_cmake_target}") endforeach() ```
I think I see how to deal with this. We don't really want to ship static libraries in Fedora, so I've got a patch to remove references to the static library in upstream's cmake files. I will push an update momentarily. Please let me know if it resolves the issue for you.
FEDORA-2024-acb17dadf8 (antlr4-project-4.10.1-11.fc39) has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2024-acb17dadf8
FEDORA-2024-acb17dadf8 has been pushed to the Fedora 39 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-acb17dadf8` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-acb17dadf8 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2024-1ce7a1cd98 has been pushed to the Fedora 40 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-1ce7a1cd98` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-1ce7a1cd98 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2024-acb17dadf8 (antlr4-project-4.10.1-11.fc39) has been pushed to the Fedora 39 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2024-1ce7a1cd98 (antlr4-project-4.10.1-15.fc40) has been pushed to the Fedora 40 stable repository. If problem still persists, please make note of it in this bug report.