-
-
Notifications
You must be signed in to change notification settings - Fork 6.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
configure fails to detect OpenSSL with gcc5 #719
Comments
That's from m4/curl-openssl.m4. Based on that output you don't have a |
hi,
yep
|
I don't see anything unusual there. It's probably failing to parse. Can you save a copy of the conftest file that is used to get the version number? This way we can go step by step to figure out what the problem is. Apply this: diff --git a/acinclude.m4 b/acinclude.m4
index 4f25ac6..0f21624 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -56,6 +56,9 @@ CURL_DEF_TOKEN $1
if test -z "$tmp_exp" || test "$tmp_exp" = "$1"; then
tmp_exp=""
fi
+ if test "x$1" = "xOPENSSL_VERSION_NUMBER"; then
+ cp conftest.$ac_ext osslver.c
+ fi
])
if test -z "$tmp_exp"; then
AS_VAR_SET(ac_HaveDef, no) Use ./buildconf to regenerate then ./configure same way you did before. Check that the result is the same. You should now have a osslver.c file. Try to parse it manually using the same method configure should be using:
The expected output is 0x1000207fL. If not judge from any error messages and step back until you figure it out. |
and so it is ... :-/
Note, however, that is NOT the cmd string from above. Rather, this is:
Exec'ing that against the saved osslver.c
returns
, nothing. |
might be gcc-5 , walk it back like
|
As before
the walk-back
--> So, can certainly see where it's going 'empty'. I'll have to stare it a bit to figure out the expected behavior ... |
The preprocessor output for gcc 4 looks like this: # 87 "osslver.c" 2
[some blank lines]
CURL_DEF_TOKEN 0x1000207fL Yours looks like: # 82 "osslver.c"
CURL_DEF_TOKEN
# 82 "osslver.c" 3 4
0x1000207fL This exact issue is described in GCC 5 porting issues. Try adding the |
adding
appears to cure the config issue
hat's off - nice catch! Given that gcc5's long been in release, and as
should this issue be re-branded as a "port build to gcc5" bug? |
... and I've been using gcc5 on my systems for years without ever having this problem, and I build curl may times every day. What Linux distro and version is this? |
of course it works for you ;-) This is Opensuse Leap
With GCC 5
tracked from the project's dev repo
|
I also have gcc 5.3.1, but looking at my configure output closer it actually says:
|
and with the "-P" added to your CPPFLAGS ... ? |
Yeah, I can fix the script with -P. I guess I just need to make sure the preprocessor actually supports -P first before using it...
|
I pushed a configure fix that detects if cpp -P is necesary, then if cpp -P works and if so, it uses cpp -P when it extracts defined values. Works for me, I hope it works for you too! |
Great, thx. That's a push to master, not backported to curl-7_47_1 release tag, I assume. Expect it in the next release, then? In any case, the "-P" is a good enough workaround. Based on the "These new markers can cause intriguing problems for software not ready to handle them." comment, it looks like the need for "-P" is still cuz the code's GCC4-friendly, not yet GCC5-ready. Should this be planned for additional/other cleanup to, well, be "ready to handle them."? Or is this -P add'n sufficient? |
Well there's not a whole lot of difference actually. I didn't see any other issues. We're not using %a in scanf and other than that it looks like mostly warnings that aren't serious and nothing blocking. Thanks for helping us reproduce this, your info was very thorough. |
Right, this will be included in the pending 7.48.0 release. We normally don't maintain any other branches than just the master branch.
I'm not aware of anything else that needs fixing for gcc5. The -P thing should be enough. |
fyi, remove the "-P" for a gcc6 build edit: that's building branch curl-7_48_0 |
the current script checks if -P is needed and only uses it then |
1- Install OpenSSL 1.1.0f in Debian 8.8 x32:
2- Install nghttp2 3- Problems to install curl 7.54.1 OpenSSL version: opensslv.h CURL Error:
In config.log see:
Can there be a problem with the order of the directories ? |
@dertin don't hijack please open a new issue explaining your problem. It looks like a system directory is included in -L which should not happen. We've seen one or two other reports of that. I doubt curl is at fault but I can look into it. Please attach the config.log to your issue. |
Building curl 7_47_1 on linux64, linking to Openssl 1.0.2g libs, 'configure' reports "fail" @ "checking for OpenSSL headers and library versions matching"
It appears to be non-fatal ...
The text was updated successfully, but these errors were encountered: