Opened 4 years ago
Closed 3 years ago
#61622 closed defect (fixed)
p5-www-curl @4.17: error: use of undeclared identifier 'CURL_WIN32' 'CURLOPT'
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | fracai |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.4 |
Keywords: | haspatch | Cc: | |
Port: | p5-www-curl |
Description
p5-www-curl seems to be doing something that is not compatible with macOS, at least not macOS Big Sur (maybe #define
ing something that's now being used in the system headers?) because the build log is just lots of errors that appear to be in the system headers:
Locating required external dependency bin:curl-config... found at /opt/local/bin/curl-config. The version is libcurl 7.73.0 Found curl.h in /opt/local/include/curl/curl.h In file included from /opt/local/include/curl/curl.h:38: In file included from /opt/local/include/curl/system.h:430: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/usr/include/sys/types.h:184: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/usr/include/sys/_types/_fd_def.h:32: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/usr/include/Availability.h:136: /Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/usr/include/AvailabilityInternal.h:142:2: error: #endif without #if #endif /* #if defined(__has_builtin) */ ^
Change History (5)
comment:1 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
comment:2 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | bigsur removed |
---|---|
Summary: | p5-www-curl @4.17: error: #endif without #if → p5-www-curl @4.17: error: use of undeclared identifier 'CURL_WIN32' 'CURLOPT' |
The above errors occur during the configuration phase but don't actually stop the build. I don't know how detrimental those errors are—maybe not at all since I guess they've been occurring since at least 2015 yet we've had successful builds of the port up to 2019.
The fatal errors don't occur until the build phase in which we have:
In file included from Curl.xs:578: ./curlopt-constants.c:188:46: error: use of undeclared identifier 'CURL_WIN32' if (strEQ(name, "WIN32")) return CURL_WIN32; ^ ./curlopt-constants.c:2660:48: error: use of undeclared identifier 'CURLOPT' if (strEQ(name, "CURLOPT")) return CURLOPT; ^
This was reported upstream in March 2020 here:
https://rt.cpan.org/Public/Bug/Display.html?id=132197
There is a patch provided there.
comment:3 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to ryandesign:
/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/usr/include/AvailabilityInternal.h:142:2: error: #endif without #if
This is discussed here:
https://rt.cpan.org/Public/Bug/Display.html?id=131089
https://github.com/szbalint/WWW--Curl/issues/16#issuecomment-558645508
https://stackoverflow.com/questions/42031921/unterminated-unconditional-directive-error-when-preprocessing-c-code
It seems to happen because WWW::Curl's Makefile.PL invokes cpp
and cpp
has a bug that makes it unable to parse these system headers. The fix is apparently to use $CC -E
instead of cpp
, if we can figure out how to get the value of $CC
in Makefile.PL.
comment:4 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | haspatch added |
---|
comment:5 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Same problem reported upstream in October 2015:
https://rt.cpan.org/Public/Bug/Display.html?id=107825
No reply from developer to this or other bugs in recent years.
I guess WWW::Curl is dead.
Also no reply from maintainer in this bug report in one year.
I don't see anything that depends on this port. Maybe it should be removed.