Bug #75403 [Opn->Csd]: Curl missing does not give proper error message
Edit report at https://bugs.php.net/bug.php?id=75403&edit=1
ID: 75403
Updated by: cmb@php.net
Reported by: iggyvolz at gmail dot com
Summary: Curl missing does not give proper error message
-Status: Open
+Status: Closed
Type: Bug
Package: Compile Failure
Operating System: Windows 10 (WSL Ubuntu)
PHP Version: 7.1.10
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Closing, since the PR has been merged.
Previous Comments:
------------------------------------------------------------------------
[2017-10-19 00:28:16] 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
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75403&edit=1
Thread (2 messages)