GCC gcc-5.4.0 build on centos7 - c++

On centos 7 i am trying to install GCC 5.4 via source code but it went into infinite loop always.
Environment :-
uname -a
Linux 3.10.0-1062.12.1.rt56.1042.el7.x86_64 #1 SMP PREEMPT RT Wed Feb 5 10:31:05 CET 2020 x86_64 x86_64 x86_64 GNU/Linux
cat /etc/redhat-release
CentOS Linux release 7.8.2003 (Core)
rpm -qa | grep -i gcc
libgcc-4.8.5-44.el7.x86_64
gcc-c++-4.8.5-44.el7.x86_64
gcc-gfortran-4.8.5-44.el7.x86_64
gcc-4.8.5-44.el7.x86_64
gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 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.
Now, I tried to build GCC 5.4 and getting below message on my screen in infinite loop.
My config.log initial content as below.
uname -m = x86_64
uname -r = 3.10.0-1062.12.1.rt56.1042.el7.x86_64
uname -s = Linux
uname -v = #1 SMP PREEMPT RT Wed Feb 5 10:31:05 CET 2020
/usr/bin/uname -p = x86_64
/bin/uname -X = unknown
/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
# make -j$(nproc) && make install
checking for compatible ISL... no
*** This configuration is not supported in the following subdirectories:
target-libmpx gnattools gotools target-libada target-libgfortran target-libgo target-libffi target-libbacktrace target-zlib target-libjava target-libobjc target-liboffloadmic target-boehm-gc
(Any other directories should still work fine.)
checking for default BUILD_CONFIG... bootstrap-debug
checking for --enable-vtable-verify... no
checking for bison... bison -y
checking for bison... bison
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... no
checking for runtest... no
checking for x86_64-linux-gnu-ar... no
checking for ar... ar
checking for x86_64-linux-gnu-as... no
checking for as... as
checking for x86_64-linux-gnu-dlltool... no
checking for dlltool... no
checking for x86_64-linux-gnu-ld... no
checking for ld... ld
checking for x86_64-linux-gnu-lipo... no
checking for lipo... no
checking for x86_64-linux-gnu-nm... no
checking for nm... nm
checking for x86_64-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for x86_64-linux-gnu-strip... no
checking for strip... strip
checking for x86_64-linux-gnu-windres... no
checking for windres... no
checking for x86_64-linux-gnu-windmc... no
checking for windmc... no
checking for x86_64-linux-gnu-objcopy... no
checking for objcopy... objcopy
checking for x86_64-linux-gnu-objdump... no
checking for objdump... objdump
checking for x86_64-linux-gnu-readelf... no
checking for readelf... readelf
checking for cc... cc
checking for c++... c++
checking for gcc... gcc
checking for gcj... no
checking for gfortran... gfortran
checking for gccgo... no
checking for ar... no
checking for ar... ar
checking for as... no
checking for as... as
checking for dlltool... no
checking for dlltool... no
checking for ld... no
checking for ld... ld
checking for lipo... no
checking for lipo... no
checking for nm... no
checking for nm... nm
checking for objcopy... no
checking for objcopy... objcopy
checking for objdump... no
checking for objdump... objdump
checking for ranlib... no
checking for ranlib... ranlib
checking for readelf... no
checking for readelf... readelf
checking for strip... no
checking for strip... strip
checking for windres... no
checking for windres... no
checking for windmc... no
checking for windmc... no
checking where to find the target ar... host tool
checking where to find the target as... host tool
checking where to find the target cc... just compiled
checking where to find the target c++... just compiled
checking where to find the target c++ for libstdc++... just compiled
checking where to find the target dlltool... host tool
checking where to find the target gcc... just compiled
checking where to find the target gcj... host tool
checking where to find the target gfortran... host tool
checking where to find the target gccgo... host tool
checking where to find the target ld... host tool
checking where to find the target lipo... host tool
checking where to find the target nm... host tool
checking where to find the target objcopy... host tool
checking where to find the target objdump... host tool
checking where to find the target ranlib... host tool
checking where to find the target readelf... host tool
checking where to find the target strip... host tool
checking where to find the target windres... host tool
checking where to find the target windmc... host tool
checking whether to enable maintainer-specific portions of Makefiles... no
configure: creating ./config.status
Any suggestion to install GCC will help a lot.

Thanks, for your guidance. I tried with higher version GCC 7.0, enable internet on server and run "./contrib/download_prerequisites". It resolved issue and GCC installed sucessfully.

Related

./configure results in bootstrapping make fragment error only on github

I have a docker container build from debian:latest. The Dockerfile configures and makes the project the project. This build works on local and builds a container. However on github it gives me the following error:
[1/2] STEP 16/17: RUN ./configure GIT_BRANCH=$BRANCH GIT_VERSION=$VERSION
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... none needed
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 3145728
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver #FILE support... #
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether g++ supports C++14 features with -std=c++14... yes
checking for boostlib >= 1.42.0... yes
checking whether the Boost::Regex library is available... yes
checking for exit in -lboost_regex... yes
checking for sphirewall-libs... configure: We could not detect the sphirewall libraries.
checking for ldap_simple_bind_s in -lldap... yes
checking for pthread_create in -lpthread... yes
checking for curl_global_init in -lcurl... yes
checking for sys/types.h... (cached) yes
checking for netinet/in.h... yes
checking for arpa/nameser.h... yes
checking for netdb.h... yes
checking for resolv.h... yes
checking whether to enable assertions... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libprocps... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating src/Makefile
config.status: creating Makefile
config.status: creating src/autoconf.h
config.status: executing depfiles commands
config.status: error: in `/sphirewall-code/sphirewall-core':
config.status: error: Something went wrong bootstrapping makefile fragments
for automatic dependency tracking. If GNU make was not used, consider
re-running the configure script with MAKE="gmake" (or whatever is
necessary). You can also try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).
See `config.log' for more details
[2/2] STEP 1/10: FROM debian:latest
error building at STEP "RUN ./configure GIT_BRANCH=$BRANCH GIT_VERSION=$VERSION": error while running runtime: exit status 1
time="2023-01-12T15:41:50Z" level=error msg="exit status 1"
Error: Error: buildah exited with code 1
I expect my github action to build a container out of this. I have attached my docker file too. I also wish I could see the config.log that github generates. Is there a way to do that?
Docker file:
#Taking base as bookworm version and naming it builder
FROM debian:latest as builder
ENV DEBIAN_FRONTEND=noninteractive
#Libraries needed
RUN apt-get update
RUN apt-get -y install build-essential apt-utils\
libprocps-dev\
iproute2\
g++\
libcurl4-openssl-dev\
libdumbnet-dev\
libjemalloc-dev\
libpam0g-dev\
libldap2-dev\
libpcap-dev\
libevent-dev\
libnfnetlink-dev\
libmnl-dev\
ldap-utils\
libnetfilter-queue-dev\
uuid-dev\
libtool\
libncurses5\
libncurses5-dev\
libboost-dev\
libgtest-dev\
libboost-regex-dev\
openssl\
libssl-dev\
automake\
libboost-thread-dev\
libboost-system-dev\
libsqlite3-dev\
libboost-serialization-dev\
libboost-random-dev\
libboost-iostreams-dev\
procps\
libnetfilter-conntrack-dev\
libpstreams-dev\
kmod\
vim\
iptables\
pkg-config
COPY fz-pkgrepo_1.0_amd64.deb /tmp
RUN dpkg -i /tmp/fz-pkgrepo_1.0_amd64.deb
RUN apt-get update
COPY sphirewall.conf /etc/sphirewall.conf
RUN mkdir sphirewall-code
COPY ../sphirewall-code sphirewall-code/
WORKDIR /sphirewall-code/sphirewall-core
#Make the sphirewalld service inside
RUN ls
RUN autoreconf -ivf
RUN ./configure
RUN make

install gcc 4.9 under suse10, "checking whether to enable maintainer-specific portions of Makefiles... no"

