php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78360 clang build fails on Travis CI on gmp
Submitted: 2019-08-01 07:05 UTC Modified: 2019-09-07 19:50 UTC
From: stas@php.net Assigned: nikic (profile)
Status: Closed Package: Compile Failure
PHP Version: master-Git-2019-08-01 (Git) OS: Linux
Private report: No CVE-ID: None
 [2019-08-01 07:05 UTC] 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. 


Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-08-01 08:14 UTC] stas@php.net
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
 [2019-09-07 19:50 UTC] nikic@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
 [2019-09-07 19:50 UTC] nikic@php.net
Has been fixed by https://github.com/php/php-src/pull/4646.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 10:01:22 2019 UTC