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

Fix cmake error on external misc library #487

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

bwarden
Copy link

@bwarden bwarden commented Aug 14, 2023

For Linux builds, if strlcpt and strlcat are already provided, cmake is given an empty list of sources to build for the "misc" library. Newer versions of cmake throw an error for this. In this case, we should just avoid building the library.

Failure pattern:
CMake Error at external/misc/CMakeLists.txt:35 (add_library):
No SOURCES given to target: misc
CMake Generate step failed. Build files cannot be regenerated correctly.

Fixes #319

For Linux builds, if strlcpt and strlcat are already provided, cmake is
given an empty list of sources to build for the "misc" library. Newer
versions of cmake throw an error for this. In this case, we should just
avoid building the library.

Failure pattern:
CMake Error at external/misc/CMakeLists.txt:35 (add_library):
  No SOURCES given to target: misc
CMake Generate step failed.  Build files cannot be regenerated correctly.

Fixes wb2osz#319
alexf91 added a commit to alexf91/AUR-PKGBUILDs that referenced this pull request Sep 19, 2023
archlinux-github pushed a commit to archlinux/aur that referenced this pull request Sep 19, 2023
@wb2osz
Copy link
Owner

wb2osz commented Sep 23, 2023

Your change fixes the build for Alpine Linux but breaks Ubuntu and Raspberry Pi.

@bwarden
Copy link
Author

bwarden commented Sep 23, 2023

Your change fixes the build for Alpine Linux but breaks Ubuntu and Raspberry Pi.

Looking at the Ubuntu failure, I think the #define strlcat... strlcat_debug... in direwolf.h might be the issue here. Like Ubuntu and Raspbian's strlcat doesn't have the *_debug functions.

@bwarden
Copy link
Author

bwarden commented Sep 23, 2023

Actually the whole #if defined... OS section in there looks like it could use a review. I'm not coherent enough tonight to attempt it though.

@wb2osz
Copy link
Owner

wb2osz commented Sep 25, 2023

I think I have something that fixes the build on Alpine without breaking the others.
Try the most recent in the "dev" branch.

@bwarden
Copy link
Author

bwarden commented Oct 9, 2023

Try the most recent in the "dev" branch.

Sorry for the delay. Looks like this approach works for me! (Clear Linux)

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.

3 participants