-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
ctype.h missing from puma_http11.c #2304
Comments
The following is what I get when trying to install Puma 4.3.5 in Ruby 2.7.1 under rbenv with RubyGems 3.1.2 on MacOS Big Sur 10.16
|
And unused variables, those could be cleaned up as well? I didn't notice use any of mentioned variables above. |
Went to open a PR and realized this is already fixed in v4.3.4puma_http11 ((v4.3.4)) $ ruby extconf.rb checking for BIO_read() in -lcrypto... yes checking for SSL_CTX_new() in -lssl... yes checking for openssl/bio.h... yes checking for DTLS_method() in openssl/ssl.h... yes checking for TLS_server_method() in openssl/ssl.h... yes checking for SSL_CTX_set_min_proto_version in openssl/ssl.h... yes creating Makefile puma_http11 ((v4.3.4)) $ make compiling http11_parser.c compiling io_buffer.c compiling mini_ssl.c compiling puma_http11.c puma_http11.c:203:22: error: implicitly declaring library function 'isspace' with type 'int (int)' [-Werror,-Wimplicit-function-declaration] while (vlen > 0 && isspace(value[vlen - 1])) vlen--; ^ puma_http11.c:203:22: note: include the header or explicitly provide a declaration for 'isspace' 1 error generated. make: *** [puma_http11.o] Error 1 masterpuma_http11 (master) $ ruby extconf.rb checking for BIO_read() in -lcrypto... yes checking for SSL_CTX_new() in -lssl... yes checking for openssl/bio.h... yes checking for DTLS_method() in openssl/ssl.h... yes checking for TLS_server_method() in openssl/ssl.h... yes checking for SSL_CTX_set_min_proto_version in openssl/ssl.h... yes creating Makefile puma_http11 (master) $ make compiling http11_parser.c compiling mini_ssl.c compiling puma_http11.c linking shared-object puma/puma_http11.bundle puma_http11 (master) $ There doesn’t seem to be a stable branch for the 4.3.x line so I’m not sure if master is targeting 4.x or 5.0. |
Master seems to be 5.0.0.beta1. |
The use of puma/ext/puma_http11/puma_http11.c Line 170 in e2b4193
Or am I missing something? |
Seeing this is reported for the new macOS version, Big Sur, it is probably related to something that changed in macOS. I found a few similar issues when I started searching:
The paragraph that these issues all quote...
...is listed under a headline "Known Issues" at https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11-beta-release-notes, so it might even get fixed, making it work to compile Puma 4.3.5 in Big Sur. I think this issue can be closed without action. If it persist when Big Sur is out of beta, maybe we can reconsider. |
Would it be bad to include |
I don’t think it’s the linker cache. Clang now enables
Apple could back out of this particular change, but even if they do, it’s probably a good idea not to rely on the implicit function declaration anyway. |
Whoops, yes, I looked in the wrong file. 🤦♂️ |
I think they won't back out on this. I might be quite much wrong here, but this was changed on newer C standards some time ago and |
Until fixed by ctype and/or Apple default parameters, it's workaround by setting the $ bundle config build.puma --with-cflags="-Wno-error=implicit-function-declaration" Or just install 4.3.5 with the flags: $ gem install puma:4.3.5 -- --with-cflags="-Wno-error=implicit-function-declaration" |
I'm also seeing the same issue in macOS 10.15.6 in a new rails app when trying to install puma 4.3.5 |
@frederikspang's solution is working well with my issue, thank you so much. |
@frederikspang solution just worked for me |
Fixed on master and 4.3.6. |
For latest version of OSX:
Or just upgrade gem to
|
Addresses: [737](#737) According to [Issue #2304](puma/puma#2304) at puma/puma, the `ctype.h` header file was no being included. This has been fixed at version 4.3.6. **Modifications:** - change Gemfile to specify at least version 4.3.6 for puma
Thank you, @CR1AT0RS! 👍 |
There was a bug on Puma version 4.3.5, causing it to fail when trying to compile. It was fixed with [#2304]. This commit updates Gemfile.lock and removes the now redundant explanations on readme. [#2304]: puma/puma#2304 Co-authored-by: Rob Sanheim <[email protected]>
There's [a bug in Puma 4.3.5](puma/puma#2304) which prevents some compilers from building the native extensions required for Puma. I was running into this issue on macOS Big Sur. Updating fixed it.
There's [a bug in Puma 4.3.5](puma/puma#2304) which prevents some compilers from building the native extensions required for Puma. I was running into this issue on macOS Big Sur. Updating fixed it.
It worked earlier, but after removing and setting up the project from scratch does not work now |
Trying to install puma 2.11.3 on Big Sur 11.1
Not a battle I would fight 😆
(Is using docker an option?)
|
The most painful is the fact it worked a day ago |
Older versions of puma don't work on newer versions of OSX puma/puma#2304 I had to bump this gem to get `bundle install` to work
* Update puma Older versions of puma don't work on newer versions of OSX puma/puma#2304 I had to bump this gem to get `bundle install` to work * Update Gemfile Co-authored-by: Michael Grosser <[email protected]> Co-authored-by: Michael Grosser <[email protected]>
Now the
If you have openssl 3 installed with brew just install puma with the path like this:
gem install puma:5.6.2 -- --with-cppflags=-I/usr/local/opt/openssl/include |
For puma 6, this helped:
|
where'd you use this export call? |
Before installing Puma. You can also use it like this: Or if you are using Bundler (with Puma in your Gemfile): |
Describe the bug
#include <ctype.h>
needs to be added toext/puma_http11/puma_http11.c
. Without this include compilation of Puma will fail due to error:This seems to be fixed on 5.0.0.beta1 although it won't help since beta doesn't behave nicely and cannot be used in production.
To Reproduce
Just try to compile puma.
Expected behavior
Succesfully compiled Puma would be expected behaviour :)
Desktop (please complete the following information):
MacOS 15.5.5 and MacOS Big Sur
Puma version 4.3.5
The text was updated successfully, but these errors were encountered: