-
Notifications
You must be signed in to change notification settings - Fork 49
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
aws-lc/crypto/err/err.c:186:17: error: implicit declaration of function ‘strdup’; #610
Comments
For context why I'm trying this: rust-lang/rustup#4094 |
Hello!
This looks like an error that occurs when the git submodules are not initialized. Are you building directly from the git repository? If so, you can initialize the submodules like this:
(The Makefile in the root of our repo has a useful target for this operation.) I'm not sure what else might cause an error like this. I don't think we have any tests setup specifically for Solaris. I might need to spin up a Solaris host to investigate. |
Thank you!
Now it fails like:
And if I rerun it I get undefined symbols as I reported here: rust-lang/rustup#4094 (comment) I will try to look at this closely next week.. |
This is interesting. The code it's complaining about is here. I didn't realize that strdup is not a C99 function, and has only officially been available since C23. 🤯 The proper way to use this in C99 code (assuming the compiler supports it at all) is apparently to define a macro prior to including "string.h". (I found this here: https://en.cppreference.com/w/c/experimental/dynamic/strdup)
As a workaround, you might be able to fix this by setting
I'm a little surprised that this issue had not been fixed previously. We'll take a look at what changes we need to make upstream for this. Thanks for the report! |
FYI -- I updated the title of the issue to indicate the problem that needs to be addressed. |
Problem:
Build on Solaris fails:
rustc 1.82.0 (f6e511eec 2024-10-15) (built from a source tarball)
SunOS 5.11 11.4.78.184.0 i86pc i386 i86pc non-virtualized
The text was updated successfully, but these errors were encountered: