Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Class names (Event class) conflict with pecl event extension #320

Closed
mesny opened this issue Aug 22, 2024 · 3 comments · Fixed by #321
Closed

Class names (Event class) conflict with pecl event extension #320

mesny opened this issue Aug 22, 2024 · 3 comments · Fixed by #321
Assignees
Milestone

Comments

@mesny
Copy link

mesny commented Aug 22, 2024

Hi, there is an class name conflict, between parallel and event extensions.

/usr/bin/ld: ext/parallel/src/.libs/event.o: in function 'zim_Event___construct': /img/phpsrc/php-8.3.10/ext/parallel/src/event.c:67: multiple definition of 'zim_Event___construct'; ext/event/php8/classes/.libs/event.o:/img/phpsrc/php-8.3.10/ext/event/php8/classes/event.c:218: first defined here collect2: error: ld returned 1 exit status make: *** [Makefile:150: libphp.la] Error 1

Used this configure command:
./configure --disable-session --disable-cgi --disable-phpdbg \ --enable-zts --enable-fpm --enable-sockets --enable-mysqlnd --enable-mbstring --enable-pcntl --enable-embed=shared \ --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-shmop --enable-parallel \ --with-zlib --with-zip --with-xsl --with-ffi --enable-phar --enable-soap \ --with-curl --with-mysqli --with-openssl --with-sodium \ --with-ldap --with-sqlite3 --with-pdo_mysql --with-pdo_sqlite \ --enable-igbinary --enable-ds --with-amqp --with-gearman \ --with-event-core --with-event-extra --with-event-openssl --enable-event-sockets \ --enable-memcached --enable-memcached-json --enable-memcached-igbinary --disable-memcached-session

I am not aware of any reason to not use the event extension in ZTS builds (libevent supports pthreads).
I wondered is there any workaround for that?

Thanks very much for your work.

@cmb69
Copy link
Collaborator

cmb69 commented Aug 22, 2024

The class names better should be soft-namespaced, like e.g.

PHP_MINIT_FUNCTION(PARALLEL_EVENTS_EVENT)

@realFlowControl
Copy link
Collaborator

Hey @mesny,
#321 should fix that problem, I could not try it out yet, but I am slightly optimistic 😉
I'll give it a try later and merge in case it actually fixes the problem.

@realFlowControl realFlowControl added this to the v1.2.4 milestone Aug 23, 2024
@mesny
Copy link
Author

mesny commented Aug 23, 2024

Much appreciated!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants