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

MacOS/Cmake Supplied-JWT Linker Error #414

Open
christopherbaine opened this issue Oct 27, 2024 · 3 comments
Open

MacOS/Cmake Supplied-JWT Linker Error #414

christopherbaine opened this issue Oct 27, 2024 · 3 comments

Comments

@christopherbaine
Copy link

Hi,
I've been attempting to building on MacOS, with the NMOS_CPP_USE_SUPPLIED_JWT_CPP flag to true, causes Linking CXX static library libjwt-cpp.a Error

Assuming Boost/cpprestsdk are installed,
To Replicate:
cmake -B build -DNMOS_CPP_USE_SUPPLIED_JWT_CPP=TRUE -DNMOS_CPP_USE_SUPPLIED_JSON_SCHEMA_VALIDATOR=TRUE -DWEBSOCKETPP_INCLUDE_DIR="Release/libs/websocketpp"
cmake --build build

Thanks

@christopherbaine
Copy link
Author

It looks like the section in NmosCppDependencies.cmake that compiles this creates a static library for a header only library. It even has a comment # hm, header-only so should be INTERFACE library?

@garethsb
Copy link
Contributor

garethsb commented Nov 2, 2024

I've checked and confirmed NMOS_CPP_USE_SUPPLIED_JSON_SCHEMA_VALIDATOR works OK on Linux... it constructs an empty libjwt-cpp.a (8 Byte file). I suspect difference in behaviour with empty archives on macOS. The CI matrix only tests this flag on one platform. As the original author of the "hm" comment after the library was first added, I agree an INTERFACE library would be more elegant anyway... but I note one or two other potential issues - I think missing install(FILES) and I think wrong target_include_directories. I'll look at this when I get a chance.

@christopherbaine
Copy link
Author

I believe that is exactly the case, MacOS fails on an empty archive. Thanks for getting back to me!

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

No branches or pull requests

2 participants