Bug #75403 [NEW]: Curl missing does not give proper error message
From: iggyvolz at gmail dot com
Operating system: Windows 10 (WSL Ubuntu)
PHP version: 7.1.10
Package: Compile Failure
Bug Type: Bug
Bug description:Curl missing does not give proper error message
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 bug report at https://bugs.php.net/bug.php?id=75403&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75403&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75403&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75403&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75403&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75403&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75403&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75403&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75403&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75403&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75403&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75403&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75403&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75403&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75403&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75403&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75403&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75403&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75403&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75403&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75403&r=mysqlcfg
Thread (2 messages)
- iggyvolz at gmail dot com