php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75403 Curl missing does not give proper error message
Submitted: 2017-10-19 00:28 UTC Modified: 2017-10-19 12:10 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: iggyvolz at gmail dot com Assigned: cmb (profile)
Status: Closed Package: Compile Failure
PHP Version: 7.1.10 OS: Windows 10 (WSL Ubuntu)
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: iggyvolz at gmail dot com
New email:
PHP Version: OS:

 

 [2017-10-19 00:28 UTC] iggyvolz at gmail dot com
Description:
------------
Hello,

I just downloaded the Windows 10 Fall Creator's Update, which moved WSL (Windows Subsystem for Linux) to its own application, thus resetting the filesystem.  I immediately proceeded to download PHP and build it, but I received a cryptic error message on ./configure (See Actual result).  It turns out that I was compiling with --enable-curl, but I had forgotten to install curl on my new system.  Compiling without --enable-curl worked fine.

After further inspection, the data passed to the as_fn_error function is "please reinstall the libcurl distribution", instead of a number as expected. The source of the error within the configure file is the following lines:
  if test -z "$CURL_DIR"; then
    as_fn_error please reinstall the libcurl distribution -
    easy.h should be in <curl-dir>/include/curl/ "Could not find cURL" "$LINENO" 5
  fi

Which comes from these lines in ext/curl/config.m4 https://github.com/php/php-src/blob/ae5542d807056cfe415b4c07045f923b6855e8d1/ext/curl/config.m4#L63

I have submitted a patch which fixes the problem by adding a dnl tag to the end of the line, and deleting the additional indentation on the next line, however this breaks indentation.  Alternatively, the error message could be placed on one line.

Test script:
---------------
$ ./configure --with-curl

Expected result:
----------------
checking for cURL support... yes
checking for pkg-config... /usr/bin/pkg-config
checking for libcurl.pc... using default path
checking for cURL 7.10.5 or greater... configure: error: cURL version 7.10.5 or later is required to compile php with cURL support

Actual result:
--------------
checking for cURL support... yes
checking for cURL in default path... not found
checking for cURL in multiarch path... not found
./configure: line 410: test: please: integer expression expected
configure: error: reinstall
./configure: line 299: return: please: numeric argument required
./configure: line 309: exit: please: numeric argument required

Patches

curlconfig.diff (last revision 2017-10-19 00:28 UTC by iggyvolz at gmail dot com)

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-10-19 12:10 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2017-10-19 12:10 UTC] cmb@php.net
Closing, since the PR has been merged.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Dec 04 20:01:30 2024 UTC