Re: [pcre-dev] the error of install PCRE

Pàgina inicial
Delete this message
Autor: Petr Pisar
Data:  
A: pcre-dev
Assumpte: Re: [pcre-dev] the error of install PCRE
On Tue, Dec 18, 2012 at 05:42:14PM +0800, jiang fu wrote:
> hi, all
>
> i have a error info when i install PCRE. i used the version is 8.32. when i
> run ./configure, there will be an error info "configure: error: You need a
> C++ compiler for C++ support.".


Then you did not run "./configure", you run "./configure --enable-cpp", don't
you?

> but the fact is : when i type gcc -v.

It just shows how GCC has been configured at build time. Your distribution can
split support for languages into different packages making compiler for C++
unavailable. See <http://software.opensuse.org/package/gcc46-c++>.


> and if i using pcre of 8.00 version. it will find g++ and show like this :
> pcre-8.00 configuration summary:
>
>     Install prefix .................. : /usr/local
>     C preprocessor .................. : gcc -E
>     C compiler ...................... : gcc
>     C++ preprocessor ................ : /lib/cpp
>     C++ compiler .................... : g++
>     Linker .......................... : /usr/x86_64-suse-linux/bin/ld -m
> elf_x86_64
>     C preprocessor flags ............ :
>     C compiler flags ................ : -O2
>     C++ compiler flags .............. :
>     Linker flags .................... :
>     Extra libraries ................. :

>
>     Build C++ library ............... : yes

>

[...]
> but when i run make. it will can't find some head files. like: stddef.h and
> stdarg.h.
>

PCRE 8.30 could enable C++ support even without C++ compiler being available.
The error message says your are missing header files from C standard library.
Therefore the build failed.

You have to install package which contains `g++' executable and
packages which contains the two header files. I think you need
to install packages gcc46-c++, libstdc++46-devel and maybe more. You can use
"zypper wp g++" to find out which package provides a file
(http://en.opensuse.org/SDB:Zypper_usage_11.3#Dependencies).

-- Petr