Hello,

Now that pcre is part of the base LFS, I think you need to take into 
consideration how you will handle the conflict with the libc namespace, namely 
some of the functions declared in regex.h and their associated symbols in 
libc.so.6

The readme file (http://www.pcre.org/readme.txt) has these few paragraphs in it:

"The header file for the POSIX-style functions is called pcreposix.h. The
official POSIX name is regex.h, but I did not want to risk possible problems
with existing files of that name by distributing it that way. To use PCRE with
an existing program that uses the POSIX API, pcreposix.h will have to be
renamed or pointed at by a link.

If you are using the POSIX interface to PCRE and there is already a POSIX regex
library installed on your system, as well as worrying about the regex.h header
file (as mentioned above), you must also take care when linking programs to
ensure that they link with PCRE's libpcreposix library. Otherwise they may pick
up the POSIX functions of the same name from the other library.

One way of avoiding this confusion is to compile PCRE with the addition of
-Dregcomp=PCREregcomp (and similarly for the other POSIX functions) to the
compiler flags (CFLAGS if you are using "configure" -- see below). This has the
effect of renaming the functions so that the names no longer clash. Of course,
you have to do the same thing for your applications, or write them using the
new names."

Of course, another way of handling this is to do like Debian and patch pcre, 
renaming the conflicting functions, something like this: 
http://patch-tracker.debian.org/patch/misc/view/pcre3/8.02-1.1/pcreposix.h

JH
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to