Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

centos 6.3 trying to install pcre 8.32

Posted on 2013-02-04
6
Medium Priority
?
1,415 Views
Last Modified: 2013-06-06
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
0
Comment
Question by:WCGS_Operations
  • 3
  • 2
6 Comments
 
LVL 37

Expert Comment

by:ArneLovius
ID: 38854628
0
 

Author Comment

by:WCGS_Operations
ID: 38855470
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
0
 
LVL 37

Expert Comment

by:ArneLovius
ID: 38855694
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...
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 35

Accepted Solution

by:
Duncan Roe earned 2000 total points
ID: 38857156
I just downloaded pcre-8.32 and it built for me with no problems, using your ./configure line.
But I notice from the file suffices .cpp that this is a C++ package. With C++, the revision of gcc can be critical. What is your gcc version? I have
07:45:45$ gcc --version
gcc (GCC) 4.7.1
Copyright (C) 2012 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.

08:06:59$ 

Open in new window

0
 

Author Comment

by:WCGS_Operations
ID: 38857193
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
0
 

Author Closing Comment

by:WCGS_Operations
ID: 39225708
Thanks that was the problem, i just forgot to log back in here and note it. sorry all

Dave
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month11 days, 16 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question