PHP 4.0 Bug #6975: link fails with pcre_memmove multiply defined
| From: | enno dot davids at metva dot com dot au | Date: | Mon, 02 Oct 2000 12:57:55 +0000 |
| Subject: | PHP 4.0 Bug #6975: link fails with pcre_memmove multiply defined | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-33954@lists.php.net to get a copy of this message | ||
From: enno.davids@metva.com.au
Operating system: SunOS 4
PHP version: 4.0.2
PHP Bug Type: Compile Failure
Bug description: link fails with pcre_memmove multiply defined
When doing a DSO build on a SunDS4 machine the (I think) final link fails with pcre_memmove multiply
defined.
On investigation, it seems that the configure script is not setting the necessary defines for this
platform in .../ext/pcre/pcrelib/. The header file internal.h in that directory specifically tests
for platforms like this which may not have memmove but do have bcopy. But in the case where neither
are found, it has a code snippet for pcre_memmove which it includes. As soon as more than one .c
file includes this, the code snippet is expanded into each file, resulting in the multiple
definitions the linker complains about.
As the config mechanisms are sufficiently complex I haven't attempted to fix them and supply a
patch and this may in fact be a problem with what appears to be an externally sourced library in any
event. The fix for SunOS is to add a pair of #defines to explicity set HAVE_MEMMOVE to false and
HAVE_BCOPY to true. The compile/link suceeds at that point.