--enable-versioning requests that the linker just exports certain
entries in the dynamic symbol table; this is not compatible with
the use of shared modules, which requires that the SAPI exports all
its symbols, zend_* and so on, otherwise modules can't use them.
This combination will not have worked for ages on platforms such as
Solaris and AIX, where libtool 1.4 implements -export-symbols correctly;
also on Linux with libtool 1.5 (where before, -export-symbols was
in effect a noop).
Index: configure.in
RCS file: /repository/php-src/configure.in,v
retrieving revision 1.396.2.80
diff -u -r1.396.2.80 configure.in
--- configure.in 7 Oct 2003 10:04:51 -0000 1.396.2.80
+++ configure.in 16 Oct 2003 09:00:11 -0000
@@ -765,6 +765,9 @@
dnl -------------------------------------------------------------------------
if test "$PHP_VERSIONING" = "yes"; then
- if test -n "$PHP_MODULES"; then
- AC_MSG_ERROR([--enable-versioning cannot be used with shared modules])
- fi
test -z "$PHP_SYM_FILE" && PHP_SYM_FILE="$abs_srcdir/sapi/$PHP_SAPI/php.sym"
if test -f "$PHP_SYM_FILE"; then
EXTRA_LDFLAGS="-export-symbols $PHP_SYM_FILE $EXTRA_LDFLAGS"
Heh, too bad I remembered this mail after spending some hours
trying to get php4 + php5 work as DSO on same apache. :)
I have both enabled now and it actually works.
(used libtool 1.5 and had to patch sapi/apache/mod_php5.c a bit)
Anyway, the issue with shared modules exists, or rather, shows
up now clearly. You just can't have them with 'versioned' DSO module.
The patch seems okay, but it might be good to disable the loading of
shared extensions always when '--enable-versioning' is used
so users get a more descriptive error, something like what you
get when the OS doesn't support it:
"Cannot dynamically load %s - dynamic modules are not supported"
This would prevent some queries when people try to load some extensions
they didn't compile themselves, or did it with phpize way.
And if we want to support running both php4 + php5 on same apache as DSO,
we need to rename some stuff in sapi/apache and also update the bundled
libtool to 1.5. (and also update it at the snapshot/release generation machine.)
Unfortunately this means that we'd have to start using autoconf 2.5x now
since the new libtool requires it. And for some reason, it's really slow
in creating our configure compared to autoconf 2.13..and the generated
configure itself is slow in running too. We propably also have to
update our configure stuff to the 2.5x era..
An alternative for all this upgrading is of course to patch our libtool.m4's
with this patch:
http://mail.gnu.org/archive/html/libtool/2002-07/msg00029.html
That worked fine too..and might be the better solution out of 2 bad ones. :)
The 3rd solution for all this: Let's remove --enable-versioning altogether as
it seems to cause more problems than what it actually solves.
After all, it's much safer to just run separate Apache's..or have either
version configured as CGI binary.
--Jani
--enable-versioning requests that the linker just exports certain
entries in the dynamic symbol table; this is not compatible with
the use of shared modules, which requires that the SAPI exports all
its symbols, zend_* and so on, otherwise modules can't use them.This combination will not have worked for ages on platforms such as
Solaris and AIX, where libtool 1.4 implements -export-symbols correctly;
also on Linux with libtool 1.5 (where before, -export-symbols was
in effect a noop).Index: configure.in
RCS file: /repository/php-src/configure.in,v
retrieving revision 1.396.2.80
diff -u -r1.396.2.80 configure.in
--- configure.in 7 Oct 2003 10:04:51 -0000 1.396.2.80
+++ configure.in 16 Oct 2003 09:00:11 -0000
@@ -765,6 +765,9 @@
dnl -------------------------------------------------------------------------if test "$PHP_VERSIONING" = "yes"; then
- if test -n "$PHP_MODULES"; then
- AC_MSG_ERROR([--enable-versioning cannot be used with shared modules])
- fi
test -z "$PHP_SYM_FILE" && PHP_SYM_FILE="$abs_srcdir/sapi/$PHP_SAPI/php.sym"
if test -f "$PHP_SYM_FILE"; then
EXTRA_LDFLAGS="-export-symbols $PHP_SYM_FILE $EXTRA_LDFLAGS"
Guys, --enable-versioning has always been for those who don't
need shared extensions and who want to run multiple PHP
versions concurrently. It does not need to suit everyone's
needs to be useful.
- Sascha
Guys, --enable-versioning has always been for those who don't
need shared extensions and who want to run multiple PHP
versions concurrently. It does not need to suit everyone's
needs to be useful.
I guess I didn't make it clear enough in my mail:
--enable-versioning does not work at all.
I was merely suggesting ways to make it work, or just get rid of it.
This has nothing to do with the fact that when --enable-versioning
is used shared extensions will not work. It was just one issue with it.
--Jani
I was merely suggesting ways to make it work, or just get rid of it. This has nothing to do with the fact that when --enable-versioning is used shared extensions will not work. It was just one issue with it.
Either it is working as expected (symbols are not exported;
shared extensions don't work), or it is not (symbols are
exported; shared extensions are not affected).
So, which is it?
- Sascha
I was merely suggesting ways to make it work, or just get rid of it. This has nothing to do with the fact that when --enable-versioning is used shared extensions will not work. It was just one issue with it.
Either it is working as expected (symbols are not exported;
shared extensions don't work), or it is not (symbols are
exported; shared extensions are not affected).So, which is it?
I say again: PHP shared extensions has nothing to do with this.
If you compile PHP 5 (or 4, or both) with --enable-versioning
and load them in same apache, it will crash.
It WILL work if you use libtool 1.5 or this patch:
http://mail.gnu.org/archive/html/libtool/2002-07/msg00029.html
(Provided you change some stuff in sapi/apache/mod_php5.c, of course)
--Jani
Hello Jani,
Friday, November 14, 2003, 5:15:39 PM, you wrote:
I was merely suggesting ways to make it work, or just get rid of it. This has nothing to do with the fact that when --enable-versioning is used shared extensions will not work. It was just one issue with it.
Either it is working as expected (symbols are not exported;
shared extensions don't work), or it is not (symbols are
exported; shared extensions are not affected).So, which is it?
I say again: PHP shared extensions has nothing to do with this.
If you compile PHP 5 (or 4, or both) with --enable-versioning and load them in same apache, it will crash.
It WILL work if you use libtool 1.5 or this patch:
http://mail.gnu.org/archive/html/libtool/2002-07/msg00029.html
(Provided you change some stuff in sapi/apache/mod_php5.c, of course)
Since especially you Jani know the problems of upgrading build environment i
suggest that for the moment we should use the patch then. Right ?
--
Best regards,
Marcus mailto:helly@php.net