Solved

centos 6.3 trying to install pcre 8.32

Posted on 2013-02-04
6
1,232 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 36

Expert Comment

by:ArneLovius
Comment Utility
0
 

Author Comment

by:WCGS_Operations
Comment Utility
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 36

Expert Comment

by:ArneLovius
Comment Utility
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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 34

Accepted Solution

by:
Duncan Roe earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks that was the problem, i just forgot to log back in here and note it. sorry all

Dave
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

743 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

15 Experts available now in Live!

Get 1:1 Help Now