I install gcc 4.9 by the following step
wget ftp://mirrors.kernel.org/gnu/gcc/gcc-4.9.0/gcc-4.9.0.tar.gz
tar -zxvf gcc-4.9.0.tar.gz
cd gcc-4.9.0
./contrib/download_prerequisites
cd ..
mkdir gcc-build-4.9.0
cd gcc-build-4.9.0
../gcc-4.9.0/configure --enable-checking=release --enable-languages=c,c++ --disable-multilib
when I run the last command, it show the error message and stop
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... gawk
checking for libatomic support... yes
checking for libcilkrts support... yes
checking for libitm support... yes
checking for libsanitizer support... yes
checking for libvtv support... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether g++ accepts -static-libstdc++ -static-libgcc... yes
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for objdir... .libs
configure: WARNING: using in-tree ISL, disabling version check
configure: WARNING: using in-tree CLooG, disabling version check
*** This configuration is not supported in the following subdirectories:
gnattools target-libada target-libgfortran target-libgo target-libffi target-libbacktrace target-zlib target-libjava target-libobjc target-boehm-gc
(Any other directories should still work fine.)
checking for default BUILD_CONFIG... bootstrap-debug
checking for --enable-vtable-verify... no
checking for bison... bison -y
checking for bison... bison
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... no
checking for runtest... no
checking for ar... ar
checking for as... as
checking for dlltool... no
checking for ld... ld
checking for lipo... no
checking for nm... nm
checking for ranlib... ranlib
checking for strip... strip
checking for windres... no
checking for windmc... no
checking for objcopy... objcopy
checking for objdump... objdump
checking for readelf... readelf
checking for cc... cc
checking for c++... c++
checking for gcc... gcc
checking for gcj... no
checking for gfortran... gfortran
checking for gccgo... no
checking for ar... no
checking for ar... ar
checking for as... no
checking for as... as
checking for dlltool... no
checking for dlltool... no
checking for ld... no
checking for ld... ld
checking for lipo... no
checking for lipo... no
checking for nm... no
checking for nm... nm
checking for objdump... no
checking for objdump... objdump
checking for ranlib... no
checking for ranlib... ranlib
checking for readelf... no
checking for readelf... readelf
checking for strip... no
checking for strip... strip
checking for windres... no
checking for windres... no
checking for windmc... no
checking for windmc... no
checking where to find the target ar... host tool
checking where to find the target as... host tool
checking where to find the target cc... just compiled
checking where to find the target c++... just compiled
checking where to find the target c++ for libstdc++... just compiled
checking where to find the target dlltool... host tool
checking where to find the target gcc... just compiled
checking where to find the target gcj... host tool
checking where to find the target gfortran... host tool
checking where to find the target gccgo... host tool
checking where to find the target ld... host tool
checking where to find the target lipo... host tool
checking where to find the target nm... host tool
checking where to find the target objdump... host tool
checking where to find the target ranlib... host tool
checking where to find the target readelf... host tool
checking where to find the target strip... host tool
checking where to find the target windres... host tool
checking where to find the target windmc... host tool
checking whether to enable maintainer-specific portions of Makefiles... no
configure: creating ./config.status
config.status: creating Makefile
the error is "checking whether to enable maintainer-specific portions of Makefiles... no"
any idea?
As a comment already mentioned, there is no error. The next step is to actually start building the compiler, and then install it. E.g. something like
# How many cpu's to use
NCPUS=4
make -j $NCPUS && make install
Note that as you haven't specified a prefix for your configure command, the default will be /usr/local, which might not be what you want. So I'd recommend rerunning configure, and adding something like --prefix=/home/sleepworm/gcc-install-4.9.0
Also, why are you building 4.9.0 when 4.9.2 with some bugfixes has already been released?
FWIW, the "checking whether to enable maintainer-specific portions of Makefiles... no" thing can be changed by passing --enable-maintainer-mode to configure. It does enable some extra things, such as regeneration of some files etc., which are of interest only if you wish to develop gcc, rather than develop with gcc.

Error when attempting to compile libpqxx-4.0.1 on Solaris 10 using Oracle Solaris Studio 12.3

Problem description
I am unable to compile libpqxx-4.0.1 on Solaris 10 using Solaris Studio 12.3.
Background
The first thing I did when I needed libpqxx was to search for it in OpenCSW
using /opt/csw/bin/pkgutil -a libpqxx. However, the package in OpenCSW is
listed as being version "5.0,REV=2012.05.06" and looking at
CSWlibpqxx5-0 on the OpenCSW
website seems to indicate that this is an old, unstable snapshot. I would like
a stable version.
I downloaded libpqxx-4.0.1.tar.gz from the libpqxx website and compiled it.
It was compiled with g++ since I had it and other tools in my $PATH.
It worked. Everything was coming along nicely. I was able to SELECT from my
database and so on.
I then got to the stage which was most important for my code; to communicate
with a proprietary C++ API. My code would no longer compile with g++ after I
attempted to link to the libraries for this API. The API includes examples
which I had previously compiled using CC. The examples do not compile using
g++. I figured that I'd have to compile my code using CC as well, instead
of using g++. My code would not compile using CC. There was something with
the g++ compiled libpqxx-4.0.1 that CC did not like.
Thus, I decided that I'd need to compile libpqxx-4.0.1 using CC also, instead
of using g++.
Steps taken
To eliminate problems caused by a potentially misconfigured environment
(I've been using my account on the system since 2012 and over time,
various environment variables and such have accumulated),
I created a new user on the system with a clean home directory.
Below is a transcript of what I did next, leading up to the build error.
-bash-3.2$ pwd
/var/tmp/build
-bash-3.2$ ls -al
total 3506
drwxr-xr-x 3 build build 6 Oct 22 13:23 .
drwxrwxrwt 45 root sys 601 Oct 22 13:22 ..
-rw------- 1 build build 0 Oct 22 13:23 .bash_history
drwxr-xr-x 2 build build 2 Oct 22 12:57 install_test
-rw-r--r-- 1 build build 1582532 Oct 22 12:54 libpqxx-4.0.1.tar.gz
-rwxr-xr-x 1 build build 4924 Oct 22 13:02 splitconfig
-bash-3.2$ /usr/sfw/bin/gtar xf libpqxx-4.0.1.tar.gz
Python 2.4.6, the /usr/bin/python in Solaris 10 had trouble with a script so
I did a quick and dirty patch.
-bash-3.2$ diff libpqxx-4.0.1/tools/splitconfig splitconfig
1c1
< #! /usr/bin/python
---
> #! /opt/csw/bin/python2.7
-bash-3.2$ cp splitconfig libpqxx-4.0.1/tools/
My $PATH at this point is only /usr/bin.
-bash-3.2$ echo $PATH
/usr/bin:
I need ld. It is found in /usr/ccs/bin.
-bash-3.2$ export PATH=$PATH:/usr/ccs/bin
CC is from Oracle Solaris Studio 12.3.
(See details under heading additional information.)
-bash-3.2$ which CC
/usr/bin/CC
-bash-3.2$ cd libpqxx-4.0.1
-bash-3.2$ ./configure --prefix=/var/tmp/build/install_test --enable-shared --enable-documentation
checking for a BSD-compatible install... config/install-sh -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... CC
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... no
checking whether CC accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of CC... none
checking for gcc... no
checking for cc... cc
checking whether we are using the GNU C compiler... no
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking dependency style of cc... none
checking build system type... i386-pc-solaris2.10
checking host system type... i386-pc-solaris2.10
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/xpg4/bin/grep
checking for egrep... /usr/xpg4/bin/grep -E
checking for fgrep... /usr/xpg4/bin/grep -F
checking for non-GNU ld... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/ccs/bin/nm -p
checking the name lister (/usr/ccs/bin/nm -p) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 786240
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert i386-pc-solaris2.10 file names to i386-pc-solaris2.10 format... func_convert_file_noop
checking how to convert i386-pc-solaris2.10 file names to toolchain format... func_convert_file_noop
checking for /usr/ccs/bin/ld option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver #FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/ccs/bin/nm -p output from cc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... cc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking for cc option to produce PIC... -KPIC -DPIC
checking if cc PIC flag -KPIC -DPIC works... yes
checking if cc static flag -Bstatic works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... solaris2.10 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... CC -E
checking whether the CC linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking for CC option to produce PIC... -KPIC -DPIC
checking if CC PIC flag -KPIC -DPIC works... yes
checking if CC static flag -Bstatic works... yes
checking if CC supports -c -o file.o... yes
checking if CC supports -c -o file.o... (cached) yes
checking whether the CC linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... solaris2.10 ld.so
checking how to hardcode library paths into programs... immediate
checking whether make sets $(MAKE)... (cached) yes
checking for mkdir... /usr/bin/mkdir
checking for pkg-config... /usr/bin/pkg-config
checking for doxygen... no
checking for dot... NO
checking for xmlto... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking maintainer mode...
checking name of standard library namespace (normally "std")... ::std
checking boost/smart_ptr.hpp usability... no
checking boost/smart_ptr.hpp presence... no
checking for boost/smart_ptr.hpp... no
checking whether TR1 headers live in tr1 directory... no
checking namespace of TR1 extension to the C++ standard... std
checking ios usability... yes
checking ios presence... yes
checking for ios... yes
checking streambuf usability... yes
checking streambuf presence... yes
checking for streambuf... yes
checking locale usability... yes
checking locale presence... yes
checking for locale... yes
checking locale function and stringstream::imbue... yes
checking char_traits template... yes
checking "warning" preprocessor directive... yes
checking "message" preprocessor pragma... yes
checking for pg_config... /usr/bin/pg_config
configure: using PostgreSQL headers at /usr/include/pgsql
configure: using PostgreSQL libraries at /usr/lib
checking for ANSI C header files... (cached) yes
checking ability to compile programs using the standard C library... yes
checking for library containing select... none required
checking /usr/include/pgsql/libpq-fe.h usability... yes
checking /usr/include/pgsql/libpq-fe.h presence... yes
checking for /usr/include/pgsql/libpq-fe.h... yes
checking for ability to compile source files using libpq... yes
checking for main in -lpq... yes
checking for PQexec in -lpq... yes
checking for correct C++ linkage of basic libpq functions... yes
checking that type of libpq's Oid is as expected... yes
checking lo_tell()... yes
checking for strerror_r... no
configure: WARNING:
No definition of strerror_r, the thread-safe version of strerror(), was found in
your <cstring> header.
This may be because your implementation strerror() is threadsafe, in which case
there is nothing to worry about.
checking for strnlen... no
checking for strlcpy... no
checking for long long... yes
checking for long double... yes
checking for working <sys/select.h>... yes
checking for poll()... yes
checking for working fd_set... yes
checking if select() accepts NULL fdsets... yes
checking sleep()... yes
checking PQisthreadsafe()... no
checking PQescapeLiteral()... no
checking support for hex binary escaping format... no
checking PQescapeIdentifier()... pqescapeidentifier
checking PQencryptPassword()... no
checking PQmblen()... yes
checking PQdescribePortal()... no
checking PQclientEncoding()... yes
checking PQcancel()... yes
checking limits usability... yes
checking limits presence... yes
checking for limits... yes
checking for C99 isnan()... no
checking for std::numeric_limits<>::quiet_NaN()... yes
checking for C NAN macro... no
checking for C99 nan() family... no
checking for C99 isinf()... no
checking whether std::string has a clear() function... yes
checking for standard distance()... no
checking if count_if() works as expected... no
checking whether <iterator> defines a usable iterator template... yes
checking for reverse_iterator template... no
checking for auto_ptr... yes
checking for tr1::shared_ptr... no
checking for unique_ptr... no
checking for move()... no
checking whether overloaded using-declarations work... yes
checking whether make sets $(MAKE)... (cached) yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config/Makefile
config.status: creating debian/Makefile
config.status: creating doc/Makefile
config.status: creating doc/Doxyfile
config.status: creating src/Makefile
config.status: creating test/Makefile
config.status: creating test/unit/Makefile
config.status: creating tools/Makefile
config.status: creating win32/Makefile
config.status: creating include/Makefile
config.status: creating include/pqxx/Makefile
config.status: creating libpqxx.pc
config.status: creating pqxx-config
config.status: creating libpqxx.spec
config.status: creating include/pqxx/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing configitems commands
Generating include/pqxx/config-internal-autotools.h: 7 item(s).
Generating include/pqxx/config-internal-compiler.h: 10 item(s).
Generating include/pqxx/config-internal-libpq.h: 4 item(s).
Generating include/pqxx/config-public-autotools.h: no items--skipping.
Generating include/pqxx/config-public-compiler.h: 11 item(s).
Generating include/pqxx/config-public-libpq.h: no items--skipping.
make from /usr/ccs/bin was unable to build it earlier so now I try using
dmake from Oracle Solaris Studio 12.3.
-bash-3.2$ which make
/usr/ccs/bin/make
-bash-3.2$ which dmake
/usr/bin/dmake
-bash-3.2$ dmake
dmake: defaulting to parallel mode.
See the man page dmake(1) for more information on setting up the .dmakerc file.
Making all in include
Making all in pqxx
dmake all-am
Making all in src
develop --> 1 job
source='binarystring.cxx' object='binarystring.lo' libtool=yes \
DEPDIR=.deps depmode=none /bin/bash ../config/depcomp \
/bin/bash ../libtool --tag=CXX --mode=compile CC -DHAVE_CONFIG_H -I../include -I../include -I/usr/include/pgsql -g -c -o binarystring.lo binarystring.cxx
develop --> 2 jobs
source='connection_base.cxx' object='connection_base.lo' libtool=yes \
DEPDIR=.deps depmode=none /bin/bash ../config/depcomp \
/bin/bash ../libtool --tag=CXX --mode=compile CC -DHAVE_CONFIG_H -I../include -I../include -I/usr/include/pgsql -g -c -o connection_base.lo connection_base.cxx
develop --> Job output
source='connection_base.cxx' object='connection_base.lo' libtool=yes \
DEPDIR=.deps depmode=none /bin/bash ../config/depcomp \
/bin/bash ../libtool --tag=CXX --mode=compile CC -DHAVE_CONFIG_H -I../include -I../include -I/usr/include/pgsql -g -c -o connection_base.lo connection_base.cxx
libtool: compile: CC -DHAVE_CONFIG_H -I../include -I../include -I/usr/include/pgsql -g -c connection_base.cxx -KPIC -DPIC -o .libs/connection_base.o
"connection_base.cxx", line 480: Error: Cannot use std::__reverse_bi_iterator<std::list<pqxx::errorhandler*>::iterator, std::bidirectional_iterator_tag, pqxx::errorhandler*, pqxx::errorhandler*&, pqxx::errorhandler**, int> to initialize const std::__reverse_bi_iterator<std::list<pqxx::errorhandler*>::const_iterator, std::bidirectional_iterator_tag, pqxx::errorhandler*, pqxx::errorhandler*const&, pqxx::errorhandler*const*, int>.
"connection_base.cxx", line 481: Error: Cannot use std::__reverse_bi_iterator<std::list<pqxx::errorhandler*>::iterator, std::bidirectional_iterator_tag, pqxx::errorhandler*, pqxx::errorhandler*&, pqxx::errorhandler**, int> to initialize const std::__reverse_bi_iterator<std::list<pqxx::errorhandler*>::const_iterator, std::bidirectional_iterator_tag, pqxx::errorhandler*, pqxx::errorhandler*const&, pqxx::errorhandler*const*, int>.
"connection_base.cxx", line 1001: Error: Cannot use std::__reverse_bi_iterator<std::list<pqxx::errorhandler*>::iterator, std::bidirectional_iterator_tag, pqxx::errorhandler*, pqxx::errorhandler*&, pqxx::errorhandler**, int> to initialize const std::__reverse_bi_iterator<std::list<pqxx::errorhandler*>::const_iterator, std::bidirectional_iterator_tag, pqxx::errorhandler*, pqxx::errorhandler*const&, pqxx::errorhandler*const*, int>.
"connection_base.cxx", line 1002: Error: Cannot use std::__reverse_bi_iterator<std::list<pqxx::errorhandler*>::iterator, std::bidirectional_iterator_tag, pqxx::errorhandler*, pqxx::errorhandler*&, pqxx::errorhandler**, int> to initialize const std::__reverse_bi_iterator<std::list<pqxx::errorhandler*>::const_iterator, std::bidirectional_iterator_tag, pqxx::errorhandler*, pqxx::errorhandler*const&, pqxx::errorhandler*const*, int>.
4 Error(s) detected.
*** Error code 1
dmake: Fatal error: Command failed for target `connection_base.lo'
Current working directory /var/tmp/build/libpqxx-4.0.1/src
Waiting for 1 job to finish
develop --> Job output
source='binarystring.cxx' object='binarystring.lo' libtool=yes \
DEPDIR=.deps depmode=none /bin/bash ../config/depcomp \
/bin/bash ../libtool --tag=CXX --mode=compile CC -DHAVE_CONFIG_H -I../include -I../include -I/usr/include/pgsql -g -c -o binarystring.lo binarystring.cxx
libtool: compile: CC -DHAVE_CONFIG_H -I../include -I../include -I/usr/include/pgsql -g -c binarystring.cxx -KPIC -DPIC -o .libs/binarystring.o
libtool: compile: CC -DHAVE_CONFIG_H -I../include -I../include -I/usr/include/pgsql -g -c binarystring.cxx -o binarystring.o >/dev/null 2>&1
*** Error code 1
The following command caused the error:
fail= failcom='exit 1'; \
for f in x $MAKEFLAGS; do \
case $f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo all-recursive | sed s/-recursive//`; \
list='include src test tools win32 config debian doc'; for subdir in $list; do \
echo "Making $target in $subdir"; \
if test "$subdir" = "."; then \
dot_seen=yes; \
local_target="$target-am"; \
else \
local_target="$target"; \
fi; \
(CDPATH="${ZSH_VERSION+.}:" && cd $subdir && dmake $local_target) \
|| eval $failcom; \
done; \
if test "$dot_seen" = "no"; then \
dmake "$target-am" || exit 1; \
fi; test -z "$fail"
dmake: Fatal error: Command failed for target `all-recursive'
Additional information
-bash-3.2$ cat /etc/release
Solaris 10 10/09 s10x_u8wos_08a X86
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 16 September 2009
-bash-3.2$ /usr/bin/version
Solaris Studio version tool
Usage: version <file> ... # show version string in one or more binaries
version -p <command> ... # look command(s) on PATH and show version
To see a list of the Studio components installed on your system, use
the package command that is appropriate for your system.
To see which package contains the cc binary use commands like this:
On Solaris 10 : pkgchk -l -p /path/to/.../bin/cc
On Solaris 11 : pkg search -lp /path/to/.../bin/cc
On Linux : rpm -qf /path/to/.../bin/cc
To see which Studio packages are installed on the system:
On Solaris 10 : pkginfo | grep SPRO
On Solaris 11 : pkg list | grep -i studio
On Linux : rpm -qa | grep solstudio | head
-bash-3.2$ pkgchk -l -p /usr/bin/CC
-bash: pkgchk: command not found
-bash-3.2$ pkginfo | grep SPRO
application SPRO-12-3-analyzer Performance Analyzer (including collect, analyzer, er_print, ...)
application SPRO-12-3-backend Compiler Common Files
application SPRO-12-3-c++ C++ Compilers
application SPRO-12-3-c++-libs C++ dynamic libraries
application SPRO-12-3-cc C Compiler
application SPRO-12-3-code-analyzer Oracle Solaris Studio Code Analyzer Tool
application SPRO-12-3-dbx Dbx Debugging Tools
application SPRO-12-3-dbxtool Dbxtool standalone debugger GUI
application SPRO-12-3-dlight DLight Observability Tool
application SPRO-12-3-dmake Building Software including Distributed Make (dmake)
application SPRO-12-3-f90-libs Fortran dynamic libraries
application SPRO-12-3-fortran Fortran Compiler
application SPRO-12-3-math-libs math libraries
application SPRO-12-3-oic Oracle Instant Client 11.2.0.2.0
application SPRO-12-3-oic-libs Oracle Instant Client 11.2.0.2.0 Runtime
application SPRO-12-3-perflib Performance Library
application SPRO-12-3-studio-bin-links Oracle Solaris Studio /usr symlinks and icon
application SPRO-12-3-studio-common Common internal components needed by components of the Oracle Solaris Studio product
application SPRO-12-3-studio-ide Integrated Development Environment for C, C++, and Fortran
application SPRO-12-3-studio-ja Solaris Studio Japanese localization
application SPRO-12-3-studio-legal Legal files for the Solaris Studio product
application SPRO-12-3-studio-zhCN Solaris Studio Simplified Chinese localization
How I got libpqxx to build
Clean mess from previous attempt
rm -rf install_test/
rm -rf libpqxx-4.0.1/
Logged out, logged in, set $PATH.
export PATH=/usr/bin:/usr/ccs/bin
Create install test dir, extract libpqxx tarball, go into extracted dir
mkdir install_test/
/usr/sfw/bin/gtar xf libpqxx-4.0.1.tar.gz
cd libpqxx-4.0.1/
Apply patches
Mine
cat ../splitconfig.diff
1c1
< #! /usr/bin/python
---
> #! /opt/csw/bin/python2.7
patch -i ../splitconfig.diff tools/splitconfig
Looks like a normal diff.
done
Patches from OpenCSW
These two patches were written for the development version of libpqxx but they apply cleanly to libpqxx-4.0.1 using gpatch (installed from OpenCSW). The patches were found at https://buildfarm.opencsw.org/source/xref/opencsw/csw/mgar/pkg/libpqxx/trunk/files/0001-Can-t-instantiate-a-const-iterator-from-non-const.patch and https://buildfarm.opencsw.org/source/xref/opencsw/csw/mgar/pkg/libpqxx/trunk/files/0002-Don-t-test-for-reverse-iters-if-they-re-not-there.patch via https://buildfarm.opencsw.org/source/xref/opencsw/csw/mgar/pkg/libpqxx/trunk/Makefile via http://www.opencsw.org/package/libpqxx5_0/ (link called "OpenGrok"). Both of the patches I used were from revision 17955 of OpenCSW.
/opt/csw/bin/gpatch src/connection_base.cxx ../0001-Can-t-instantiate-a-const-iterator-from-non-const.patch
patching file src/connection_base.cxx
Hunk #1 succeeded at 476 with fuzz 1.
Hunk #2 succeeded at 997 (offset -2 lines).
/opt/csw/bin/gpatch test/unit/test_binarystring.cxx ../0002-Don-t-test-for-reverse-iters-if-they-re-not-there.patch
patching file test/unit/test_binarystring.cxx
Configure and make, make install
CXXFLAGS="-library=stlport4" ./configure --prefix=/var/tmp/build/install_test --enable-shared=yes --enable-static=no --enable-documentation=yes
make
make install
(The documentation, for some reason, is built but not installed. That's just a minor problem, though.)

Not able to install gdb 7.5

I am trying to install gdb 7.5
My OS env is : Linux ddkhost 2.6.18-53.el5PAE #1 SMP Wed Oct 10 16:48:18 EDT 2007 i686 i686 i386 GNU/Linux
I am following these steps:
./configure
make
now it is running recursively endless.
configure: creating ./config.status
CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status
config.status: creating Makefile
make: Warning: File `Makefile.in' has modification time 1.9e+08 s in the future
CONFIG_SHELL="/bin/sh" /bin/sh ./config.status --recheck
running CONFIG_SHELL=/bin/sh /bin/sh ./configure --no-create --no-recursion
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for objdir... .libs
checking for PWL_handle_timeout in -lpwl... no
checking for version 0.11 (revision 0 or later) of PPL... no
checking for default BUILD_CONFIG...
checking for bison... bison -y
checking for bison... bison
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... expect
checking for runtest... no
checking for ar... ar
checking for as... as
checking for dlltool... no
checking for ld... ld
checking for windres... no
checking for windmc... no
checking where to find the target ar... host tool
checking where to find the target as... host tool
checking where to find the target cc... host tool
checking where to find the target c++... host tool
checking where to find the target c++ for libstdc++... host tool
checking where to find the target dlltool... host tool
checking where to find the target gcc... host tool
checking where to find the target gcj... host tool
checking where to find the target gfortran... host tool
checking where to find the target gccgo... host tool
checking where to find the target readelf... host tool
checking where to find the target strip... host tool
checking where to find the target windres... host tool
checking where to find the target windmc... host tool
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether -fkeep-inline-functions is supported... yes
configure: creating ./config.status
CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status
config.status: creating Makefile
make: Warning: File `Makefile.in' has modification time 1.9e+08 s in the future
CONFIG_SHELL="/bin/sh" /bin/sh ./config.status --recheck
running CONFIG_SHELL=/bin/sh /bin/sh ./configure --no-create --no-recursion
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
and so on.......
What is the reason?
From:
make: Warning: File `Makefile.in' has modification time 1.9e+08 s in the future
it indeed seems like your system clock is not synced up with your NFS server like #drank0 commented. Assuming you have root, try setting the time via NTP first:
ntpdate -s ntp.pool.org
If that doesn't work, just set the date like:
date -s 'May 23, 2013'

How to use "make" to use 64 bit libs because of ELFCLASS64 error

How can I use configure and make tools to specify to use 64 bit libraries? I thought it was automatic, but I get wrong ELF Class.
I'm trying to compile Xdebug for Ubuntu 64 for use with LAMPP (XAMPP for Linux).
./lampp start
Failed loading /opt/lampp/lib/php/extensions/xdebug.so: /opt/lampp/lib/php/extensions/xdebug.so: wrong ELF class: ELFCLASS64
The ./configure looks OK to me, and the make works without errors, I've copied the configure in case its relevant:
/xdebug-2.0.3$ ./configure
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc and cc understand -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib
checking for PHP extension directory... /usr/lib/php5/20060613
checking for PHP installed headers prefix... /usr/include/php5
checking for re2c... no
configure: WARNING: You will need re2c 0.12.0 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking whether to enable eXtended debugging support... yes, shared
checking for gettimeofday... yes
checking for cos in -lm... yes
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing libtool commands
I'm not sure of the error, but why are you compiling xdebug? Its available in the repositories of Ubuntu as php5-xdebug (sudo apt-get install php5-xdebug). Though you don't mention your distribution, perhaps its under a similar name?
But to answer your question, the error message looks like xdebug is 64 bit, but that's a problem (is something lampp executes a 32 bit binary?)
Won't:
LD_LIBRARY_PATH=/lib64:$LD_LIBRARY_PATH ./lampp start
work? I don't use Ubuntu, so your path might vary. One thing to do is
ldd ./lampp
to see what the default executable points to.
xdebug was getting compiled in 32 bit. Compile it using:
CXXFLAGS="-m64" CFLAGS="-m64" LDFLAGS="-m64" ./configure --enable-xdebug
worked for me on SPARC Solaris 10.
Try pointing to the 32 bit libs, LD_LIBRARY_PATH=/lib32:LD_LIBRARY_PATH.
If that doesn't work, try the 64 bit libs, LD_LIBRARY_PATH=/lib64:LD_LIBRARY_PATH.
Complete command:
sudo ./configure --enable-xdebug --with-php-config=/opt/lampp/bin/php-config LD_LIBRARY_PATH=/lib32:LD_LIBRARY_PATH
Maybe the runtime linker's library path is wrong. Does the directory /opt/lampp/lib64 exist? Is lampp a shell script? If so, to what value (and whether) does it set the LD_LIBRARY_PATH variable?