Jump to content
  • 0
Fou-lu

Compile in Linux

Question

 

checking PCRE library... checking pcre.h usability... no
checking pcre.h presence... no
checking for pcre.h... no
configure: error: PCRE header not found

 

 
When I run ./configure I get this error. In git Hercules says that this library is optional, so why is preventing me from compiling ? And what is the importance of it?

Share this post


Link to post
Share on other sites

33 answers to this question

Recommended Posts

  • 0

Oh, I was doing some configs in another user, but yeah, both the users are in the same server and both return the same strings for gcc --version.

 

gcc --version and ./configure error strings:

 

[root@@ragnarok emulador]# gcc --version
gcc (GCC) 6.1.0
Copyright © 2016 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.

[root@@ragnarok emulador]# ./configure
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/emulador':
configure: error: C compiler cannot create executables
See `config.log' for more details

 

 

 

Also, idk why the config.log was showing that gcc had the 4.4 version. Heres the one from the above ./configure:

 

 

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.69. Invocation command line was

$ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = ragnarok
uname -m = i686
uname -r = 2.6.32-042stab113.11
uname -s = Linux
uname -v = #1 SMP Fri Dec 18 17:32:04 MSK 2015

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = i686
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /sbin
PATH: /bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /root/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2246: checking for gcc
configure:2262: found /usr/local/bin/gcc
configure:2273: result: gcc
configure:2502: checking for C compiler version
configure:2511: gcc --version >&5
gcc (GCC) 6.1.0
Copyright © 2016 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.

configure:2522: $? = 0
configure:2511: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/i686-pc-linux-gnu/6.1.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../gcc_6_1_0_release/configure
Thread model: posix
gcc version 6.1.0 (GCC)
configure:2522: $? = 0
configure:2511: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:2522: $? = 1
configure:2511: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'; did you mean '--version'?
gcc: fatal error: no input files
compilation terminated.
configure:2522: $? = 1
configure:2542: checking whether the C compiler works
configure:2564: gcc conftest.c >&5
/usr/bin/ld: unrecognized option '-plugin'
/usr/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
configure:2568: $? = 1
configure:2606: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2611: error: in `/home/emulador':
configure:2613: error: C compiler cannot create executables
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_prog_ac_ct_CC=gcc

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR=''
CC='gcc'
CFLAGS=''
CPP=''
CPPFLAGS=''
DEFS=''
DLLEXT=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
GREP=''
HAVE_DOXYGEN=''
HAVE_MYSQL=''
HAVE_PERL=''
LDFLAGS=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MYSQL_CFLAGS=''
MYSQL_CONFIG_HOME=''
MYSQL_LIBS=''
MYSQL_VERSION=''
OBJEXT=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PLUGINSTATIC=''
SET_MAKE=''
SHELL='/bin/sh'
SOFLAGS=''
STATIC=''
WITH_PLUGINS=''
ac_ct_CC='gcc'
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
runstatedir='${localstatedir}/run'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""

configure: exit 77

 

Share this post


Link to post
Share on other sites
  • 0

It said what it cant build even internal tests with your gcc. Probably some thing wrong installed

How you install gcc 6?

make and after make install? without any flags?

Share this post


Link to post
Share on other sites
  • 0

After make and make install:

 

 

echo "/usr/local/lib64" > usrLocalLib64.conf
sudo mv usrLocalLib64.conf /etc/ld.so.conf.d/
sudo ldconfig

cd ~/

rm -rf sourceInstallations

 

PS: I followed this guide (from "Install a newer version of GCC from source" onwards): https://www.vultr.com/docs/how-to-install-gcc-on-centos-6. Did all the steps but for the gcc 6.1 version.

Edited by Ga_Chittolina

Share this post


Link to post
Share on other sites
  • 0

Can you try step 11 from this instruction?

I think it should failed for you

Share this post


Link to post
Share on other sites
  • 0

@@4144

Indeed, it did fail. This is what it returned:

 

 [root@@ragnarok code]# g++ main.cpp -o main                                      
/usr/bin/ld: unrecognized option '-plugin'
/usr/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status

 

I'm thinking of uninstalling this gcc 6.1 and installing an older version, but how do I do it? It looks like yum can only install the 4.4 version.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.