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 7.79 does not compile on linux and mac with debug flags #7733

Closed
tawmoto opened this issue Sep 16, 2021 · 6 comments
Closed

curl 7.79 does not compile on linux and mac with debug flags #7733

tawmoto opened this issue Sep 16, 2021 · 6 comments
Assignees
Labels

Comments

@tawmoto
Copy link

@tawmoto tawmoto commented Sep 16, 2021

I am trying to build curl as I do it for years, with the same flags.

FLAGS=" -Wa,-compress-debug-sections=none -fPIC -DPIC -m64" LDFLAGS=" -Wl,-compress-debug-sections=none" ./configure --enable-ftp --enable-proxy --enable-ipv6 --enable-http --enable-nonblocking --enable-crypto-auth --enable-hidden-symbols --enable-soname-bump --enable-static --disable-shared --disable-dict --disable-ares --disable-telnet --disable-tftp --disable-manual --disable-rtsp --disable-file --disable-pop3 --disable-imap --disable-smtp --disable-ldap --disable-ldaps --disable-sspi --without-libssh2 --without-zlib --without-gnutls --without-nss --without-libidn --without-libidn2 --without-nghttp2 --without-librtmp --without-brotli --without-libpsl --prefix="some_install_dir" --with-ssl="ssl_dir" --disable-rt --disable-threaded-resolver --enable-debug --enable-curldebug

I get this error

d	16-Sep-2021 14:49:36		[DEBUG] 	CC       vtls/libcurlu_la-wolfssl.lo
build	16-Sep-2021 14:49:36		[DEBUG] 	CC       vquic/libcurlu_la-ngtcp2.lo
build	16-Sep-2021 14:49:36		[DEBUG] 	CC       vquic/libcurlu_la-quiche.lo
build	16-Sep-2021 14:49:36		[DEBUG] 	CC       vquic/libcurlu_la-vquic.lo
build	16-Sep-2021 14:49:37		[DEBUG] 	CC       vssh/libcurlu_la-libssh.lo
build	16-Sep-2021 14:49:37		[DEBUG] 	CC       vssh/libcurlu_la-libssh2.lo
build	16-Sep-2021 14:49:37		[DEBUG] 	CC       vssh/libcurlu_la-wolfssh.lo
build	16-Sep-2021 14:49:37		[DEBUG] 	CCLD     libcurlu.la
build	16-Sep-2021 14:49:37		[DEBUG] 	RUN      checksrc
build	16-Sep-2021 14:49:38		[DEBUG] 	./strerror.c:734:20: warning: Unused ignore: STRERROR (UNUSEDIGNORE)
build	16-Sep-2021 14:49:38		[DEBUG] 	/* !checksrc! disable STRERROR 2 */
build	16-Sep-2021 14:49:38		[DEBUG] 	^
build	16-Sep-2021 14:49:38		[DEBUG] 	checksrc: 0 errors and 1 warnings
build	16-Sep-2021 14:49:38		[DEBUG] 	checksrc: 0 errors and 7 warnings suppressed
build	16-Sep-2021 14:49:38		[DEBUG] 	Makefile:206412: recipe for target 'checksrc' failed
build	16-Sep-2021 14:49:38		[DEBUG] 	make[2]: *** [checksrc] Error 5

The problem seems this line:
2f0bb86#r56567123

Problem is reproducible on Linux and MacOS with curl 7.79.0

Thanks

@tawmoto tawmoto changed the title curl 7.79 does not build on linux and mac with debug flags curl 7.79 does not compile on linux and mac with debug flags Sep 16, 2021
bagder added a commit that referenced this issue Sep 16, 2021
So that debug builds work (checksrc really)

Reported-by: Marcel Raad
Reported-by: tawmoto on github
Fixes #7733
@bagder bagder self-assigned this Sep 16, 2021
@bagder bagder added the build label Sep 16, 2021
@tawmoto
Copy link
Author

@tawmoto tawmoto commented Sep 16, 2021

@bagder thank you very much for the fix, but I tried to implement it on my local machine and I still get the error. (i mean this change: 73b55e4)
Maybe I should change something in my building flags? I am using them for years without any problem.
Btw, the error occurs only I use --enable-debug flag.

Thank you

@bagder
Copy link
Member

@bagder bagder commented Sep 16, 2021

I tried to implement it on my local machine and I still get the error

So what exactly did you do to "implement it" ?

@tawmoto
Copy link
Author

@tawmoto tawmoto commented Sep 16, 2021

So what exactly did you do to "implement it" ?

Downloaded 7.79.0, unpacked it, did that change (by adding .checksrc string in the lib/Makefile.am file, like in your PR), ran configure (like in my original post) and make install.

@bagder
Copy link
Member

@bagder bagder commented Sep 16, 2021

You want to put a file in the lib/ directory and call that file .checksrc and it should have the contents shown here: https://github.com/curl/curl/blob/master/lib/.checksrc

The fix I did makes sure to include that file in release tarballs.

@bagder bagder closed this in 4a46177 Sep 16, 2021
jay referenced this issue Sep 17, 2021
We have and provide Curl_strerror() internally for a reason: strerror()
is not necessarily thread-safe so we should always try to avoid it.

Extended checksrc to warn for this, but feature the check disabled by
default and only enable it in lib/

Closes #7685
@tawmoto
Copy link
Author

@tawmoto tawmoto commented Sep 17, 2021

You want to put a file in the lib/ directory and call that file .checksrc and it should have the contents shown here: https://github.com/curl/curl/blob/master/lib/.checksrc

The fix I did makes sure to include that file in release tarballs.

Thanks a lot for the solution, it works!
I guess 7.79.1 won't be released too soon with this fix, so I will create a patch on my side.

Cheers and thanks again!

@bagder
Copy link
Member

@bagder bagder commented Sep 17, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants