libpcre2-posix uses the same name as POSIX
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pcre2 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
At present the POSIX interface of the (new) PCRE2 defines the same names as the standard POSIX regex API, e.g. "extern int regcomp(regex_t *, const char *, int);"
On Debian, despite including pcre2posix.h and linking with libpcre2-posix, the program will likely bind to the libc entry with the same name.
See attached source:
gcc -pipe -fPIC -std=gnu99 -D_FILE_
gcc -o tpcre2 tpcre2.o -lpcre2-posix -lpcre2-8 -lpthread -lm
ldd tpcre2
linux-vdso.so.1 => (0x00007ffd0dbb
libpcre2-8.so.0 => /usr/lib/
libc.so.6 => /lib/x86_
libpthread.so.0 => /lib/x86_
/lib64/
According to a discussion in the PCRE forum (https:/
NOTE:
On the (previous) PCRE POSIX API, a patch (https:/
This patch is to define specific names (e.g. pcreposix_regcomp (...)) and #define the standard name as an "alias" to it (#define regcomp pcreposix_regcomp).
This patch works fine and may probably be reproduced in pcre2-posix.
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: libpcre2-posix0 10.21-1
ProcVersionSign
Uname: Linux 4.4.0-22-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: XFCE
Date: Sun May 29 14:19:47 2016
Dependencies:
gcc-6-base 6.0.1-0ubuntu1
libc6 2.23-0ubuntu3
libgcc1 1:6.0.1-0ubuntu1
libpcre2-8-0 10.21-1
InstallationDate: Installed on 2016-02-01 (117 days ago)
InstallationMedia: Xubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
SourcePackage: pcre2
UpgradeStatus: Upgraded to xenial on 2016-04-23 (36 days ago)