Compile fix for Large File support (PHP, others?)

Development on core packages and the distribution goes on in here.

Compile fix for Large File support (PHP, others?)

Postby noctarm » Mon Aug 03, 2020 7:04 am

Nasty surprise that PHP is not compiled to support large files and 64-bit addressing, which effectively limits fopen to 4GB or less. This immediately breaks functionality in applications, such as Nextcloud, from being able to serve files over that limit.

A simple fix is to change the CPPFLAGS in the PKGBUILD.

Code: Select all
 build() {
        # http://site.icu-project.org/download/61#TOC-Migration-Issues
-       CPPFLAGS+=' -DU_USING_ICU_NAMESPACE=1 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
+       CPPFLAGS+=' -DU_USING_ICU_NAMESPACE=1'

        local _phpconfig="--srcdir=../${pkgbase}-${pkgver} \
                --config-cache \
"


Or, perhaps these should go into the makepkg.conf defaults?

Either way, it would be nice to get this added so that PHP doesn't have to be manually recompiled every time it gets an update.

I assume the PKGBUILD is just coming from upstream with the only change for the ARM platforms being a change to the allowed architecture. I didn't find a PHP package in the git repo, otherwise I'd have submitted a patch.

FYI, I also found an unanswered forum post from October 2019 with the same basic info https://archlinuxarm.org/forum/viewtopic.php?f=15&t=14070&p=62441&hilit=CPPFLAGS#p62441
noctarm
 
Posts: 1
Joined: Mon Aug 03, 2020 1:34 am

Re: Compile fix for Large File support (PHP, others?)

Postby solskogen » Fri Aug 14, 2020 6:46 am

It's like this (probably) because that's how the PKGBUILD for php on Arch Linux is: https://github.com/archlinux/svntogit-p ... k/PKGBUILD
solskogen
 
Posts: 15
Joined: Mon Nov 18, 2013 10:41 am


Return to Arch Linux ARM

Who is online

Users browsing this forum: No registered users and 2 guests