GithubHelp home page GithubHelp logo

Comments (21)

centminmod avatar centminmod commented on June 25, 2024 1

Using GCC 6.3.1 works !

./configure php --module=remiphp720 --config=/opt/remi/php72/root/usr/bin/php-config --lib-path=/opt/remi/php72/root/usr/lib64
configuring PHP module
checking for PHP ... found
 + PHP version: 7.2.0RC2
 + PHP SAPI: [apache2handler embed fpm cli phpdbg cgi]
checking for PHP embed SAPI ... found
 + PHP module: remiphp720.unit.so
make install
install -d /opt/unit/sbin
install -p build/unitd /opt/unit/sbin/
install -d /root/golang/packages/src/unit
install -p -m644 ./src/go/unit/* /root/golang/packages/src/unit/
CGO_CFLAGS="-I/svr-setup/unit/build -I/svr-setup/unit/src" \
        CGO_LDFLAGS="-L/svr-setup/unit/build -lrt" \
        GOPATH=/root/golang/packages \
        go install -v unit
install -d /opt/unit/modules
install -p build/php5631.unit.so \
        /opt/unit/modules/
install -d /opt/unit/modules
install -p build/remiphp5631.unit.so \
        /opt/unit/modules/
install -d /opt/unit/modules
install -p build/remiphp7023.unit.so \
        /opt/unit/modules/
install -d /opt/unit/modules
install -p build/remiphp719.unit.so \
        /opt/unit/modules/
install -d /opt/unit/modules
install -p build/remiphp720.unit.so \
        /opt/unit/modules/
install -d /opt/unit/modules
install -p build/python.unit.so \
        /opt/unit/modules/

thanks @VBart

from unit.

VBart avatar VBart commented on June 25, 2024 1

I don't want to take into account file names, because it's up to the package maintainer how to name modules, but the configuration should work similar across all systems.

What comes into my mind is that we can introduce additional configure option --version-suffix that will add some suffix specified by user at the end of the version. I'm only not sure that it's a real use-case.

from unit.

VBart avatar VBart commented on June 25, 2024

Could you show ls -l /opt/remi/php72/root/usr/lib64?

from unit.

centminmod avatar centminmod commented on June 25, 2024

directory listing

for PHP 7.2.0RC2

ls -l /opt/remi/php72/root/usr/lib64
total 5052
dr-xr-xr-x 2 root root       6 Apr 12 09:39 games
-rwxr-xr-x 1 root root 5173104 Sep 14 05:35 libphp7-7.2.so
lrwxrwxrwx 1 root root      14 Sep 23 23:40 libphp7.so -> libphp7-7.2.so
drwxr-xr-x 4 root root      32 Sep 23 23:40 php
dr-xr-xr-x 5 root root      49 Sep 23 23:40 pm-utils
dr-xr-xr-x 2 root root       6 Apr 12 09:39 sse2
dr-xr-xr-x 2 root root       6 Apr 12 09:39 tls
dr-xr-xr-x 2 root root       6 Apr 12 09:39 X11

for PHP 7.1

ls -l /opt/remi/php71/root/usr/lib64
total 4724
dr-xr-xr-x 2 root root       6 Nov 29  2016 games
-rwxr-xr-x 1 root root 4835264 Sep 14 06:11 libphp7-7.1.so
lrwxrwxrwx 1 root root      14 Sep 23 23:38 libphp7.so -> libphp7-7.1.so
drwxr-xr-x 4 root root      32 Sep 23 23:38 php
dr-xr-xr-x 5 root root      49 Sep 23 23:38 pm-utils
dr-xr-xr-x 2 root root       6 Nov 29  2016 sse2
dr-xr-xr-x 2 root root       6 Nov 29  2016 tls
dr-xr-xr-x 2 root root       6 Nov 29  2016 X11

from unit.

VBart avatar VBart commented on June 25, 2024

Ok, they look similar. Could you show cat build/autoconf.err after trying to configure PHP 7.2?

from unit.

centminmod avatar centminmod commented on June 25, 2024

the last entry related to PHP 7.2.0 RC2

----------
configuring PHP module ...
checking for PHP ...
7.2.0RC2
----------------------------------------
checking for PHP embed SAPI
In file included from /opt/remi/php72/root/usr/include/php/Zend/zend.h:328:0,
                 from /opt/remi/php72/root/usr/include/php/main/php.h:35,
                 from build/autotest.c:2:
/opt/remi/php72/root/usr/include/php/Zend/zend_operators.h: In function 'fast_long_increment_function':
/opt/remi/php72/root/usr/include/php/Zend/zend_operators.h:446:2: error: implicit declaration of function '__builtin_saddl_overflow' [-Werror=implicit-function-declaration]
  if (UNEXPECTED(__builtin_saddl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
/opt/remi/php72/root/usr/include/php/Zend/zend_operators.h: In function 'fast_long_decrement_function':
/opt/remi/php72/root/usr/include/php/Zend/zend_operators.h:500:2: error: implicit declaration of function '__builtin_ssubl_overflow' [-Werror=implicit-function-declaration]
  if (UNEXPECTED(__builtin_ssubl_overflow(Z_LVAL_P(op1), 1, &lresult))) {
  ^
cc1: all warnings being treated as errors
----------

        #include <php.h>
        #include <php_main.h>

        int main() {
            php_request_startup();
            return 0;
        }
----------
gcc -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wmissing-prototypes -Werror -g -I/opt/remi/php72/root/usr/include/php -I/opt/remi/php72/root/usr/include/php/main -I/opt/remi/php72/root/usr/include/php/TSRM -I/opt/remi/php72/root/usr/include/php/Zend -I/opt/remi/php72/root/usr/include/php/ext -I/opt/remi/php72/root/usr/include/php/ext/date/lib -o build/autotest build/autotest.c -lphp7 -L/opt/remi/php72/root/usr/lib64 -Wl,-rpath /opt/remi/php72/root/usr/lib64
----------

from unit.

VBart avatar VBart commented on June 25, 2024

It looks like that this PHP package was configured with different compiler, that supports __builtin_ssubl_overflow. You can try to check % /opt/remi/php72/root/usr/bin/php-config --configure-options.

from unit.

centminmod avatar centminmod commented on June 25, 2024

Ok here's

PHP 7.2.0RC2

/opt/remi/php72/root/usr/bin/php-config --configure-options
--build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/opt/remi/php72/root/usr --exec-prefix=/opt/remi/php72/root/usr --bindir=/opt/remi/php72/root/usr/bin --sbindir=/opt/remi/php72/root/usr/sbin --sysconfdir=/etc/opt/remi/php72 --datadir=/opt/remi/php72/root/usr/share --includedir=/opt/remi/php72/root/usr/include --libdir=/opt/remi/php72/root/usr/lib64 --libexecdir=/opt/remi/php72/root/usr/libexec --localstatedir=/var/opt/remi/php72 --sharedstatedir=/var/opt/remi/php72/lib --mandir=/opt/remi/php72/root/usr/share/man --infodir=/opt/remi/php72/root/usr/share/info --cache-file=../config.cache --with-libdir=lib64 --with-config-file-path=/etc/opt/remi/php72 --with-config-file-scan-dir=/etc/opt/remi/php72/php.d --disable-debug --with-pic --disable-rpath --without-pear --with-exec-dir=/opt/remi/php72/root/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --with-xpm-dir=/usr --without-gdbm --with-jpeg-dir=/usr --with-openssl --with-system-ciphers --with-zlib --with-layout=GNU --with-kerberos --with-libxml-dir=/usr --with-system-tzdata --with-mhash --enable-dtrace --libdir=/opt/remi/php72/root/usr/lib64/php --enable-pcntl --enable-opcache --enable-opcache-file --enable-phpdbg --with-imap=shared --with-imap-ssl --enable-mbstring=shared --enable-mbregex --with-gd=shared,/usr --with-gmp=shared --enable-calendar=shared --enable-bcmath=shared --with-bz2=shared --enable-ctype=shared --enable-dba=shared --with-db4=/usr --with-tcadb=/usr --with-lmdb=/usr --enable-exif=shared --enable-ftp=shared --with-gettext=shared --with-iconv=shared --enable-sockets=shared --enable-tokenizer=shared --with-xmlrpc=shared --with-ldap=shared --with-ldap-sasl --enable-mysqlnd=shared --with-mysqli=shared,mysqlnd --with-mysql-sock=/var/lib/mysql/mysql.sock --with-oci8=shared,instantclient,/usr/lib64/oracle/12.2/client64/lib,12.2 --with-pdo-oci=shared,instantclient,/usr/lib64/oracle/12.2/client64/lib,12.2 --with-interbase=shared --with-pdo-firebird=shared --enable-dom=shared --with-pgsql=shared --enable-simplexml=shared --enable-xml=shared --enable-wddx=shared --with-snmp=shared,/usr --enable-soap=shared --with-xsl=shared,/usr --enable-xmlreader=shared --enable-xmlwriter=shared --with-curl=shared,/usr --enable-pdo=shared --with-pdo-odbc=shared,unixODBC,/usr --with-pdo-mysql=shared,mysqlnd --with-pdo-pgsql=shared,/usr --with-pdo-sqlite=shared,/usr --with-sqlite3=shared,/usr --enable-json=shared --without-readline --with-libedit --with-pspell=shared --enable-phar=shared --with-tidy=shared,/usr --with-pdo-dblib=shared,/usr --enable-sysvmsg=shared --enable-sysvshm=shared --enable-sysvsem=shared --enable-shmop=shared --enable-posix=shared --with-unixODBC=shared,/usr --enable-intl=shared --with-icu-dir=/usr --with-enchant=shared,/usr --with-recode=shared,/usr --enable-fileinfo=shared --with-sodium=shared build_alias=x86_64-redhat-linux-gnu host_alias=x86_64-redhat-linux-gnu CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fno-strict-aliasing -Wno-pointer-sign CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic

and PHP 7.1.10RC1

/opt/remi/php71/root/usr/bin/php-config --configure-options
--build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/opt/remi/php71/root/usr --exec-prefix=/opt/remi/php71/root/usr --bindir=/opt/remi/php71/root/usr/bin --sbindir=/opt/remi/php71/root/usr/sbin --sysconfdir=/etc/opt/remi/php71 --datadir=/opt/remi/php71/root/usr/share --includedir=/opt/remi/php71/root/usr/include --libdir=/opt/remi/php71/root/usr/lib64 --libexecdir=/opt/remi/php71/root/usr/libexec --localstatedir=/var/opt/remi/php71 --sharedstatedir=/var/opt/remi/php71/lib --mandir=/opt/remi/php71/root/usr/share/man --infodir=/opt/remi/php71/root/usr/share/info --cache-file=../config.cache --with-libdir=lib64 --with-config-file-path=/etc/opt/remi/php71 --with-config-file-scan-dir=/etc/opt/remi/php71/php.d --disable-debug --with-pic --disable-rpath --without-pear --with-exec-dir=/opt/remi/php71/root/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --with-xpm-dir=/usr --enable-gd-native-ttf --without-gdbm --with-jpeg-dir=/usr --with-openssl --with-system-ciphers --with-zlib --with-layout=GNU --with-kerberos --with-libxml-dir=/usr --with-system-tzdata --with-mhash --enable-dtrace --libdir=/opt/remi/php71/root/usr/lib64/php --enable-pcntl --enable-opcache --enable-opcache-file --enable-phpdbg --with-imap=shared --with-imap-ssl --enable-mbstring=shared --enable-mbregex --with-gd=shared,/usr --with-gmp=shared --enable-calendar=shared --enable-bcmath=shared --with-bz2=shared --enable-ctype=shared --enable-dba=shared --with-db4=/usr --with-tcadb=/usr --enable-exif=shared --enable-ftp=shared --with-gettext=shared --with-iconv=shared --enable-sockets=shared --enable-tokenizer=shared --with-xmlrpc=shared --with-ldap=shared --with-ldap-sasl --enable-mysqlnd=shared --with-mysqli=shared,mysqlnd --with-mysql-sock=/var/lib/mysql/mysql.sock --with-oci8=shared,instantclient,/usr/lib64/oracle/12.2/client64/lib,12.2 --with-pdo-oci=shared,instantclient,/usr,12.2 --with-interbase=shared --with-pdo-firebird=shared --enable-dom=shared --with-pgsql=shared --enable-simplexml=shared --enable-xml=shared --enable-wddx=shared --with-snmp=shared,/usr --enable-soap=shared --with-xsl=shared,/usr --enable-xmlreader=shared --enable-xmlwriter=shared --with-curl=shared,/usr --enable-pdo=shared --with-pdo-odbc=shared,unixODBC,/usr --with-pdo-mysql=shared,mysqlnd --with-pdo-pgsql=shared,/usr --with-pdo-sqlite=shared,/usr --with-sqlite3=shared,/usr --enable-json=shared --without-readline --with-libedit --with-pspell=shared --enable-phar=shared --with-mcrypt=shared,/usr --with-tidy=shared,/usr --with-pdo-dblib=shared,/usr --enable-sysvmsg=shared --enable-sysvshm=shared --enable-sysvsem=shared --enable-shmop=shared --enable-posix=shared --with-unixODBC=shared,/usr --enable-intl=shared --with-icu-dir=/usr --with-enchant=shared,/usr --with-recode=shared,/usr --enable-fileinfo=shared build_alias=x86_64-redhat-linux-gnu host_alias=x86_64-redhat-linux-gnu CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fno-strict-aliasing -Wno-pointer-sign CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic

from unit.

VBart avatar VBart commented on June 25, 2024

All of them probably were configured in the same environment, but only PHP 7.2 uses this compiler built-in.

I've just checked GCC manual and it seems __builtin_ssubl_overflow was introduced in GCC 5. What version do you use? Could you show the first lines of ./configure output?

configuring for Linux 4.6.7-gentoo x86_64
checking for C compiler: cc
 + using GNU C compiler
 + gcc version 6.4.0 (Gentoo 6.4.0 p1.0) ```

from unit.

centminmod avatar centminmod commented on June 25, 2024

CentOS 7.4 defaults to native GCC 4.8.5 version but I have added optional GCC 5.3.1, 6.3.1 and 7.1.1 via devtoolset-4, devtoolset-6 and devtoolset-7 as well as Clang 3.4, 4.0 and 5.0 optional support in my web stack. So I can switch to GCC higher version to compile Nginx Unit php configurations and see.

from unit.

VBart avatar VBart commented on June 25, 2024

I see -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 in the configure options above. Not sure what redhat-hardened-cc1 is, but probably that's related. Do they use some hardened compiler with backported features by RedHat?

from unit.

centminmod avatar centminmod commented on June 25, 2024

not sure what the redhat-hardened-cc1 is either, but switching to GCC 6.3.1 allowed me to configure PHP 7.2.0RC2 on CentOS 7.4 so seems to have worked :)

ls -lah /opt/unit/modules/
total 560K
drwxr-xr-x 2 root root  151 Sep 24 00:41 .
drwxr-xr-x 6 root root   78 Sep 23 22:24 ..
-rwxr-xr-x 1 root root  89K Sep 24 00:41 php5631.unit.so
-rwxr-xr-x 1 root root 104K Sep 24 00:41 python.unit.so
-rwxr-xr-x 1 root root  89K Sep 24 00:41 remiphp5631.unit.so
-rwxr-xr-x 1 root root  88K Sep 24 00:41 remiphp7023.unit.so
-rwxr-xr-x 1 root root  89K Sep 24 00:41 remiphp719.unit.so
-rwxr-xr-x 1 root root  89K Sep 24 00:41 remiphp720.unit.so

from unit.

VBart avatar VBart commented on June 25, 2024

It seems you have two PHP modules with exactly the same version: PHP version: 5.6.31. Currently, there's no way to specify which of them will be used.

from unit.

centminmod avatar centminmod commented on June 25, 2024

Yeah realised that. Maybe in future there would be a way to differentiate them ? maybe by the PHP embed modules name php5631.unit.so vs remiphp5631.unit.so ?

seems remi version of 5.6.31 was ignored

tail -100 /var/log/unitd.log

2017/09/24 01:04:42 [info] 18356#18356 discovery started
2017/09/24 01:04:42 [notice] 18356#18356 module: php 5.6.31 "/opt/unit/modules/php5631.unit.so"
2017/09/24 01:04:42 [notice] 18356#18356 module: python 2.7.5 "/opt/unit/modules/python.unit.so"
2017/09/24 01:04:42 [notice] 18356#18356 module: php 5.6.31 "/opt/unit/modules/remiphp5631.unit.so"
2017/09/24 01:04:42 [notice] 18356#18356 ignoring /opt/unit/modules/remiphp5631.unit.so module with the same application language version php 5.6.31 as in /opt/unit/modules/php5631.unit.so
2017/09/24 01:04:42 [notice] 18356#18356 module: php 7.0.24RC1 "/opt/unit/modules/remiphp7023.unit.so"
2017/09/24 01:04:42 [notice] 18356#18356 module: php 7.1.10RC1 "/opt/unit/modules/remiphp719.unit.so"
2017/09/24 01:04:42 [notice] 18356#18356 module: php 7.2.0RC2 "/opt/unit/modules/remiphp720.unit.so"
2017/09/24 01:04:42 [info] 18357#18357 controller started
2017/09/24 01:04:42 [info] 18358#18358 router started
2017/09/24 01:04:42 [crit] 18358#18358 epoll_ctl(3, 3, 9) failed (2: No such file or directory)
2017/09/24 01:04:42 [crit] 18357#18357 epoll_ctl(3, 3, 9) failed (2: No such file or directory)
2017/09/24 01:04:42 [notice] 18355#18355 process 18356 exited with code 0

from unit.

centminmod avatar centminmod commented on June 25, 2024

A --version-suffix would be nice. Not sure if it would be a real world usage scenario that maybe folks want to test the performance of PHP using different compiler/compiler versions/compiler flags (clang, gcc) to build the same PHP version. It's probably something I personally would test for as I do the same for Nginx compiles too (different GCC /Clang versions) depending on cpu the server is sporting.

from unit.

jinrenjie avatar jinrenjie commented on June 25, 2024

[root@Better unit]# ./configure php --module=php72 --config=/root/bin/php/bin/php-config --lib-path=/root/bin/php/lib
configuring PHP module
checking for PHP ... found

  • PHP SAPI: [cli embed fpm phpdbg cgi]
    checking for PHP embed SAPI ... found
    checking for PHP version ... 7.2.4
  • PHP module: php72.unit.so

[root@Better unit]# make install
install -d sbin
install -p build/unitd sbin/
install -d build
install -d build
install -p build/php72.unit.so
build/
install: ‘build/php72.unit.so’ and ‘build/php72.unit.so’ are the same file
make: *** [php72-install] Error 1
@VBart

from unit.

VBart avatar VBart commented on June 25, 2024

@centminmod
Check the content of build/ directory. There's probably already php72.unit.so file left from some previous build.

from unit.

centminmod avatar centminmod commented on June 25, 2024

@VBart maybe that last comment meant for @jinrenjie ?

from unit.

VBart avatar VBart commented on June 25, 2024

@centminmod you're right. Sorry, that was a reply to @jinrenjie.

from unit.

pyriand3r avatar pyriand3r commented on June 25, 2024

Hi,
I am having the same problem @jinrenjie has. I don't know why, but on my and Jinrenjies system make install tries to install the files to the build-folder. I have opened a new ticket for this problem because i think it has nothing to do with this one, but because the problem is mentioned here i linked the tickets.

from unit.

tippexs avatar tippexs commented on June 25, 2024

Closed issue due to clean ups

from unit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.