PHP 8.3.8 build error "recompile with -fPIE and relink with -pie" on AlmaLinux

[email protected] (Shailesh Humbad)
Newsgroups php.install
Message-ID <[email protected]>
I am trying to build a custom configured php-8.3.8 (pulled from Git) on 
AlmaLinux 8.10 (formerly CentOS, RHEL-compatible).

I have built PHP 7.4.x and earlier builds successfully in the past, and 
am trying to make the jump to 8.3.x.

I am stuck on the following error:

/bin/sh /temp/php-src-php-8.3.8/libtool --silent --preserve-dup-deps 
--tag=CC --mode=link cc -export-dynamic -fno-common -Wformat-truncation 
-Wlogical-op -Wduplicated-cond -Wno-clobbered -Wall -Wextra 
-Wno-unused-parameter -Wno-sign-compare -g -O2 -ffp-contract=off 
-fvisibility=hidden -pthread -Wimplicit-fallthrough=1 -DZTS 
-DZEND_SIGNALS -DZEND_MAX_EXECUTION_TIMERS   
-Wl,-zcommon-page-size=2097152 -Wl,-zmax-page-size=2097152 -no-pie 
-no-pie  ext/date/php_date.o /...OMMITTED FOR BREVITY.../ 
sapi/cli/ps_title.o sapi/cli/php_cli_process_title.o -ltidy -lresolv 
-lrt -lutil -lrt -lm -ldl -lpthread -lxml2 -lssl -lcrypto -lsqlite3 -lz 
-lcurl -lxml2 -lssl -lcrypto -lz -lpng16 -lz -ljpeg -lfreetype -lonig 
-lsqlite3 -lxml2 -lxml2 -lxml2 -lxml2 -lxml2 -lzip -lz -lssl -lcrypto 
-lrt -o sapi/cli/php
/usr/bin/ld: dynamic STT_GNU_IFUNC symbol `mb_wchar_to_utf16le' with 
pointer equality in `ext/mbstring/libmbfl/filters/mbfilter_utf16.o' can 
not be used when making an executable; recompile with -fPIE and relink 
with -pie
collect2: error: ld returned 1 exit status
make: *** [Makefile:297: sapi/cli/php] Error 1


I see the "-no-pie" option in the command line above, and the error 
occurs even if I set the LDFLAGS=-no-pie environment variable per the 
documentation here:
https://gcc.gnu.org/onlinedocs/gnat_ugn/Position-Independent-Executable-PIE-Enabled-by-Default-on-Linux.html

However, I still can not get past the error.  Can anyone provide any 
suggestions?

Regards,
Shailesh
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.