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

From: Date: Tue, 09 Apr 2019 00:40:04 +0000
Subject: Bug #77342 [Com]: php-src does not compile
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-220374@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: gabrielrcouto at gmail dot com 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 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. Previous Comments: ------------------------------------------------------------------------ [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 :) ------------------------------------------------------------------------ [2018-12-24 15:20:37] carusogabriel@php.net Even using the --without-sqlite3 flag, I still get this error. ------------------------------------------------------------------------ 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

« previous php.bugs (#220374) next »