phalcon / cphalcon

High performance, full-stack PHP framework delivered as a C extension.
https://phalcon.io
BSD 3-Clause "New" or "Revised" License
10.76k stars 1.96k forks source link

[BUG]: Unable to compile v5 beta on Archlinux #15954

Closed quinnjr closed 2 years ago

quinnjr commented 2 years ago

Questions? Forum: https://phalcon.io/forum or Discord: https://phalcon.io/discord

Describe the bug php-phalcon is currently unable to be compiled on Archlinux using the steps shown to be the correct way to compile.

I am on of the maintainers for the pkgbuild for the Archlinux installation.

To Reproduce See compilation output log: https://gist.github.com/quinnjr/e71ed0e9990e364a17ba48cfec824832

Steps to reproduce the behavior:

  1. Modify the current PKGBUILD for php-phalcon to use the new build system for v5.
  2. Attempt to build the package.
  3. Recieve the errors shown in the build output

Provide minimal script to reproduce the issue


# PACKAGER: wolftankk <wolftankk@gmail.com>
# Maintainer: Joseph R. Quinn <quinn.josephr@protonmail.com>

pkgname=php-phalcon _pkgname=cphalcon pkgver=5.0.0beta3 pkgrel=1 pkgdesc="Web framework delivered as a C-extension for PHP" url="http://phalconphp.com" arch=('x86_64' 'i686') [[ $CARCH == 'i686' ]] && cd _arch=32bits || _arch=64bits license=('PHP') depends=('php' 'php-psr') makedepends=('gcc') backup=('etc/php/conf.d/phalcon.ini') source=("https://github.com/phalcon/cphalcon/archive/v$pkgver.zip") b2sums=('f0de151a5b71b7535ee869213d86fac232664567357ea6d07a3c064d96614dc44095fc580f17aa8095aac28c5413b15c6b4d234f6fac1cfeb6f0cdd336925923')

prepare() {
cd "$srcdir/$_pkgname-$pkgver/build" export CC="gcc" export CPPFLAGS="-DPHALCON_RELEASE"

PHPIZE_BIN=$(command -v phpize 2>/dev/null) PHPCONFIG_BIN=$(command -v php-config 2>/dev/null) PHP_FULL_VERSION=${PHPCONFIG_BIN} --version

php gen-build.php

echo "int main() {}" > t.c gcc ${CFLAGS} t.c -o t 2> t.t if [ $? != 0 ]; then chmod +x gcccpuopt BFLAGS=./gcccpuopt export CFLAGS="-O2 -fomit-frame-pointer $BFLAGS" gcc ${CFLAGS} t.c -o t 2> t.t if [ $? != 0 ]; then export CFLAGS="-O2" fi fi

if [ $(gcc -dumpversion | cut -f1 -d.) -ge 4 ]; then gcc ${CFLAGS}-fvisibility=hidden t.c -o t 2> t.t && export CFLAGS="$CFLAGS -fvisibility=hidden" fi

rm -f t.t t.c t

cd "phalcon/"

if [ -f Makefile ]; then make clean ${PHPIZE_BIN} --clean fi

${PHPIZE_BIN} export echo=echo

./configure --silent --with-php-config=${PHPCONFIG_BIN} --enable-phalcon }

build() { cd "$srcdir/$_pkgname-$pkgver/build/phalcon" make -s -j"$(getconf _NPROCESSORS_ONLN)" }



**Expected behavior**
Expected behavior is a working build of cphalcon at v5.0.0beta3/

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Details**
 - Phalcon version: v5.0.0beta3
 - PHP Version: v8.1.5
 - Operating System: ArchLinux
 - Installation type: Compiling from source
 - Zephir version (if any): N/a
 - Server: Nginx
 - Other related info (Database, table schema): N/a

**Additional context**
I have not tried installing the package in a clean CHROOT environment yet, but I suspect the same failures in compilation would arise.
Jeckerson commented 2 years ago

Hello!

Version v5.0.0beta3 isn't compatible with PHP8.1, only until 8.0. Next release will support PHP8.1. But just to make sure, could you try to compile against 5.0.x branch (https://github.com/phalcon/cphalcon/tree/5.0.x)?

quinnjr commented 2 years ago

Hello!

Version v5.0.0beta3 isn't compatible with PHP8.1, only until 8.0. Next release will support PHP8.1. But just to make sure, could you try to compile against 5.0.x branch (https://github.com/phalcon/cphalcon/tree/5.0.x)?

No luck.

I also tried rolling back the PHP version to php7 and we're still encountering the same errors.

quinnjr commented 2 years ago

I've also tried rolling the PKGBUILD back to using php80 and am receiving the same number of errors and warnings.

quinnjr commented 2 years ago

v5.0.0RC1 successfully compiles on Arch Linux. Closing this issue.