Solved

centos 6.3 trying to install pcre 8.32

Posted on 2013-02-04
6
1,254 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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 34

Accepted Solution

by:
Duncan Roe earned 500 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

813 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now