Bug #78360 [PATCH]: clang build fails on Travis CI on gmp
Edit report at https://bugs.php.net/bug.php?id=78360&edit=1
ID: 78360
Patch added by: stas@php.net
Reported by: stas@php.net
Summary: clang build fails on Travis CI on gmp
Status: Open
Type: Bug
Package: Compile Failure
Operating System: Linux
PHP Version: master-Git-2019-08-01 (Git)
Block user comment: N
Private report: N
New Comment:
The following pull request has been associated:
Patch Name: Improvement for bug #78360 - also try host name
On GitHub: https://github.com/php/php-src/pull/4488
Patch: https://github.com/php/php-src/pull/4488.patch
Previous Comments:
------------------------------------------------------------------------
[2019-08-01 07:06:44] stas@php.net
Related To: Bug #69993
------------------------------------------------------------------------
[2019-08-01 07:05:34] stas@php.net
Description:
------------
Currently, setting compiler to clang on Travis CI makes the build fail by not finding gmp.h. This is
because gmp.h is stored in /usr/include/x86_64-linux-gnu/gmp.h on ubuntu, which is handled by this
code in ext/gmp/config.m4:
MACHINE_INCLUDES=$($CC -dumpmachine)
for i in $PHP_GMP /usr/local /usr; do
test -f $i/include/gmp.h && GMP_DIR=$i && break
test -f $i/include/$MACHINE_INCLUDES/gmp.h && GMP_DIR=$i && break
done
The problem here is that clang produces not x86_64-linux-gnu but x86_64-unknown-linux-gnu. Which
leads it to missing the file.
https://wiki.debian.org/Multiarch/Tuples
suggests there's option -print-multiarch but while gcc supports it, looks like clang does not.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78360&edit=1
Thread (3 messages)