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

From: Date: Mon, 10 Aug 2020 11:07:49 +0000
Subject: Bug #77342 [Opn]: php-src does not compile
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-228488@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
 Updated by:         nikic@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:

Did this issue get resolved in the meantime?


Previous Comments:
------------------------------------------------------------------------
[2019-04-09 00:40:04] gabrielrcouto at gmail dot com

I had the same problem and solved with these steps:

- brew install sqlite3
- download "Precompiled Binaries for Mac OS X (x86)" and "sqlite-amalgamation"
from https://www.sqlite.org/download.html
- extract files from "Precompiled Binaries for Mac OS X (x86)" to
"/usr/local/opt/sqlite/bin/" (yes, you'll replace the binary installed by brew)
- extract .h files from "sqlite-amalgamation" to
"/usr/local/opt/sqlite/include/"
- add 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' to ~/.zshrc or ~/.bashrc

If you run "which sqlite3", the answer need to be
"/usr/local/opt/sqlite/bin/sqlite3", otherwise maybe you have another sqlite3 instalation
on your machine.

------------------------------------------------------------------------
[2019-03-17 19:13:47] carusogabriel@php.net

Hey Peter

I'm still getting some errors with the SQLite extension, but I'll use your previous
comment to try to solve it and maybe mark this bug as solved.

Thanks for the support.

------------------------------------------------------------------------
[2019-03-16 22:21:27] petk@php.net

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.

------------------------------------------------------------------------
[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 :)

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


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 (#228488) next »