PHP/Mapscript regex problem -- Any volunteers?
Bill Binko
bill at BINKO.NET
Mon May 16 04:29:57 EDT 2005
I hate to do this, but please don't bother getting me that list just yet.
On Mon, 16 May 2005, Bill Binko wrote:
>
> This SHOULD also mean that we should be able to build against PHP without
> needing the PHP source, and that running as a DSO should be OK. The only
> downside would be that if you chose to do so, the command-line/CGI
> programs would link against libphp_common.so at runtime. That seems
> better than statically loading the .o's from PHP into libmap.a to me.
This was such a beautiful thought ... unfortunately, PHP has chosen to
make libphp_common.so only linkable from their own executables:
/usr/lib/libphp_common.so: undefined reference to `php_startup_internal_extensions'
collect2: ld returned 1 exit status
I will be asking why on earth this is the case.
>
> (Before I realized this (during the thrashing phase of the investigation
> :), I figured out a more convoluted solution, but we'll let that be a
> backup plan.)
>
I guess I'm back to this. It basically comes down to having two separate
.o files that hold wrappers for the reg*() methods. One gets linked in
for the CGI/CLI apps and calls the system regex*()'s, the other gets
linked into php_mapscript.so and calls PHPs. It's doable, but unpleasant.
The upside is that the CGI/CLIs never have dependencies on
libphp_common.so. The downside is we get two stupid compilation units to
maintain.
Disgusted,
Binko
More information about the mapserver-dev
mailing list