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

curl fails to compile with gcc, --enable-debug=yes and --with-secure-transport #11155

Closed
FeignClaims opened this issue May 19, 2023 · 0 comments
Assignees
Labels

Comments

@FeignClaims
Copy link

I did this

I cloned the repository and ran the following commands:

  • autoreconf --force --install
  • ./configure --disable-shared --enable-static --prefix=/ '--bindir=${prefix}/bin' '--sbindir=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' --with-libidn2=no --with-librtmp=no --with-libpsl=no --with-libgsasl=no --with-schannel=no --with-secure-transport=yes --with-brotli=no --enable-shared=no --enable-static=yes --enable-dict=yes --enable-file=yes --enable-ftp=yes --enable-gopher=yes --enable-http=yes --enable-imap=yes --enable-ldap=no --enable-mqtt=yes --enable-pop3=yes --enable-rtsp=yes --enable-smb=yes --enable-smtp=yes --enable-telnet=yes --enable-tftp=yes --enable-debug=no --enable-ares=no --enable-threaded-resolver=yes --enable-cookies=yes --enable-ipv6=yes --enable-manual=no --enable-verbose=yes --enable-symbol-hiding=no --enable-unix-sockets=yes --with-zstd=no --without-openssl --without-wolfssl --without-libssh2 --without-nghttp2 --with-zlib=/Users/feignclaims/.conan2/p/b/zlib5dc1ed3312917/p --with-ca-fallback=nO
  • make

However, when running make, I got the following error:

vtls/sectransp.c: In function 'TLSCipherNameForNumber':
vtls/sectransp.c:907:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
  907 |   for(size_t i = SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA + 1;
      |   ^~~
vtls/sectransp.c:907:3: note: use option '-std=c99', '-std=gnu99', '-std=c11' or '-std=gnu11' to compile your code

I set -enable-debug=no and reconfigured it, keeping the other parameters the same, and it compiled successfully.

The issue might be caused by the -std=gnu89 in CFLAGS, which is added when want_warnings is yes and the compiler_id is GNU_C.

I expected the following

A successful compilation.

curl/libcurl version

git master branch (with latest commits a64d7de)

operating system

Darwin FeignClaimsdeMacBook-Air.local 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:41 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8103 arm64

@bagder bagder self-assigned this May 19, 2023
@bagder bagder added the TLS label May 19, 2023
bagder added a commit that referenced this issue May 19, 2023
Follow-up to dd2bb48

Reported-by: FeignClaims on github
Fixes #11155
@bagder bagder changed the title current master branch curl fails to compile on m1 mac with --enable-debug=yes curl fails to compile with gcc, --enable-debug=yes and --with-secure-transport May 19, 2023
jay added a commit to jay/curl that referenced this issue May 20, 2023
Reported-by: FeignClaims@users.noreply.github.com

Fixes curl#11155
Closes #xxxx
@bagder bagder closed this as completed in 954c7df May 21, 2023
bch pushed a commit to bch/curl that referenced this issue Jul 19, 2023
Follow-up to dd2bb48

Reported-by: FeignClaims on github
Fixes curl#11155
Closes curl#11159
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants