The PCRE package contains Perl Compatible Regular Expression libraries. These are useful for implementing regular expression pattern matching using the same syntax and semantics as Perl 5.
Download (HTTP): http://downloads.sourceforge.net/pcre/pcre-7.6.tar.bz2
Download (FTP): ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.6.tar.bz2
Download MD5 sum: 2af38e083fb90ef60fa9eda7cc290e86
Download size: 780 KB
Estimated disk space required: 11 MB
Estimated build time: 0.3 SBU
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/pcre
Install PCRE by running the following commands:
patch -Np1 -i ../pcre-7.6-abi_breakage-1.patch && patch -Np1 -i ../pcre-7.6-security_fix-1.patch && ./configure --prefix=/usr \ --docdir=/usr/share/doc/pcre-7.6 \ --enable-utf8 \ --enable-pcregrep-libz \ --enable-pcregrep-libbz2 && make
To test the results, issue: make check. Note: The third set of the tests cannot be run if the "fr_FR" locale is missing from the system.
Now, as the root
user:
make install
If you reinstall Grep after
installing PCRE, Grep will get linked against PCRE and may cause problems if /usr
is a separate mount point. To avoid this,
either pass the option --disable-perl-regexp
when executing ./configure for Grep or move libpcre
to /lib
as
follows.
mv -v /usr/lib/libpcre.so.* /lib/ && ln -v -sf ../../lib/libpcre.so.0 /usr/lib/libpcre.so
--enable-utf8
: This switch
includes the code for handling UTF-8 character strings in the
library.
--enable-unicode-properties
: This
switch enables Unicode properties support.
--enable-pcregrep-libz
:
This switch adds support to pcregrep to read .gz
compressed files.
--enable-pcregrep-libbz2
:
This switch adds support to pcregrep to read .bz2
compressed files.
Last updated on 2008-07-09 09:23:33 -0500