I am planning to build the debug version of gcc-5, specifically gcc-5.4.0-6 16.04.10. I am doing this to investigate some segmentation faults on a particular machine. I have a working version of this gcc-5 on another machine that I can use for reference.
I know exactly which GMP, MPFR, and MPC I need to do the build.
My problem is that I run ./configure, make, make check, and make install, and there are never any errors in those processes. make check runs all of the tests and none fail.
But when I look at the config.log, I always see a bunch of errors. What I'm wondering, is why? And what do the errors mean? What am I doing wrong with my builds? If I have to understand this process in more detail, I'm willling but I didn't think it would be so difficult. I never see any errors emitted to the screen but I have no shared libaries build. I guess ideally, I would have the make install install to a test directory first so I guess I just need to check all the configure, make and make install options and set these. I have just run off the defaults - perhaps that's the problem. But I seem to have most or all of the tools installed that I need. I'll attach a log here. I will probably update this with the logs for GMP, MPFR, and MPC.
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.64. Invocation command line was
$ ./configure
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10)
configure:4350: $? = 0
configure:4339: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:4350: $? = 1
configure:4339: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:4350: $? = 1
configure:4370: checking for C compiler default output file name
configure:4392: gcc conftest.c >&5
configure:4396: $? = 0
configure:4433: result: a.out
configure:4449: checking whether the C compiler works
configure:4458: ./a.out
configure:4462: $? = 0
configure:4477: result: yes
configure:4484: checking whether we are cross compiling
configure:4486: result: no
configure:4489: checking for suffix of executables
configure:4496: gcc -o conftest conftest.c >&5
configure:4500: $? = 0
configure:4522: result:
configure:4528: checking for suffix of object files
configure:4550: gcc -c conftest.c >&5
configure:4554: $? = 0
configure:4575: result: o
configure:4579: checking whether we are using the GNU C compiler
configure:4598: gcc -c conftest.c >&5
configure:4598: $? = 0
configure:4607: result: yes
configure:4616: checking whether gcc accepts -g
configure:4636: gcc -c -g conftest.c >&5
configure:4636: $? = 0
configure:4677: result: yes
configure:4694: checking for gcc option to accept ISO C89
configure:4758: gcc -c -g -O2 conftest.c >&5
configure:4758: $? = 0
configure:4771: result: none needed
configure:4849: checking for g++
configure:4865: found /usr/bin/g++
configure:4876: result: g++
configure:4903: checking for C++ compiler version
configure:4912: g++ --version >&5
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
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.
configure:4923: $? = 0
configure:4912: g++ -v >&5
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.10' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10)
configure:4923: $? = 0
configure:4912: g++ -V >&5
g++: error: unrecognized command line option '-V'
g++: fatal error: no input files
compilation terminated.
configure:4923: $? = 1
configure:4912: g++ -qversion >&5
g++: error: unrecognized command line option '-qversion'
g++: fatal error: no input files
compilation terminated.
configure:4923: $? = 1
configure:4927: checking whether we are using the GNU C++ compiler
configure:4946: g++ -c conftest.cpp >&5
configure:4946: $? = 0
configure:4955: result: yes
configure:4964: checking whether g++ accepts -g
configure:4984: g++ -c -g conftest.cpp >&5
configure:4984: $? = 0
configure:5025: result: yes
configure:5074: checking whether g++ accepts -static-libstdc++ -static-libgcc
configure:5091: g++ -o conftest -g -O2 -static-libstdc++ -static-libgcc conftest.cpp >&5
configure:5091: $? = 0
configure:5092: result: yes
configure:5156: checking for gnatbind
configure:5172: found /usr/bin/gnatbind
configure:5183: result: gnatbind
configure:5248: checking for gnatmake
configure:5264: found /usr/bin/gnatmake
configure:5275: result: gnatmake
configure:5297: checking whether compiler driver understands Ada
configure:5320: result: yes
configure:5329: checking how to compare bootstrapped objects
configure:5354: result: cmp --ignore-initial=16 $$f1 $$f2
configure:5408: checking for objdir
configure:5423: result: .libs
configure:5597: checking for the correct version of gmp.h
configure:5617: gcc -c -g -O2 conftest.c >&5
configure:5617: $? = 0
configure:5635: gcc -c -g -O2 conftest.c >&5
configure:5635: $? = 0
configure:5636: result: yes
configure:5652: checking for the correct version of mpfr.h
configure:5670: gcc -c -g -O2 conftest.c >&5
configure:5670: $? = 0
configure:5687: gcc -c -g -O2 conftest.c >&5
configure:5687: $? = 0
configure:5688: result: yes
configure:5705: checking for the correct version of mpc.h
configure:5722: gcc -c -g -O2 conftest.c >&5
conftest.c:10:17: fatal error: mpc.h: No such file or directory
compilation terminated.
configure:5722: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define LT_OBJDIR ".libs/"
| /* end confdefs.h. */
| #include <mpc.h>
| int
| main ()
| {
|
| #if MPC_VERSION < MPC_VERSION_NUM(0,8,0)
| choke me
| #endif
|
| ;
| return 0;
| }
configure:5747: result: no
configure:5813: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations. Source code for these libraries can be found at
their respective hosting sites as well as at
ftp://gcc.gnu.org/pub/gcc/infrastructure/. See also
http://gcc.gnu.org/install/prerequisites.html for additional info. If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files. They may be located in separate packages.