php updates fail (8.2.12 to 8.2.12 and 8.1.25 to 8.1.26) [Solved]

petersconsult

Verified User
Joined
Sep 10, 2021
Messages
79
Hello,
i am a little puzzled because building the updated php versions fails with thousands of lines like this:
Code:
/usr/bin/ld: sapi/fpm/fpm/fpm_unix.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
and ending with this:
Code:
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make: *** [Makefile:331: sapi/fpm/php-fpm] Error 1
doPhp_build: failed to compile '/usr/local/directadmin/custombuild/cache/php-8.2.13.tar.gz' inside '/usr/local/directadmin/custombuild/tmp/tmp.N4MgmMs5iu.php-8.2.13.tar.gz'

i'm not quite sure what to do..
Any help would be greatly appreciated (i can provide the full log file, but it's about 3.3MB)

My server is AlmaLinux 8 with LiteSpeed..

Thank You!
 
Maybe its an good start with deleting absolute files in usr/local (backup first !)
Removing absolute or old install made by custombuild in the past gave me lot of build problems, after cleaning them make worked as it should

Code:
cd /usr/local/directadmin/custombuild
./build update
./build versions
./build list_removals
./build remove_items
./build remove_old_local libiconv
./build all d
 
Thank you so much to both of you!

You were right @kristian

i had some custom configure files; there are some new lines that need to be added at the top of these custom configure files (right after the first line):
Code:
# Add stack canaries
export CFLAGS="${CFLAGS} -fstack-protector-strong"

# Fortify core stdlib functions
export CFLAGS="${CFLAGS} -D_FORTIFY_SOURCE=1 -O1"

Adding these lines to the top worked great!
Thank You!
 
Last edited:
(right after the first line):
Do you still need that? As of version 1.657 this will be a default (and some other protections):
Binaries will have stack canary protections. This makes it harder to convert a stack overflow bug to an exploit.

Edit: Maybe due to being it build in by default right now this maybe causes your issue.
 
hello @Richard G,
i'm sorry, i'm not sure what you're asking; do i still need the lines quoted above, or do i still need the custom config files for php?
i'm trying to determine right now if i can do without the custom config files..
As for the lines quoted above, the fact that they were missing was what prevented the php compile..

EDIT:
i used to need the custom config files because i needed to add the following:
Code:
    --with-sodium=/usr/local \
    --with-tidy \
    --enable-pcntl \
    --with-bz2 \
    --with-pspell \
    --with-imap-ssl \
    --with-ldap=/usr \
    --with-ldap-sasl=/usr

Thank You!
 
Last edited:
Back
Top