Reputation: 1
I have trouble compiling php 8.2.16 on Mac OS Ventura 13.6.4. The configure script does not recognize the GNU libiconv installed with Homebrew in /usr/local/opt/libiconv. I succeeded to compile and install php 8.2.14 as a CGI module on Mac OS Ventura 13.6.3 about a month ago. At the time the DIR for libiconv was accepted via with-iconv=DIR, even though the default had changed to include iconv. Now this parameter is not recognized any more, and neither seems to be the case for my environmental variables where I point to the important locations. So I get the result ”configure: error: iconv does not support errno” (which might be applicable to the Iconv v 1.11 shipped with the system). The installation of the GNU libiconv is ignored completely.
I have tried some different workarounds: ”env LIBS=-liconv .configure ...”, and ” LDFLAGS="-L/usr/local/opt/libiconv/lib -liconv $LDFLAGS" ./configure ...”. I have tried to generate a new configure script with autoconf, I even edited the configure script and put the path in there with no luck. I have no clue how to get the script to accept the path to the GNU libiconv and have got stuck there. I'm not a programmer, so maybe I have missed something obvious. I haven't found any solution when searched here and elsewhere. The output is this:
checking for iconv support... yes checking for iconv... no checking for libiconv... yes checking if iconv is glibc's... no checking if using GNU libiconv... no checking if iconv is Konstantin Chuguev's... no checking if using IBM iconv... no checking if iconv supports errno... no configure: error: iconv does not support errno
Exploring the system results in this: which iconv /usr/local/opt/libiconv/bin/iconv whereis iconv iconv: /usr/bin/iconv /usr/local/opt/libiconv/share/man/man1/iconv.1 This seems a bit contradictory.
Thankful for any guidance in the right direction.
Upvotes: 0
Views: 196
Reputation: 1
If anyone else having the same problem finds this: I solved the problem with Iconv by adding a LD FLAG before running the configure command, like this:
export LDFLAGS="-L/usr/local/opt/libiconv/lib"
./configure ...
Through this I was able to compile php 8.3.13 on Mac OS Ventura 13.7.
Upvotes: 0