Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

centos 6.3 trying to install pcre 8.32

Posted on 2013-02-04
6
1,269 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
Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

 
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Like to learn Linux, need advice for a good book and setup. 3 55
Run same command on multiple files in Linux 3 57
web server dns redirect 5 40
expand ext4 on centos 6 5 37
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
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.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

856 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