Link to home
Start Free TrialLog in
Avatar of WCGS_Operations
WCGS_Operations

asked on

centos 6.3 trying to install pcre 8.32

Hello all,

Im trying to compile PCRE 8.32 on Centos 6.3 so i can install Apache 2.4.3

I run configure as such :

./configure --prefix=/opt/pcre-8.32

and everything runs fine, but when i try to run make i get what is showing below. I tried googling and cannot find anything. Im kinda new to this and dont know what to do to get this working. Any help would be great.

thanks
Dave

 

pcre-8.32]# make
make  all-am
make[1]: Entering directory `/usr/local/src/pcre-8.32'
  CXX    libpcrecpp_la-pcrecpp.lo
In file included from pcrecpp.h:335,
                 from pcrecpp.cc:48:
./pcrecpparg.h:89: error: expected ')' before '*' token
./pcrecpparg.h:89: error: expected ')' before '*' token
In file included from pcrecpp.h:338,
                 from pcrecpp.cc:48:
./pcre_stringpiece.h:55: error: 'std::memcmp' has not been declared
./pcre_stringpiece.h:56: error: 'std::strlen' has not been declared
./pcre_stringpiece.h:57: error: 'std::string' has not been declared
./pcre_stringpiece.h:77: error: ISO C++ forbids declaration of 'string' with no type
./pcre_stringpiece.h:77: error: expected ',' or '...' before '&' token
./pcre_stringpiece.h:142: error: 'string' does not name a type
./pcre_stringpiece.h:146: error: 'string' has not been declared
./pcre_stringpiece.h: In constructor 'pcrecpp::StringPiece::StringPiece(int)':
./pcre_stringpiece.h:78: error: 'str' was not declared in this scope
./pcre_stringpiece.h: In member function 'void pcrecpp::StringPiece::CopyToString(int*) const':
./pcre_stringpiece.h:147: error: request for member 'assign' in '* target', which is of non-class type 'int'
./pcre_stringpiece.h: At global scope:
./pcre_stringpiece.h:177: error: expected constructor, destructor, or type conversion before '&' token
In file included from pcrecpp.cc:48:
pcrecpp.h:491: error: ISO C++ forbids declaration of 'string' with no type
pcrecpp.h:491: error: expected ',' or '...' before '&' token
pcrecpp.h:492: error: ISO C++ forbids declaration of 'string' with no type
pcrecpp.h:492: error: expected ',' or '...' before '&' token
pcrecpp.h:492: error: 'pcrecpp::RE::RE(int)' cannot be overloaded
pcrecpp.h:491: error: with 'pcrecpp::RE::RE(int)'
pcrecpp.h:524: error: ISO C++ forbids declaration of 'string' with no type
pcrecpp.h:524: error: expected ';' before '&' token
pcrecpp.h:528: error: expected ';' before 'const'
pcrecpp.h:528: error: ISO C++ forbids declaration of 'string' with no type
pcrecpp.h:528: error: expected ';' before '&' token
pcrecpp.h:535: error: expected ';' before 'bool'
pcrecpp.h:608: error: 'string' has not been declared
pcrecpp.h:611: error: 'string' has not been declared
pcrecpp.h:615: error: 'string' has not been declared
pcrecpp.h:626: error: 'string' does not name a type
pcrecpp.h:660: error: ISO C++ forbids declaration of 'string' with no type
pcrecpp.h:660: error: expected ',' or '...' before '&' token
pcrecpp.h:683: error: 'string' has not been declared
pcrecpp.h:701: error: 'string' does not name a type
pcrecpp.h:705: error: ISO C++ forbids declaration of 'string' with no type
pcrecpp.h:705: error: expected ';' before '*' token
pcrecpp.h: In constructor 'pcrecpp::RE::RE(int)':
pcrecpp.h:491: error: 'pat' was not declared in this scope
pcrecpp.h: In constructor 'pcrecpp::RE::RE(int)':
pcrecpp.h:492: error: 'pat' was not declared in this scope
pcrecpp.h:492: error: 'option' was not declared in this scope
pcrecpp.h: In constructor 'pcrecpp::RE::RE(const char*)':
pcrecpp.h:493: error: no matching function for call to 'pcrecpp::RE::Init(const char*&, NULL)'
pcrecpp.h:660: note: candidates are: void pcrecpp::RE::Init(int)
pcrecpp.h: In constructor 'pcrecpp::RE::RE(const char*, const pcrecpp::RE_Options&)':
pcrecpp.h:494: error: no matching function for call to 'pcrecpp::RE::Init(const char*&, const pcrecpp::RE_Options*)'
pcrecpp.h:660: note: candidates are: void pcrecpp::RE::Init(int)
pcrecpp.h: In constructor 'pcrecpp::RE::RE(const unsigned char*)':
pcrecpp.h:496: error: no matching function for call to 'pcrecpp::RE::Init(const char*, NULL)'
pcrecpp.h:660: note: candidates are: void pcrecpp::RE::Init(int)
pcrecpp.h: In constructor 'pcrecpp::RE::RE(const unsigned char*, const pcrecpp::RE_Options&)':
pcrecpp.h:499: error: no matching function for call to 'pcrecpp::RE::Init(const char*, const pcrecpp::RE_Options*)'
pcrecpp.h:660: note: candidates are: void pcrecpp::RE::Init(int)
pcrecpp.h: In copy constructor 'pcrecpp::RE::RE(const pcrecpp::RE&)':
pcrecpp.h:504: error: 'const class pcrecpp::RE' has no member named 'pattern_'
pcrecpp.h: In member function 'const pcrecpp::RE& pcrecpp::RE::operator=(const pcrecpp::RE&)':
pcrecpp.h:513: error: 'const class pcrecpp::RE' has no member named 'pattern_'
pcrecpp.cc: At global scope:
pcrecpp.cc:78: error: 'string' does not name a type
pcrecpp.cc:83: error: ISO C++ forbids declaration of 'string' with no type
pcrecpp.cc:83: error: expected ',' or '...' before '&' token
pcrecpp.cc: In member function 'void pcrecpp::RE::Init(int)':
pcrecpp.cc:84: error: 'pattern_' was not declared in this scope
pcrecpp.cc:84: error: 'pat' was not declared in this scope
pcrecpp.cc:85: error: 'options' was not declared in this scope
pcrecpp.cc:90: error: 'error_' was not declared in this scope
pcrecpp.cc:90: error: 'empty_string' was not declared in this scope
pcrecpp.cc: In member function 'void pcrecpp::RE::Cleanup()':
pcrecpp.cc:103: error: 'error_' was not declared in this scope
pcrecpp.cc:103: error: 'empty_string' was not declared in this scope
pcrecpp.cc:103: error: type '<type error>' argument given to 'delete', expected pointer
pcrecpp.cc: In member function 'pcre* pcrecpp::RE::Compile(pcrecpp::RE::Anchor)':
pcrecpp.cc:133: error: 'pattern_' was not declared in this scope
pcrecpp.cc:138: error: 'string' was not declared in this scope
pcrecpp.cc:138: error: expected ';' before 'wrapped'
pcrecpp.cc:139: error: 'wrapped' was not declared in this scope
pcrecpp.cc:139: error: 'pattern_' was not declared in this scope
pcrecpp.cc:145: error: 'error_' was not declared in this scope
pcrecpp.cc:145: error: 'empty_string' was not declared in this scope
pcrecpp.cc:145: error: expected type-specifier before 'string'
pcrecpp.cc:145: error: expected ';' before 'string'
pcrecpp.cc: At global scope:
pcrecpp.cc:333: error: 'string' has not been declared
pcrecpp.cc: In member function 'bool pcrecpp::RE::Replace(const pcrecpp::StringPiece&, int*) const':
pcrecpp.cc:339: error: 'string' was not declared in this scope
pcrecpp.cc:339: error: expected ';' before 's'
pcrecpp.cc:340: error: 's' was not declared in this scope
pcrecpp.cc:345: error: request for member 'replace' in '* str', which is of non-class type 'int'
pcrecpp.cc:345: error: 's' was not declared in this scope
pcrecpp.cc: At global scope:
pcrecpp.cc:382: error: 'string' has not been declared
pcrecpp.cc: In member function 'int pcrecpp::RE::GlobalReplace(const pcrecpp::StringPiece&, int*) const':
pcrecpp.cc:385: error: 'string' was not declared in this scope
pcrecpp.cc:385: error: expected ';' before 'out'
pcrecpp.cc:389: error: request for member 'length' in '* str', which is of non-class type 'int'
pcrecpp.cc:410: error: request for member 'length' in '* str', which is of non-class type 'int'
pcrecpp.cc:411: error: invalid types 'int[int]' for array subscript
pcrecpp.cc:411: error: invalid types 'int[int]' for array subscript
pcrecpp.cc:425: error: request for member 'length' in '* str', which is of non-class type 'int'
pcrecpp.cc:426: error: 'out' was not declared in this scope
pcrecpp.cc:439: error: 'out' was not declared in this scope
pcrecpp.cc:449: error: request for member 'length' in '* str', which is of non-class type 'int'
pcrecpp.cc:450: error: 'out' was not declared in this scope
pcrecpp.cc:450: error: request for member 'length' in '* str', which is of non-class type 'int'
pcrecpp.cc:451: error: 'out' was not declared in this scope
pcrecpp.cc:451: error: 'swap' was not declared in this scope
pcrecpp.cc: At global scope:
pcrecpp.cc:457: error: 'string' has not been declared
pcrecpp.cc: In member function 'bool pcrecpp::RE::Extract(const pcrecpp::StringPiece&, const pcrecpp::StringPiece&, int*) const':
pcrecpp.cc:462: error: request for member 'erase' in '* out', which is of non-class type 'int'
pcrecpp.cc: At global scope:
pcrecpp.cc:466: error: 'string' does not name a type
pcrecpp.cc:615: error: 'bool pcrecpp::RE::Rewrite' is not a static member of 'class pcrecpp::RE'
pcrecpp.cc:615: error: 'string' was not declared in this scope
pcrecpp.cc:615: error: 'out' was not declared in this scope
pcrecpp.cc:615: error: expected primary-expression before 'const'
pcrecpp.cc:616: error: expected primary-expression before 'const'
pcrecpp.cc:616: error: expected primary-expression before 'int'
pcrecpp.cc:616: error: expected primary-expression before 'int'
pcrecpp.cc:616: error: initializer expression list treated as compound expression
pcrecpp.cc:616: error: expected ',' or ';' before 'const'
pcrecpp.cc:922: error: expected '}' at end of input
make[1]: *** [libpcrecpp_la-pcrecpp.lo] Error 1
make[1]: Leaving directory `/usr/local/src/pcre-8.32'
make: *** [all] Error 2
Avatar of ArneLovius
ArneLovius
Flag of United Kingdom of Great Britain and Northern Ireland image

Avatar of WCGS_Operations
WCGS_Operations

ASKER

This is just like the page im following, its compiling the PCRE part that is the problem as listed above. its this section of the page that is not working:

Compile the Perl Compatible Regular Expression Library
The Perl Compatible Regular Expression Library (PCRE) is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5. It is used by Apache HTTP Server 2.4.

1. Download the PCRE library from http://www.pcre.org
2. Extract the Unix Source file downloaded

tar zxvf pcre-8.32.tar.gz

3. Run the following command to compile the PCRE Library. Assuming the directory to be installed is /opt/pcre-8.32.

cd pcre-8.32
./configure --prefix=/opt/pcre-8.32
make
make install

4. The PCRE Library should be installed at the location /opt/pcre-8.32
have you installed all of the pre-reqs ?

have you installed anything else on this Centos instance ?

I might try downloading and untarring/unzipping the source again...
ASKER CERTIFIED SOLUTION
Avatar of Duncan Roe
Duncan Roe
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks , here is my version info. that could be the problem

[root@testdave ~]# gcc --version
gcc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


i will try to update and try again
Dave
Thanks that was the problem, i just forgot to log back in here and note it. sorry all

Dave