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

strnlen and Cygwin compatability - catch_tostring.hpp #2511

Closed
rey-gomez opened this issue Sep 1, 2022 · 0 comments · Fixed by #2540
Closed

strnlen and Cygwin compatability - catch_tostring.hpp #2511

rey-gomez opened this issue Sep 1, 2022 · 0 comments · Fixed by #2540

Comments

@rey-gomez
Copy link

I was trying to make autodiff (https://autodiff.github.io/installation/) using cmake and the most recent version of Catch2 on Cygwin, but would always run into an error at the cmake --build . --target install. I finally narrowed down my issue thanks to this error message :

/usr/local/include/catch2/catch_tostring.hpp: In static member function ‘static std::string Catch::StringMaker<char [SZ]>::convert(const char)’:
/usr/local/include/catch2/catch_tostring.hpp:214:33: error: there are no arguments to ‘strnlen’ that depend on a template parameter, so a declaration of ‘strnlen’ must be available [-fpermissive]

I think the issue is that in the file catch_tostring.hpp there is a call to 'strnlen' that is unfortunately not supported in Cygwin (microsoft/GSL#331).

I have tried to debug my issue by editing this file and changing the strnlen calls.

I understand there are several limitations to using cygwin and I am posting this here in case anyone else has this issue. Please let me know if this is not a bug and there was an issue in my implementation.

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 a pull request may close this issue.

1 participant