-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Migrate from PHP v7.3.6 to v8.3.8 on Solaris 10 from source (errors) #15381
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
Comments
Hi and thanks for your report. That is quite the jump ! |
Thanks for the quick response @devnexen! We are using gcc (GCC) 4.7.2. We can try v8.1 if you think that will help, but obviously that will only give us a shorter period of active support. Module versions are as follows: ZLIB - 1.2.0.4 Let me know if you need anything else. |
The getrandom issue could be eventually fixed with getrandom symbol check (AFAIK getrandom, as a function, is only a "concern" on linux so no need to change the existing logic for this one). However for the zlib issue, it is delicate on solaris, e.g. a 64 bits os running 32 bits binaries by default also 1.2.0.4 seems really old (2003). As far as I know, it would need a proper 64 bits version of zlib/having large file support enabled (i.e. |
OK thanks. These are the current CFLAGS... -std=gnu99 -fPIC -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -L/cbs/oracle/product/ATMclnt32a/lib -R/cbs/oracle/product/ATMclnt32a/ -L/usr/lib -R/usr/lib |
Maybe that s why the linkage issue with zlib, large file are enabled in the php build thus expecting gzseek64 instead of gzseek but isn't in the zlib side. But that s a hypothesis, I do not know that much zlib :) Anyhow, I ll propose a fix for the random extension shortly. |
If I remember correctly, PHP requires at least OpenSSL 1.1 for a couple of years. |
gcc nor clang provides a constant to distinguish illumos and solaris not the system provides a kernel version stamp like the BSD. thus, we simply check the symbol and remaing purposely conservative in the existing logic, using it only for solaris to avoid unexpected breakages for other systems. would need a different fix for higher branches.
Yes cmb69 gives a good point. If possible, if I were in your shoes, I would likely compile dependencies (openssl, zlib, ...) from source. Building in such old environments will become increasingly difficult over time I m afraid. |
Thanks. Should we be moving all dependencies to the most up to date version? Or will that likely not support Solaris 10? We currently don't use a package manager and all is done from source. |
Not necessarily the last versions (and some dependencies might just not compile anyway) but the best solaris 10 can support should work in theory. |
To fix part of GH-15381. gcc nor clang provides a constant to distinguish illumos and solaris not the system provides a kernel version stamp like the BSD. thus, we simply check the symbol and remaing purposely conservative in the existing logic, using it only for solaris to avoid unexpected breakages for other systems. would need a different fix for higher branches. Close GH-15390
To fix part of GH-15381. gcc nor clang provides a constant to distinguish illumos and solaris not the system provides a kernel version stamp like the BSD. thus, we simply check the symbol and remaing purposely conservative in the existing logic, using it only for solaris to avoid unexpected breakages for other systems. would need a different fix for higher branches. Close GH-15390
OK great - thanks. I will use unixpackages.com to verify the latest dependencies for Sol 10 and download if required. Is there anything else you would suggest I do? I will give an early release of PHP v8 a try too. |
Nothing for the moment let us know once you hit the first wall. Cheers. |
Hi @devnexen, We have included config.m4, random.c and csprng.c int the /ext/random directory and tried again... We get the following error... ld: fatal: symbol 'php_random_bytes' is multiply-defined: We still see the zlib error, with a 32 bit v1.2.11. We have configured without zlib for the time being and are unable to use a 64 bit module without a lot of legacy errors. Many thanks. |
it might be best if you start fresh with the git repo for example, branch PHP-8.3. |
OK thanks @devnexen. We will try that shortly. Thanks. |
Hi @devnexen, We ran into lots of errors with bison and re2c versions. We also noticed that the git repo branch had a lot less Zend modules than from the PHP site, which caused issues. We are now struggling to get autoconf to work to create the configure script. This script is supplied with the modules on the PHP site. We plan on trying PHP v8.0 tomorrow (both git repo and PHP site). |
Note that indeed configure is not present on the git repo, ./buildconf needs to be called prior.
|
Thanks @devnexen, We will try the buildconf shortly. We have reverted to v8.0 and it gets a lot further. We are getting the following error... Undefined first referenced Any ideas? |
Do you mean php_register_internal_extensions? If so, your build is likely broken; you need to call |
Yes sorry. This was using the PHP v8.0 website software. The configure command was already supplied. |
Ah, right. |
Nice to hear ! is there anything else to explore or can we close it ? |
We can close it, thanks. |
Hi Gents, Am I okay to use this thread to ask for help? Although we have got one server working completely, we are still seeing the We have recompiled using gcc 4.7.2 and then redone PHP 8.1.29 but no luck. Is there anything that you can suggest to help? It is the last ticket before the project is complete. |
are php/apache dependencies also compiled with gcc 4.7.2 ? |
We have this in the PHP config.log...
And this in the Apache config.log...
This is our error when we start Apache...
|
is the output of this command the same at your other server ? |
Yes - they are identical and the
|
This is on the working server...
Not sure how to tell which one it uses. It looks to be the old one looking this...
|
Seems to be the issue indeed. What about cleaning the php build (ie make distclean). And setting the following : export LDFLAGS="-L/usr/local/gcc4/lib -Wl,-rpath,/usr/local/gcc4/lib <your other usual settings>" |
Sorry - Garnet is the working server. So both servers are looking at the old version of libgcc_s.so_1 according to the |
Is there LD_LIBRARY_PATH set in the working server ? |
I have just spotted that. Working server..
Problematic server ...
I can see that we set the For info, we haven't upgraded the working Apache (hence why it is still working). |
Great thanks - the However, on our final server (Production), we use SSL inside Apache. After re-compiling Apache 2.4.41 with GCC 4.7.2 and recompiling PHP 8.1.29 again, we get the following error when starting Apache...
This is from the PHP info...
We haven't changed anything else, and our backup server works (using PHP 7.3.6). Although I spotted this on the working server...
Beer in the post if we manage to sort this last one out. |
There might be more than once SSL installed in the server, maybe when you compiled apache the ssl module was supposed to be linked to version B but then load older version A.
does not look right. |
So I can see that the dependencies
They were just part of an OS patch, maybe rename them and try a recompile? |
Are all (custom) dependencies located in /usr/local or does it draw also in /usr ? |
I can't see anything of interest in |
would be helpful to review with which flags apache had been built, CFLAGS, LDFLAGS, configure step ... maybe something is missing (e.g. rpath) |
We have got passed this error because our path was incorrect (line 128)...
However, it looks like something is not quite right in PHP 8.1.29 to run the SSL functionality...
Do you know what module EVP_md2 is taken from? |
I can see this...
|
Description
The following code:
$ ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-zlib=yes --with-openssl --with-iconv=/usr/local/lib --with-openssl-dir=/usr/local/ssl --enable-shared --with-oci8=shared,/cbs/oracle/product/ATMclnt32a --enable-sigchild --enable-sockets --without-pcre-jit --without-sqlite3 --without-pdo-sqlite --disable-ipv6 --with-pear=/usr/local/lib/php
We are using Solaris 10 with Apache and Oracle SQL.
Resulted in this output:
Undefined first referenced
symbol in file
gzseek64 ext/zlib/zlib_fopen_wrapper.o
getrandom ext_random/csprng.o
php_register_internal_entensions main/main.o
ld: fatal: symbol referencing errors. No output written to sapi/cli/php
Makefile:286: recipe for target 'sapi/cli/php' failed
We then used the same environment to build v7.3.6 and that was successful, using the same parameters. Are there any module versions that are no longer supported for PHP v8? We are using GCC v4.
Many thanks.
PHP Version
PHP 8.3.8
Operating System
Solaris 10
The text was updated successfully, but these errors were encountered: