LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-12-2012, 10:22 PM   #1
boomboom
LQ Newbie
 
Registered: Jul 2011
Posts: 10

Rep: Reputation: Disabled
g++ compile problem (Cygwin)


I am using Cygwin.
I found error in C compiler.
error report are as followings :

> g++ -c test.c -o test
> In file included from test.c:1:
> /usr/include/stdio.h:34:20: stddef.h: No such file or directory
> /usr/include/stdio.h:37:20: stdarg.h: No such file or directory
> In file included from /usr/include/sys/reent.h:14,
> from /usr/include/stdio.h:45,
> from test.c:1:
> /usr/include/sys/_types.h:32: error: `wint_t' does not name a type
> In file included from test.c:1:
> /usr/include/stdio.h:176: error: `size_t' has not been declared
> /usr/include/stdio.h:187: error: `__gnuc_va_list' has not been declared
> /usr/include/stdio.h:189: error: `__gnuc_va_list' has not been declared
> : : :
> /usr/include/stdio.h:350: error: expected constructor, destructor, or type conversion before "_fread_r"
> /usr/include/stdio.h:350: error: expected `,' or `;' before "_fread_r"
> : : :
The two main problems are
- missing file stddef.h/stdarg.h ==> I also cannot find in compiler's private directory /usr/lib/gcc/i686-pc-cygwin/3.4.4/include
- it seems have problem in type define : wint_, size_t, ....

I think maybe compiler install not properly, therefore I decide to install gcc again.

When I install gcc, it complaint :

> 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

When I install GMP, it complaint :

> checking build system type... i686-pc-cygwin
> checking host system type... i686-pc-cygwin
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
> checking for gawk... gawk
> checking whether make sets $(MAKE)... no
> checking whether to enable maintainer-specific portions of Makefiles... no
> checking ABI=32
> checking compiler gcc -m32 -O2 -pedantic -fomit-frame-pointer ... no
> checking compiler gcc -O2 -pedantic -fomit-frame-pointer ... no
> checking compiler icc -no-gcc ... no
> checking compiler cc -O ... no
> configure: error: could not find a working compiler, see config.log for details

The content of "config.log" are as followings :
cclist=gcc icc cc
configure:5383: gcc 2>&1 | grep xlc >/dev/null
configure:5386: $? = 1
configure:5440: checking compiler gcc -m32 -O2 -pedantic -fomit-frame-pointer
Test compile:
configure:5454: gcc -m32 -O2 -pedantic -fomit-frame-pointer conftest.c >&5
./configure: line 5455: gcc: command not found
configure:5457: $? = 127
failed program was:

int main () { return 0; }
configure:6480: result: no
configure:5440: checking compiler gcc -O2 -pedantic -fomit-frame-pointer
Test compile:
configure:5454: gcc -O2 -pedantic -fomit-frame-pointer conftest.c >&5
./configure: line 5455: gcc: command not found
configure:5457: $? = 127

failed program was:

int main () { return 0; }
configure:6480: result: no
configure:5361: icc -c conftest.c >&5
./configure: line 5362: icc: command not found
configure:5364: $? = 127
configure:5383: icc 2>&1 | grep xlc >/dev/null
configure:5386: $? = 1
configure:5440: checking compiler icc -no-gcc
Test compile:
configure:5454: icc -no-gcc conftest.c >&5
./configure: line 5455: icc: command not found
configure:5457: $? = 127

failed program was:

int main () { return 0; }
configure:6480: result: no
configure:5361: cc -c conftest.c >&5
./configure: line 5362: cc: command not found
configure:5364: $? = 127
configure:5383: cc 2>&1 | grep xlc >/dev/null
configure:5386: $? = 1
configure:5440: checking compiler cc -O
Test compile:
configure:5454: cc -O conftest.c >&5
./configure: line 5455: cc: command not found
configure:5457: $? = 127

failed program was:

int main () { return 0; }
configure:6480: result: no
configure:6718: error: could not find a working compiler

How come, I miss gcc in Cygwin and so need to install. Now require "gcc" to install GMP?

Last edited by boomboom; 03-12-2012 at 10:26 PM.
 
Old 03-14-2012, 02:32 AM   #2
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Which OS you're using? And try to install all the things all over again.
 
Old 03-15-2012, 02:45 AM   #3
boomboom
LQ Newbie
 
Registered: Jul 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
I use Window XP.

I just re-install gcc, since it cannot compile c-code.
 
Old 03-15-2012, 08:03 AM   #4
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Blog Entries: 61

Rep: Reputation: Disabled
Quote:
Originally Posted by boomboom View Post
When I install gcc, it complaint :[/FONT][/SIZE][/COLOR]
> 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
Why are you trying to build GCC instead of using cygwin's setup.exe to install it?
 
  


Reply



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
Re-compile NS2 under Cygwin MichaelYoung Programming 3 07-27-2013 10:52 AM
Have you ever used cygwin, i've met a problem with the command stat from cygwin andy820303 Linux - Newbie 0 03-11-2009 03:37 AM
Compile 2.6 kernel on Cygwin awillard69 Linux - Newbie 0 08-11-2004 09:56 AM
Compile under cygwin Ackmeco Linux - Newbie 0 06-19-2004 02:47 AM
Cygwin compile problems... jinksys Programming 0 04-10-2004 09:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:00 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
Open Source Consulting | Domain Registration