CentOS 7 Compiler issues

Posted by: mstauber Category: Development

CentOS 7 is finally showing it's age.

PHP-8.2.0 is currently in Beta2 and ramping up for a release of PHP-8.2.0 in the subsequent weeks. These days I used a lapse in my work schedule to try to roll up test PKGs of PHP-8.0.2beta2 on BlueOnyx 5210R and 5209R to validate if it would build and what changes (if any) I would need to make to the automated build procedure for PHP packages on both platforms.

It turned out that no changes were needed on BlueOnyx 5210R. But on the CentOS 7 based BlueOnyx 5209R the compilation of PHP-8.2 blew up right in my face during the compiler run due to a ...

reallocarray.c undefined reference to `__builtin_mul_overflow'

... error. After a bit of digging I found clues that parts of the PHP-8.2 sources are no longer compatible with the GCC 4.8.5 that ships with CentOS 7. At least GCC 5.2 might be needed to compile it. On AlmaLinux 8 and BlueOnyx 5210R we do have GCC 8.5.0, so that's quite a bit of a difference and explains why it worked there without a hitch.

Compiler upgrade on CentOS 7? On CentOS 4/5/6 this already was no fun. So before trying it, I looked around and found out that the CentOS Special Interest Group had already done it. For obvious reasons. They have a YUM repository with different sets of side-loading GCC's and there is a GCC 8.3.1 in it. So I installed that. threw a few conditionals into our PHP build script and that was that: PHP-8.2.0beta now built just fine as well.

Now this is certainly something we'll see more often now until CentOS 7 goes EOL: It's starting to show it's age and keeping it current requires just a bit more effort.


Return
General
Aug 13, 2022 Category: Development Posted by: mstauber
Previous page: API Documentation Next page: Downloads