Skip to content
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

Build broken with python 3.6 #63

Closed
remicollet opened this issue Aug 20, 2024 · 6 comments
Closed

Build broken with python 3.6 #63

remicollet opened this issue Aug 20, 2024 · 6 comments

Comments

@remicollet
Copy link
Contributor

Python 3.6 is the default version in RHEL-8 (and clones)

libtool: compile:  g++ -I. -I/builddir/build/BUILD/php83-php-pecl-phpy-1.0.6/phpy-1.0.6 -I/builddir/build/BUILD/php83-php-pecl-phpy-1.0.6/NTS/include -I/builddir/build/BUILD/php83-php-pecl-phpy-1.0.6/NTS/main -I/builddir/build/BUILD/php83-php-pecl-phpy-1.0.6/phpy-1.0.6 -I/opt/remi/php83/root/usr/include/php -I/opt/remi/php83/root/usr/include/php/main -I/opt/remi/php83/root/usr/include/php/TSRM -I/opt/remi/php83/root/usr/include/php/Zend -I/opt/remi/php83/root/usr/include/php/ext -I/opt/remi/php83/root/usr/include/php/ext/date/lib -I/usr/include/python3.6m -I/usr/include/python3.6m -I/builddir/build/BUILD/php83-php-pecl-phpy-1.0.6/phpy-1.0.6/include -DHAVE_CONFIG_H -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -z now -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /builddir/build/BUILD/php83-php-pecl-phpy-1.0.6/phpy-1.0.6/src/python/resource.cc -MMD -MF src/python/resource.dep -MT src/python/resource.lo  -fPIC -DPIC -o src/python/.libs/resource.o
libtool: compile:  g++ -I. -I/builddir/build/BUILD/php83-php-pecl-phpy-1.0.6/phpy-1.0.6 -I/builddir/build/BUILD/php83-php-pecl-phpy-1.0.6/NTS/include -I/builddir/build/BUILD/php83-php-pecl-phpy-1.0.6/NTS/main -I/builddir/build/BUILD/php83-php-pecl-phpy-1.0.6/phpy-1.0.6 -I/opt/remi/php83/root/usr/include/php -I/opt/remi/php83/root/usr/include/php/main -I/opt/remi/php83/root/usr/include/php/TSRM -I/opt/remi/php83/root/usr/include/php/Zend -I/opt/remi/php83/root/usr/include/php/ext -I/opt/remi/php83/root/usr/include/php/ext/date/lib -I/usr/include/python3.6m -I/usr/include/python3.6m -I/builddir/build/BUILD/php83-php-pecl-phpy-1.0.6/phpy-1.0.6/include -DHAVE_CONFIG_H -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -z now -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /builddir/build/BUILD/php83-php-pecl-phpy-1.0.6/phpy-1.0.6/src/python/string.cc -MMD -MF src/python/string.dep -MT src/python/string.lo  -fPIC -DPIC -o src/python/.libs/string.o
/bin/sh /builddir/build/BUILD/php83-php-pecl-phpy-1.0.6/NTS/libtool --tag=CXX --mode=link g++ -shared -I/builddir/build/BUILD/php83-php-pecl-phpy-1.0.6/NTS/include -I/builddir/build/BUILD/php83-php-pecl-phpy-1.0.6/NTS/main -I/builddir/build/BUILD/php83-php-pecl-phpy-1.0.6/phpy-1.0.6 -I/opt/remi/php83/root/usr/include/php -I/opt/remi/php83/root/usr/include/php/main -I/opt/remi/php83/root/usr/include/php/TSRM -I/opt/remi/php83/root/usr/include/php/Zend -I/opt/remi/php83/root/usr/include/php/ext -I/opt/remi/php83/root/usr/include/php/ext/date/lib -I/usr/include/python3.6m -I/usr/include/python3.6m -I/builddir/build/BUILD/php83-php-pecl-phpy-1.0.6/phpy-1.0.6/include  -DHAVE_CONFIG_H  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE  -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld Usage: /usr/libexec/platform-python3.6m-x86_64-config --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--abiflags|--configdir  -o phpy.la -export-dynamic -avoid-version -prefer-pic -module -rpath /builddir/build/BUILD/php83-php-pecl-phpy-1.0.6/NTS/modules  phpy.lo src/bridge/core.lo src/php/core.lo src/php/dict.lo src/php/error.lo src/php/fn.lo src/php/iter.lo src/php/list.lo src/php/module.lo src/php/object.lo src/php/sequence.lo src/php/set.lo src/php/str.lo src/php/tuple.lo src/php/type.lo src/python/array.lo src/python/callable.lo src/python/class.lo src/python/module.lo src/python/object.lo src/python/reference.lo src/python/resource.lo src/python/string.lo 
/bin/sh: --exec-prefix: command not found
/bin/sh: --includes: command not found
/bin/sh: --libs: command not found
/bin/sh: --cflags: command not found
/bin/sh: --ldflags: command not found
/bin/sh: --extension-suffix: command not found
/bin/sh: --help: command not found
/bin/sh: --abiflags: command not found
/bin/sh: --configdir: command not found
make: *** [Makefile:281: phpy.la] Error 127

No issue with 3.9 in RHEL-9 or higher version in Fedora

@remicollet
Copy link
Contributor Author

Removing "--embed" fix the build

@matyhtf
Copy link
Member

matyhtf commented Aug 20, 2024

The current minimum python version requirement is 3.8.
The version 3.6 is not yet supported. I will see if it can be supported later.

@remicollet
Copy link
Contributor Author

remicollet commented Aug 20, 2024

The current minimum python version requirement is 3.8.

Please add a check for this in config.m4 ;)

BTW, why not using (instead of complex way using python3-config)

  if test "$PHP_PYTHON_VERSION" = "no"; then
    PKG_CHECK_MODULES([PYTHON], [python3-embed >= 3.8])
  else
    PKG_CHECK_MODULES([PYTHON], [python-${PHP_PYTHON_VERSION}-embed >= 3.8])
  fi
  PHP_EVAL_LIBLINE($PYTHON_LIBS, PHPY_SHARED_LIBADD)
  PHP_EVAL_INCLINE($PYTHON_CFLAGS)

PKG_CHECK_MODULES being the preffered way since 7.4

@remicollet
Copy link
Contributor Author

FYI, this extension was added in my RPMS repository among others
https://blog.remirepo.net/pages/PECL-extensions-RPM-status
https://x.com/RemiRepository/status/1825833901547291012

Nothing for EL-8, I will wait for 3.6 support or think about using python 3.12 also available

@remicollet
Copy link
Contributor Author

PKG_CHECK_MODULES being the preffered way since 7.4

See #65

@matyhtf
Copy link
Member

matyhtf commented Aug 21, 2024

59c2cb0

Fixed.

@matyhtf matyhtf closed this as completed Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants