php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47153 Problem in config.m4
Submitted: 2009-01-19 20:45 UTC Modified: 2009-01-28 01:00 UTC
From: mmarkus69 at hotmail dot com Assigned:
Status: No Feedback Package: cURL related
PHP Version: 5.2.8 OS: Ubuntu 8.04
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mmarkus69 at hotmail dot com
New email:
PHP Version: OS:

 

 [2009-01-19 20:45 UTC] mmarkus69 at hotmail dot com
Description:
------------
When compiling using --with-curl, the following error appears:

php-5.2.8/ext/curl/interface.c:68:6: warning: #warning "libcurl was compiled with GnuTLS support, but configure could not find " "gcrypt.h; thus no SSL crypto locking callbacks will be set, which may " "cause random crashes on SSL requests"

However, configure does report that it has found gcrypt.h when it runs.

The problem seems to be in ext/curl/config.m4 since it never defines HAVE_GCRYPT_H after checking for the aforementioned header file. This then causes the warning in interface.c which does check that HAVE_GCRYPT_H is defined.

A similar problem seems to occur with HAVE_OPENSSL_CRYPTO_H although I have not investigated the situation in depth.

Proposed solution (in the form of a diff patch):

--- ext/curl/config.m4	2008-11-07 15:18:45.000000000 -0600
+++ config.m4	2009-01-19 13:59:57.000000000 -0600
@@ -98,8 +98,9 @@
     }
    ], [
     AC_MSG_RESULT([yes])
+    AC_DEFINE([HAVE_CURL_GNUTLS], [1], [Have cURL with GnuTLS support])
     AC_CHECK_HEADER([gcrypt.h], [
-     AC_DEFINE([HAVE_CURL_GNUTLS], [1], [Have cURL with GnuTLS support])
+     AC_DEFINE([HAVE_GCRYPT_H], [1], [Found gcrypt.h])
     ])
    ], [
     AC_MSG_RESULT([no])



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-20 01:03 UTC] jani@php.net
So what did you do wrong? The same configure works fine for me on 
several installation. Did you go and compile curl yourself? I bet you 
have 2 (or more) installations there that conflict which each other..
 [2009-01-20 01:56 UTC] mmarkus69 at hotmail dot com
apt-get -y install libcurl4-gnutls-dev

Anyway, this is a logical error in interface.c that falls under the heading:

/* {{{ cruft for thread safe SSL crypto locks */

Thus, you need to compile a thread-safe version (zts) of PHP to see the warning. Here are the options that I used:

	./configure \
        --disable-cli \
        --enable-embed=static \
        --disable-cgi \
        --disable-ipv6 \
        --enable-maintainer-zts \
        --disable-shared \
        --enable-static \
        --with-config-file-path="." \
        --with-zlib \
        --with-curl \
        --without-pear \
        --with-tsrm-pthreads

Let me know if you still have problems replicating this issue and thanks for taking the time to look into it.
 [2009-01-28 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2009-10-02 01:41 UTC] galtgendo at o2 dot pl
Perhaps (just a guess), reporter run autoreconf.
With a fairly recent autoconf, certain assumption of
this macro is incorrect:
AC_CHECK_HEADER (as opposed to AC_CHECK_HEADERS)
does NOT define HAVE_HEADER_H for the header it checks.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun May 31 05:01:24 2020 UTC