-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8.3.0 build fails on centos 8 with mbstring related error #12774
Comments
This is actually this issue: https://sourceware.org/bugzilla/show_bug.cgi?id=23169 |
I am going to close this as this is not a bug in PHP. |
Remove binutils from Centos 8 stream and remove them from https://ftp.gnu.org/gnu/binutils/ Compile and install the latest source code from Zhongla. This will solve this problem. |
Notice: I'm used to build all PHP versions (up to 8.3) on EL-7, EL-8 and EL-9, and never encounter this issue. If you need recent versions, simply use https://rpms.remirepo.net/wizard/ |
So all users of Centos8 / Almalinux 8 / Rockylinux 8 should just resign to not using PHP 8.3 and newer because of a compiler bug that you are very well capable of bypassing so far much easier than an entire family of users removing an integral part of the original OS with a plethora of unexpected consequences ? |
Why should I spend my free time in the weekend providing a workaround for an oerating system that the company is dropping support for, and shipping the operating system with a known compiler bug? Makes no sense to me. In any case, feel free to provide a PR. |
Or, hear me out, they discover here default binutils is too old in their EOL os, so they install and enable newer devtoolset with recent binutils and happily build php 8.3 using that. |
In Almalinux 8 it is possible to add newer gcc for example by |
Thank you jirikmik, you saved me a lot of headaches. To follow up with that, so you don't have to look it up - after installing the toolset you can use this command to run make:
|
I wouldn't recommend installing a newer gcc just like that. I did and it turned up braking other things that were dynamically linked to the older library but were being given the new one even when installed purposefully with this in mind and even when reinstalled/recompiled with the newer gcc .. it became hell.
But hey.. maybe it was just me and some setting I mishandled or the fact that not all of the software is on the latests available versions (because we need it to be like that due to some old code still working on older versions and because Centos itself does not work well with the latest versions)
Yahoo Mail: Search, Organize, Conquer
On Thu, Mar 28, 2024 at 3:11 PM, Steven ***@***.***> wrote:
In Almalinux 8 it is possible to add newer gcc for example by dnf install gcc-toolset-13 and build PHP 8.3 with mbstring against it.
Thank you jirikmik, you saved me a lot of headaches.
To follow up with that, so you don't have to look it up - after installing the toolset you can use this command to run make:
scl enable gcc-toolset-13 make
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
Using the toolset doesn't replace the GCC already installed, it sets up its own environment. While I am still testing things, the compile went through without problems (PHP 8.3.4 on AlmaLinux 8.9) and I am not getting any issues so far after compiling without specifying the GCC directly from the compiled php binary. For others doing research on getting past this issue and wishing to do some research, here are a few links: More details about Software Collections The toolset jirikmik referred to: |
Workaround if you don't want to install gcc-toolset-* : configure with --enable-mbstring=shared |
Thank you @gdegoulet .. this was by far the best and easiest option to make it work. |
- Modified php building for buggy old toolchains php/php-src#12774 https://sourceware.org/bugzilla/show_bug.cgi?id=23169 - Patched php configure script for ubuntu-16 old gcc version 5 The check in php/build/php.m4 is not sufficient to guard for gcc 5 on ubuntu 16 Ticket: ENT-12140 Changelog: none.
- Modified php building for buggy old toolchains php/php-src#12774 https://sourceware.org/bugzilla/show_bug.cgi?id=23169 - Patched php configure script for ubuntu-16 old gcc version 5 The check in php/build/php.m4 is not sufficient to guard for gcc 5 on ubuntu 16 Ticket: ENT-12140 Changelog: none.
Description
PHP 8.3.0 build fails on centos 8 with the error:
Original failure discovered during 8.3.0 build at
php-build/php-build#759
Recreated locally in centos:8 docker image running configure and make directly. Full build log output available here https://gist.github.com/Xerkus/185b0a566abe8acee620b9a0ae84468d
Used configure as follows, no env variables used:
This issue looks similar to me #11603
PHP Version
8.3.0
Operating System
Centos 8
The text was updated successfully, but these errors were encountered: