Bug #77342 [Com]: php-src does not compile

From: Date: Sat, 16 Mar 2019 22:21:27 +0000
Subject: Bug #77342 [Com]: php-src does not compile
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-220011@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77342&edit=1

 ID:                 77342
 Comment by:         petk@php.net
 Reported by:        carusogabriel@php.net
 Summary:            php-src does not compile
 Status:             Open
 Type:               Bug
 Package:            Compile Failure
 Operating System:   MacOS 10.14.2 (18C54)
 PHP Version:        master-Git-2018-12-23 (Git)
 Block user comment: N
 Private report:     N

 New Comment:

I think Mac has now updated versions of these files... Try also this:
  sudo installer -pkg
/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

and then:
  xcode-select --install

also run Software updates to have latest and greatest versions installed.

Then it should go through ok.

Solution found here:
https://donatstudios.com/MojaveMissingHeaderFiles

Please report back if this helps.


Previous Comments:
------------------------------------------------------------------------
[2019-01-16 11:15:03] petk@php.net

It's mac, not PHP. Case is that this system is locked to its own packages and versions, yet to
install a custom package, for example, via brew, it doesn't upgrade the system's sqlite
package but installs its own under a special location - something like /usr/local/opt/sqlite

So, after inspecting particular package:

brew info sqlite3

we notice info where the package is installed and the command to configure PHP (at the time of this
writing) becomes:

./configure --with-sqlite3=/usr/local/opt/sqlite --without-iconv
--with-pdo-sqlite=/usr/local/opt/sqlite

(yes, with the current moving to so called pkg-config there will be quite a lot of adjustments still
required on some systems because I'm not sure that it will recognize all packages without
passing environment variables.

I'm assuming, but in your case it might be that php is trying to build against the
system's sqlite3 version which is either outdated, or something else wrong with it, so
you'll need to similarly point to the brew sqlite3 package.

P.S: Probably something similar goes for the iconv library...

------------------------------------------------------------------------
[2018-12-24 15:27:44] carusogabriel@php.net

But using both --without-sqlite3 --without-pdo-sqlite I could make it ran :)

------------------------------------------------------------------------
[2018-12-24 15:20:37] carusogabriel@php.net

Even using the --without-sqlite3 flag, I still get this error.

------------------------------------------------------------------------
[2018-12-23 17:40:33] carusogabriel@php.net

I`ve installed SQLite using this article: https://tableplus.io/blog/2018/08/download-install-sqlite-for-mac-osx-in-5-minutes.html

------------------------------------------------------------------------
[2018-12-23 17:35:00] cmb@php.net

Interesting!  See <http://news.php.net/php.qa/68282>.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=77342


--
Edit this bug report at https://bugs.php.net/bug.php?id=77342&edit=1


Thread (11 messages)

« previous php.bugs (#220011) next »