|  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: Assigned: nikic (profile)
Status: Closed Package: Compile Failure
PHP Version: master-Git-2019-08-01 (Git) OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
24 - 6 = ?
Subscribe to this entry?

 [2019-08-01 07:05 UTC]
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

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. suggests there's option -print-multiarch but while gcc supports it, looks like clang does not. 


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-08-01 08:14 UTC]
The following pull request has been associated:

Patch Name: Improvement for bug #78360 - also try host name
On GitHub:
 [2019-09-07 19:50 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
 [2019-09-07 19:50 UTC]
Has been fixed by
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Oct 21 09:03:34 2021 UTC