LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 04-04-2012, 04:03 PM   #1
lb_dbd
LQ Newbie
 
Registered: Apr 2012
Posts: 8

Rep: Reputation: Disabled
Error building GMP, MPFR, MPC libs with gcc 4.7.0 in cygwin


I am executing the 'configure' script for building gcc 4.7.0 in a cygwin environment on an xp/sp-3 system. I am getting an error when it sees the --with-gmp, --with-mpfr and --with-mpc for the libraries GMP, MPFR and MPC. I have all three in the subdirectories gmp, mpfr and mpc under gcc-4.7.0, Thanks.

the build command is:

gcc-4.7.0/configure --enable-languages=c,c++,,objc,obj-c++ --disable-nls --disable-shared --disable-decimal-float --disable-sjlj-exceptions --with-dwarf2 --with-gmp=gcc-4.7.0/gmp --with-mpfr=gcc-4.7.0/mpfr/src --with-mpc=gcc-4.7.0/mpc/src --enable-static --enable-libgomp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --build=mingw32 --prefix=/mingw../configure --enable-languages

the output is:
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 the correct version of gmp.h... no
configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ 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.
 
Old 04-05-2012, 03:18 AM   #2
John VV
Guru
 
Registered: Aug 2005
Posts: 13,508

Rep: Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804
you might want to see the other thread on configuring gcc

most( slightly old - as in 6 months) software will not build yet with gcc 4.7

Cygwin is a bit old
( i was a mingw user )
and has gcc 3.4 in the installer
you might want to have a look
http://cygwin.wikia.com/wiki/How_to_...version_of_GCC

then at the gcc site for the hacking of any program that you want to build with it
-------------
i have gcc 3.4 , 4.1 , 4.3 , and 4.5 installed
most of the time it is WAY more trouble to hack the software to build in 4.5 and NEWER
so i will use 3.4 or 4.1

http://gcc.gnu.org/
http://gcc.gnu.org/gcc-4.7/changes.html
and the changes in 4.6
http://gcc.gnu.org/gcc-4.6/changes.html
and so on

code wrote for gcc 4.0 and earlier will need major hacking to build in 4.7


as to the error
Quote:
configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+.
do you have those versions or greater installed ?




Something i do not think that you understand is

the GCC people are actively CHANGING the compiler
They are FORCING software developers to write SECURE and LESS buggy code
they are doing this step by step .Each NEW version of the compiler is a bit MORE strict than the last

code that builds just fine on gcc 4.5 might not build in 4.6 or 4.7
that is until the program is REWROTE

--- the above is a generalization , more is going on ----

Last edited by John VV; 04-05-2012 at 03:24 AM.
 
Old 04-11-2012, 05:23 PM   #3
lb_dbd
LQ Newbie
 
Registered: Apr 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
My gcc 4.7.0 build using cywgin is failing on the pex-unix.c compile. Does anyone know of a
configure option to disable the unix section of the build ? Or any other reason for the failure?


if [ x"" != x ]; then \
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic ../../libiberty/pex-unix.c -o pic/pex-unix.o; \
else true; fi
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic ../../libiberty/pex-unix.c -o pex-unix.o
../../libiberty/pex-unix.c: In function 'pex_wait':
../../libiberty/pex-unix.c:254:7: warning: implicit declaration of function 'wait' [-Wimplicit-function-declaration]
../../libiberty/pex-unix.c: At top level:
../../libiberty/pex-unix.c:390:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
../../libiberty/pex-unix.c: In function 'save_and_install_fd':
../../libiberty/pex-unix.c:405:3: warning: implicit declaration of function 'fcntl' [-Wimplicit-function-declaration]
../../libiberty/pex-unix.c:405:26: error: 'F_GETFD' undeclared (first use in this function)
../../libiberty/pex-unix.c:405:26: note: each undeclared identifier is reported only once for each function it appears in
../../libiberty/pex-unix.c:418:20: error: 'FD_CLOEXEC' undeclared (first use in this function)
../../libiberty/pex-unix.c:418:55: error: 'F_SETFD' undeclared (first use in this function)
../../libiberty/pex-unix.c:431:31: error: 'F_DUPFD' undeclared (first use in this function)
../../libiberty/pex-unix.c: In function 'restore_fd':
../../libiberty/pex-unix.c:465:19: error: 'FD_CLOEXEC' undeclared (first use in this function)
../../libiberty/pex-unix.c:467:29: error: 'F_SETFD' undeclared (first use in this function)
../../libiberty/pex-unix.c: In function 'pex_unix_exec_child':
../../libiberty/pex-unix.c:560:7: warning: implicit declaration of function 'sleep' [-Wimplicit-function-declaration]
../../libiberty/pex-unix.c: In function 'pex_unix_wait':
../../libiberty/pex-unix.c:734:5: warning: implicit declaration of function 'kill' [-Wimplicit-function-declaration]
../../libiberty/pex-unix.c: In function 'pex_unix_pipe':
../../libiberty/pex-unix.c:752:3: warning: implicit declaration of function 'pipe' [-Wimplicit-function-declaration]
../../libiberty/pex-unix.c: In function 'pex_unix_fdopenw':
../../libiberty/pex-unix.c:768:18: error: 'F_SETFD' undeclared (first use in this function)
../../libiberty/pex-unix.c:768:27: error: 'FD_CLOEXEC' undeclared (first use in this function)
../../libiberty/pex-unix.c: In function 'pex_unix_cleanup':
../../libiberty/pex-unix.c:779:27: warning: identifier 'this' conflicts with C++ keyword [-Wc++-compat]
../../libiberty/pex-unix.c:782:7: warning: identifier 'this' conflicts with C++ keyword [-Wc++-compat]
../../libiberty/pex-unix.c:783:14: warning: identifier 'this' conflicts with C++ keyword [-Wc++-compat]
../../libiberty/pex-unix.c:784:13: warning: identifier 'this' conflicts with C++ keyword [-Wc++-compat]
Makefile:892: recipe for target `pex-unix.o' failed
make[2]: *** [pex-unix.o] Error 1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
i have an error Building GCC: requires GMP 4.1+ and MPFR 2.3.0+. robineecc1 Linux From Scratch 14 10-03-2011 10:41 PM
Finding path of GMP and MPFR for gcc upgrade drosselmeyer Linux - Newbie 2 08-03-2011 08:15 AM
Which directory are mpc, gmp & mpfr stored in after extraction? sophanox Linux - Newbie 2 02-20-2011 07:14 PM
[SOLVED] gcc in CLFS section 5.8.1 does not compile without the omitted mpfr and gmp Openumerix Linux From Scratch 4 11-20-2009 02:35 PM
Why install MPFR and GMP in GCC as opposed to separately? GuyWhoKilledBear Linux - Software 1 08-12-2009 01:46 PM


All times are GMT -5. The time now is 03:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration