php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6975 link fails with pcre_memmove multiply defined
Submitted: 2000-10-02 08:57 UTC Modified: 2001-01-30 03:51 UTC
From: enno dot davids at metva dot com dot au Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0.2 OS: SunOS 4
Private report: No CVE-ID: None
 [2000-10-02 08:57 UTC] enno dot davids at metva dot com dot au
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-18 10:37 UTC] sniper@php.net
Does this happen also with the latest snapshot from http://snaps.php.net/ ??

--Jani
 [2001-01-30 03:51 UTC] sniper@php.net
No feedback. If problem still exists with PHP 4.0.4pl1
reopen this bug report.

--Jani
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 19:01:30 2024 UTC