Building PHP-7.3 and PHP-7.4 on Slackware-14.2
Can anyone please help me with build instructions / scripts to build PHP-7.3.x and PHP-7.4.x respectively on Slackware-14.2 ?
Thank you. |
Quote:
So you will have to update to -current for PHP 7, it has 7.4.3 already built. |
I have built and deployed PHP-7.x beginning from PHP-7.1 through PHP-7.4.2, including some 7.3 updates, on Slackware 14.2 (both 32 and 64 bit), although I have not kept separate build notes for 7.3.x and 7.4.x.
I began with the Slackbuild Patrick posted to your previous thread, modified options to suit my uses, installed a few required packages as needed to resolve build errors, and have had no problems. In upgrading since the 7.1 build I have had to build and install the following, but not sure which was for a specific PHP version: alpine (Not sure where I got Slackbuild, try -current) libsodium (get it from SBo) oniguruma (SBo) pcre2 (Built using Slackbuild from -current) libedit (From -current) So, to summarize: 1. Get Slackbuild from the link provided by Patrick included above 2. Install above dependencies, possibly others, as indicated by build errors and READMEs Hope this is enough to get you started, ask here if you encounter anything you cannot resolve! And perhaps others with more specific knowledge of the requirements will chime in here too. Good luck! (Updated to correct original Slackbuild source) ADDITIONAL COMMENTS: Sorry for posting this piecemeal, that kind of day... I got around to my build system and looked into how I have actually been doing this instead of reliance on snapshots from memory... At 7.2.11 I did indeed switch to using the Slackbuild from -current with the following important change (also PHP >7.2 requires libsodium): Code:
--with-readline Code:
#ALPINE=2.21 I have made a few other changes to the build options in the Slackbuild, but nothing noteworthy that I am aware of. The main point I would make is that PHP up to 7.4.2 builds and works easily on Slackware 14.2 with only a few added dependencies and simple tweaking of the Slackbuild from -current. Just look at the config.log and build errors to sort out the necessary additions and changes - no secret sauce to add that I have encountered! |
I built php-7.3.14 and 7.4.2 on Slackware-14.2 with no extra libraries needed. (Going to upgrade to 7.3.15 and 7.4.3 soon.)
It all depends on what PHP extensions you need. If you are packaging PHP for other people to use, like Slackware and Slackbuilds does, you probably want as many extensions as possible, to give end users a wide range. That's going to be hard, and you will need extra libraries and dependencies. But if you are building it for yourself, for your own server, you should have a good idea of what extensions you need. Building PHP with only the extensions you need cuts way down on the dependencies. And remember, it is possible to build and add extensions later without recompiling all of PHP. The only change I had to make to build php-7.3 and php-7.4 versus older versions was to add --with-pic to the configure command. Otherwise, the final link fails with "read-only segment has dynamic IFUNC relocations; recompile with -fPIC". Don't know what that really means, but the fix worked. |
Thank you very much.
I will try to document my progress (in the hope it will also help others). |
Trying to build php-7.3.17 using the php-7.4 build script from -current:
I preferred to install dependencies rather then configure them out. It builds without oniguruma as a requirement, one may add it from SBo at your desire. @astrogeek: thank you very much for your recommendations. |
1 Attachment(s)
I use this method and everything is working well
https://www.linuxquestions.org/quest...6/#post6080766 |
Trying to build PHP-7.4 today on Slackware-14.2 got a lot easier.
Dependencies:
They can be build using either SBo or build scripts from -current in L section. Install each library. You will need alpine version 2.24 (also found in -current) in N section, package source only. You should check /usr/local/lib(64)? for directory named c-client. If present, remove it before building. (not removing it will result in errors if it is from an older alpine) Build PHP-7.4 using build script from -current. Stop Apache: /etc/rc.d/rc.httpd stop Install new PHP package. Overwrite (or merge) /etc/php.ini.new -> /etc/php.ini Start Apache: /etc/rc.d/rc.httpd start Check /var/log/httpd/error_log to confirm PHP module load was successful. |
Apline ldap failure during php-7.4 on slackware 14.2
Trying to use nextcloud, hence landed here to upgrade php on 14.2 slack.
Checked/got all dependencies, as mentioned by @andrixnet got alpine 2.4 and php-7.4 from -current. But both alpine and hence php builds fail due to Code:
|
are you using wrong package for ldap-client?
The error message file in wrong format usually happened when you install a package for different architecture |
Initially I thought it's because "usr/lib" and "usr/lib64" but doesn't look like it.
Code:
bash-4.3$ cd ../lib64/ Code:
|
Quote:
My build experience is on x64 machine, all libraries are in lib64 directories. lib{$LIBDIRSUFFIX} where $LIBDIRSUFFIX=64 (detected in an if block depending on $ARCH). Do check out your architecture and the results of the tests. Or maybe you have a wrong package installed (built for x86 on a x64 system and only now surfaced? dunno) |
There is no /usr/lib/ldap* on the 64bit package, so if you have it and that's what the program is trying to use, then it is probably from a compat32 package. In that case, you might need to follow the multilib FAQ entry on SBo to get it to compile (or temporarily remove the compat32 openldap package during compilation).
|
Thank you very much both @andrixnet and @bassmadrigal
Not just LDFLAGS I had to push in additional configure flags to get alpine slackbuild to successfully complete Code:
-- I edited alpine.Slackbuild and pushed in Now that alpine is done, on to PHP :-) |
All times are GMT -5. The time now is 10:49 AM. |