FS#78687 - [zeromq] Invalid static targets in ZeroMQTargets.cmake

Attached to Project: Community Packages
Opened by Alex Fikl (alexfikl) - Friday, 02 June 2023, 17:30 GMT
Last edited by George Rawlinson (rawlinsong) - Friday, 02 June 2023, 22:05 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To George Rawlinson (rawlinsong)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

On line 76 of the current 'ZeroMQTargets.cmake' shipped with the 'zeromq' package it tries to add the library
```
add_library(libzmq-static STATIC IMPORTED)
```
which is not shipped with the package itself. This file is included by 'ZeroMQConfig.cmake', so doing a 'find_package(ZeroMQ)' always fails with
```
CMake Error at /usr/lib/cmake/ZeroMQ/ZeroMQTargets.cmake:103 (message):
The imported target "libzmq-static" references the file

"/usr/lib/libzmq.a"

but this file does not exist. <...>
```

Building the package with `-D BUILD_STATIC=OFF` generates a correct `ZeroMQTargets.cmake` without the static libs.

Additional info:
* package version: zeromq-4.3.4-3
* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:

Check out the `ZeroMQTargets.cmake` file. Trying to build e.g. cppzmq (https://aur.archlinux.org/packages/cppzmq) also shows the error.
This task depends upon

Closed by  George Rawlinson (rawlinsong)
Friday, 02 June 2023, 22:05 GMT
Reason for closing:  Fixed
Additional comments about closing:  4.3.4-4
Comment by George Rawlinson (rawlinsong) - Friday, 02 June 2023, 21:59 GMT
Apologies, I had a bit of difficulty with converting to CMake's build system from the standard autotools system.

Pushing a fix shortly.

Additionally, the C++ headers will be split out into it's own package (and cppzmq moved from AUR to repos) due to this particular bug report, so thanks for bringing it to my attention.

Loading...