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

Build broken by curl 7.87.0 #28

Open
sternenseemann opened this issue Jan 18, 2023 · 2 comments
Open

Build broken by curl 7.87.0 #28

sternenseemann opened this issue Jan 18, 2023 · 2 comments

Comments

@sternenseemann
Copy link

After upgrading to curl 7.87.0 we started seeing the following build failure:

Building library for curl-1.3.8..
[1 of 8] Compiling Network.Curl.Code ( Network/Curl/Code.hs, dist/build/Network/Curl/Code.o, dist/build/Network/Curl/Code.dyn_o )
[2 of 8] Compiling Network.Curl.Debug ( Network/Curl/Debug.hs, dist/build/Network/Curl/Debug.o, dist/build/Network/Curl/Debug.dyn_o )
[3 of 8] Compiling Network.Curl.Types ( Network/Curl/Types.hs, dist/build/Network/Curl/Types.o, dist/build/Network/Curl/Types.dyn_o )
[4 of 8] Compiling Network.Curl.Post ( Network/Curl/Post.hs, dist/build/Network/Curl/Post.o, dist/build/Network/Curl/Post.dyn_o )
[5 of 8] Compiling Network.Curl.Opts ( Network/Curl/Opts.hs, dist/build/Network/Curl/Opts.o, dist/build/Network/Curl/Opts.dyn_o )
[6 of 8] Compiling Network.Curl.Info ( Network/Curl/Info.hs, dist/build/Network/Curl/Info.o, dist/build/Network/Curl/Info.dyn_o )
[7 of 8] Compiling Network.Curl.Easy ( Network/Curl/Easy.hs, dist/build/Network/Curl/Easy.o, dist/build/Network/Curl/Easy.dyn_o )

Network/Curl/Easy.hs:27:1: warning: [-Wtabs]
    Tab character found here, and in two further locations.
    Please use spaces instead.
   |
27 |         
   | ^^^^^^^^
[8 of 8] Compiling Network.Curl     ( Network/Curl.hs, dist/build/Network/Curl.o, dist/build/Network/Curl.dyn_o )

Network/Curl.hs:278:1: warning: [-Wtabs]
    Tab character found here, and in 8 further locations.
    Please use spaces instead.
    |
278 |                       -> IO (CurlResponse_ hdrTy bufTy)
    | ^^^^^^^^
[1 of 8] Compiling Network.Curl.Code ( Network/Curl/Code.hs, dist/build/Network/Curl/Code.p_o )
[2 of 8] Compiling Network.Curl.Debug ( Network/Curl/Debug.hs, dist/build/Network/Curl/Debug.p_o )
[3 of 8] Compiling Network.Curl.Types ( Network/Curl/Types.hs, dist/build/Network/Curl/Types.p_o )
[4 of 8] Compiling Network.Curl.Post ( Network/Curl/Post.hs, dist/build/Network/Curl/Post.p_o )
[5 of 8] Compiling Network.Curl.Opts ( Network/Curl/Opts.hs, dist/build/Network/Curl/Opts.p_o )
[6 of 8] Compiling Network.Curl.Info ( Network/Curl/Info.hs, dist/build/Network/Curl/Info.p_o )
[7 of 8] Compiling Network.Curl.Easy ( Network/Curl/Easy.hs, dist/build/Network/Curl/Easy.p_o )

Network/Curl/Easy.hs:27:1: warning: [-Wtabs]
    Tab character found here, and in two further locations.
    Please use spaces instead.
   |
27 |         
   | ^^^^^^^^
[8 of 8] Compiling Network.Curl     ( Network/Curl.hs, dist/build/Network/Curl.p_o )

Network/Curl.hs:278:1: warning: [-Wtabs]
    Tab character found here, and in 8 further locations.
    Please use spaces instead.
    |
278 |                       -> IO (CurlResponse_ hdrTy bufTy)
    | ^^^^^^^^
In file included from /nix/store/arrxja9h6jxh9qs5iw3vxcznlkq0w00i-curl-7.87.0-dev/include/curl/curl.h:3195,

                 from curlc.c:10:0: error: 
curlc.c: In function ‘curl_easy_getinfo_long’:

curlc.c:14:12: error:
     error: void value not ignored as it ought to be
       14 |     return curl_easy_getinfo(curl, CURLINFO_LONG+tg, pl);
          |            ^
   |
14 |     return curl_easy_getinfo(curl, CURLINFO_LONG+tg, pl);
   |            ^
curlc.c: In function ‘curl_easy_getinfo_string’:

curlc.c:19:12: error:
     error: void value not ignored as it ought to be
       19 |     return curl_easy_getinfo(curl, CURLINFO_STRING+tg, s);
          |            ^
   |
19 |     return curl_easy_getinfo(curl, CURLINFO_STRING+tg, s);
   |            ^
curlc.c: In function ‘curl_easy_getinfo_double’:

curlc.c:24:12: error:
     error: void value not ignored as it ought to be
       24 |     return curl_easy_getinfo(curl, CURLINFO_DOUBLE+tg, d);
          |            ^
   |
24 |     return curl_easy_getinfo(curl, CURLINFO_DOUBLE+tg, d);
   |            ^
curlc.c: In function ‘curl_easy_getinfo_slist’:

curlc.c:29:12: error:
     error: void value not ignored as it ought to be
       29 |     return curl_easy_getinfo(curl, CURLINFO_SLIST+tg, s);
          |            ^
   |
29 |     return curl_easy_getinfo(curl, CURLINFO_SLIST+tg, s);
   |            ^
`cc' failed in phase `C Compiler'. (Exit code: 1)
@sternenseemann
Copy link
Author

Seems like the new gcc-typechecker.h is the culprit. A simple patch such as

diff --git a/curlc.c b/curlc.c
index d185008..7a80551 100644
--- a/curlc.c
+++ b/curlc.c
@@ -7,6 +7,9 @@
  * (c) 2007-2009, Galois, Inc.
  *
  */
+
+// The curl gcc cpp getinfo typechecker doesn't cope well with our wrappers
+#define CURL_DISABLE_TYPECHECK
 #include <curl/curl.h>
 
 int curl_easy_getinfo_long(void *curl, long tg, long *pl)

solves the issue.

@neilmayhew
Copy link

This is blocking me too.

neilmayhew added a commit to neilmayhew/haskell-curl that referenced this issue Feb 4, 2023
neilmayhew added a commit to neilmayhew/haskell-curl that referenced this issue Feb 4, 2023
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