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

fix build with recent GCC #266

Closed
wants to merge 1 commit into from
Closed

fix build with recent GCC #266

wants to merge 1 commit into from

Conversation

remicollet
Copy link

@remicollet remicollet commented Apr 27, 2020

Trying to build with GCC 10

/usr/bin/ld: kernel/.libs/main.o:/builddir/build/BUILD/php-pecl-ice-1.6.0/ZTS/./php_ice.h:56: multiple definition of `tsrm_ls'; .libs/ice.o:/builddir/build/BUILD/php-pecl-ice-1.6.0/ZTS/php_ice.h:56: first defi
ned here
/usr/bin/ld: kernel/.libs/memory.o:/builddir/build/BUILD/php-pecl-ice-1.6.0/ZTS/./php_ice.h:56: multiple definition of `tsrm_ls'; .libs/ice.o:/builddir/build/BUILD/php-pecl-ice-1.6.0/ZTS/php_ice.h:56: first de
fined here
/usr/bin/ld: kernel/.libs/exception.o:/builddir/build/BUILD/php-pecl-ice-1.6.0/ZTS/./php_ice.h:56: multiple definition of `tsrm_ls'; .libs/ice.o:/builddir/build/BUILD/php-pecl-ice-1.6.0/ZTS/php_ice.h:56: first
 defined here
/usr/bin/ld: kernel/.libs/debug.o:/builddir/build/BUILD/php-pecl-ice-1.6.0/ZTS/./php_ice.h:56: multiple definition of `tsrm_ls'; .libs/ice.o:/builddir/build/BUILD/php-pecl-ice-1.6.0/ZTS/php_ice.h:56: first def
ined here
/usr/bin/ld: kernel/.libs/object.o:/builddir/build/BUILD/php-pecl-ice-1.6.0/ZTS/./php_ice.h:56: multiple definition of `tsrm_ls'; .libs/ice.o:/builddir/build/BUILD/php-pecl-ice-1.6.0/ZTS/php_ice.h:56: first defined here
/usr/bin/ld: kernel/.libs/array.o:/builddir/build/BUILD/php-pecl-ice-1.6.0/ZTS/./php_ice.h:56: multiple definition of `tsrm_ls'; .libs/ice.o:/builddir/build/BUILD/php-pecl-ice-1.6.0/ZTS/php_ice.h:56: first defined here
/usr/bin/ld: kernel/.libs/string.o:/builddir/build/BUILD/php-pecl-ice-1.6.0/ZTS/./php_ice.h:56: multiple definition of `tsrm_ls'; .libs/ice.o:/builddir/build/BUILD/php-pecl-ice-1.6.0/ZTS/php_ice.h:56: first defined here
/usr/bin/ld: kernel/.libs/fcall.o:/builddir/build/BUILD/php-pecl-ice-1.6.0/ZTS/./php_ice.h:56: multiple definition of `tsrm_ls'; .libs/ice.o:/builddir/build/BUILD/php-pecl-ice-1.6.0/ZTS/php_ice.h:56: first defined here
/usr/bin/ld: kernel/.libs/require.o:/builddir/build/BUILD/php-pecl-ice-1.6.0/ZTS/./php_ice.h:56: multiple definition of `tsrm_ls'; .libs/ice.o:/builddir/build/BUILD/php-pecl-ice-1.6.0/ZTS/php_ice.h:56: first defined here
/usr/bin/ld: kernel/.libs/file.o:/builddir/build/BUILD/php-pecl-ice-1.6.0/ZTS/./php_ice.h:56: multiple definition of `tsrm_ls'; .libs/ice.o:/builddir/build/BUILD/php-pecl-ice-1.6.0/ZTS/php_ice.h:56: first defined here
/usr/bin/ld: kernel/.libs/operators.o:/builddir/build/BUILD/php-pecl-ice-1.6.0/ZTS/./php_ice.h:56: multiple definition of `tsrm_ls'; .libs/ice.o:/builddir/build/BUILD/php-pecl-ice-1.6.0/ZTS/php_ice.h:56: first defined here
/usr/bin/ld: kernel/.libs/math.o:/builddir/build/BUILD/php-pecl-ice-1.6.0/ZTS/./php_ice.h:56: multiple definition of `tsrm_ls'; .libs/ice.o:/builddir/build/BUILD/php-pecl-ice-1.6.0/ZTS/php_ice.h:56: first defi
...

Use PHP 7 ZEND_TSRMLS_CACHE way instead (tsrm_ls is no more needed)

@remicollet
Copy link
Author

@remicollet remicollet commented Apr 27, 2020

I also think it will be better to use the ZEND_MODULE_GLOBALS_ACCESSOR macro instead of duplicating the global pointer.

@mruz
Copy link
Member

@mruz mruz commented Apr 27, 2020

Thanks @remicollet. It's need to be fixed in https://github.com/phalcon/zephir, as the files will be overridden when we generate a new build.
https://github.com/phalcon/zephir/blob/659390814d919d07c78aeefe3da8e98936735b53/templates/ZendEngine3/project.c#L83

@sergeyklay
Copy link

@sergeyklay sergeyklay commented Apr 27, 2020

Fixed in Zephir's development branch.

@mruz mruz closed this in ab79485 Apr 27, 2020
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

Successfully merging this pull request may close these issues.

None yet

3 participants