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

Link to openpgm when building with cmake #4546

Merged
merged 2 commits into from
May 11, 2023

Conversation

cdepillabout
Copy link
Contributor

@cdepillabout cdepillabout commented May 11, 2023

I was noticing a problem where libzmq fails to link to openpgm when building with CMake.

This PR fixes the problem by making sure to link to openpgm when passing the -DWITH_OPENPGM=1 to cmake.

@cdepillabout
Copy link
Contributor Author

Without this PR, I was seeing errors like the following:

...
[ 55%] Linking CXX executable bin/inproc_lat
/nix/store/fhzz4yrdy17czwc9i4swhlpcp445inzb-binutils-2.40/bin/ld: lib/libzmq.so.5.2.4: undefined reference to `pgm_error_free'
/nix/store/fhzz4yrdy17czwc9i4swhlpcp445inzb-binutils-2.40/bin/ld: lib/libzmq.so.5.2.4: undefined reference to `pgm_send'
/nix/store/fhzz4yrdy17czwc9i4swhlpcp445inzb-binutils-2.40/bin/ld: lib/libzmq.so.5.2.4: undefined reference to `pgm_shutdown'
/nix/store/fhzz4yrdy17czwc9i4swhlpcp445inzb-binutils-2.40/bin/ld: lib/libzmq.so.5.2.4: undefined reference to `pgm_bind3'
/nix/store/fhzz4yrdy17czwc9i4swhlpcp445inzb-binutils-2.40/bin/ld: lib/libzmq.so.5.2.4: undefined reference to 
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/local_lat.dir/build.make:99: bin/local_lat] Error 1
make[1]: *** [CMakeFiles/Makefile2:445: CMakeFiles/local_lat.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
...

From the error messages, you can tell I'm building with Nix on Linux, but I expect that this error affects other distros as well.

Solution: Add `target_link_libraries()` to `libzmq` for openpgm when
openpgm has been enabled.
Solution: added relicense agreement
@cdepillabout
Copy link
Contributor Author

It looks like the CI job "OBS: libzmq - openSUSE_Leap_15/x86_64" is failing, but the failure doesn't look related to this PR?

https://build.opensuse.org/package/live_build_log/network:messaging:zeromq:ci:zeromq:libzmq:PR-4546/libzmq/openSUSE_Leap_15/x86_64

@bluca bluca merged commit 077dd92 into zeromq:master May 11, 2023
50 of 51 checks passed
@cdepillabout cdepillabout deleted the link-openpgm-cmake-fresh branch May 11, 2023 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants