LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-09-2011, 06:56 AM   #1
yba
LQ Newbie
 
Registered: Aug 2010
Location: Shanghai, China
Distribution: e-mail
Posts: 18

Rep: Reputation: 0
gcc: installation problem, cannot exec `stddef.h ' No such file or directory


I read carefully the similar threads about the similar question. But still have problem unsolved. I use another PC running Fedora14(32-bit).
I installed the gcc by 'yum install gcc', then the i686-redhat-linux/4.5.1 is mounted. At first I also met the problem to find out cc1, after I re-install gcc , this error has disappeared.But another
error appears when I do 'make'.

I type 'locate stddef.h', it clearly exists in
/usr/include/linux/stddef.h
/usr/lib/gcc/i686-redhat-linux/3.4.6/include/stddef.h
/usr/lib/gcc/i686-redhat-linux/4.5.1/include/stddef.h
/usr/local/bin/gcc/lib/gcc/x86_64-unknown-linux-gnu/3.4.3/include/stddef.h
/usr/local/bin/gcc/lib/gcc/x86_64-unknown-linux-gnu/3.4.3/install-tools/include/stddef.h
/usr/share/man/man0p/stddef.h.0p.gz

What should I do to solve this problem?
(because I want to run g77, so I also install 'compat-gcc-34-g77-3.4.6-20.fc14.i686' is it contradictory to others?)

Thanks in advance for help.
 
Old 06-09-2011, 08:28 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
.. error appears when I do 'make'.
Which software are you trying to compile ? ?



And about g77 : Works perfectly together with the other compilers.
 
1 members found this post helpful.
Old 06-09-2011, 09:36 AM   #3
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by yba View Post
...another
error appears when I do 'make'.
...
And what is the exact error message ? Copy-paste the full error message, starting from the command line executed by 'make', here.

The thread name, i.e. the "cannot exec `stddef.h ' No such file or directory" part of it, doesn't make sense to me - stddef.h is not an executable file in the first place.
 
2 members found this post helpful.
Old 06-15-2011, 05:52 AM   #4
yba
LQ Newbie
 
Registered: Aug 2010
Location: Shanghai, China
Distribution: e-mail
Posts: 18

Original Poster
Rep: Reputation: 0
Last year I had problem in mounting 'pgplot' in my own PC (running Fedora14(32-bit), and I got many helps from 'linuxquestions.org'. At last I mounted g77 and solved it because I must run my many programs using 'pgplot' written with g77. After mounting g77, all the old steps in the instructions of installation of 'pgplot' need not to change.
This time I want to help my colleague to mount 'pgplot' in his PC (also run Fedora 14 (32-bit)), but failed. The process are as follows:
1.Follow the instructions of mounting 'pgplot' step by step, and then in directory '/usr/local/pgplot' to type:
/usr/local/src/pgplot/makemake /usr/local/src/pgplot linux g77_gcc'
2.The PC run smoothly, then type
'make'
3.It run smoothly at first, then stoped at some step, as shown below:
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grrec0.f
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grrect.f
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grsci.f
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grscr.f
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grscrl.f
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grsetc.f
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grsets.f
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grsfnt.f
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grsize.f
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grskpb.f
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grslct.f
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grsls.f
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grslw.f
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grsyds.f
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grsymk.f
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grsyxd.f
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grterm.f
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grtext.f
g77 -g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grtoup.f
c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grtrim.f
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grtrn0.f
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grtxy0.f
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grvct0.f
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grwarn.f
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grxhls.f
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/src/grxrgb.f
g77 -c -u -Wall -fPIC -O grexec.f
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/drivers/nudriv.f
g77 -c -u -Wall -fPIC -O /usr/local/src/pgplot/drivers/psdriv.f
gcc -c -Wall -fPIC -DPG_PPU -O -I. -I/usr/X11R6/include /usr/local/src/pgplot/drivers/xwdriv.c
In file included from /usr/local/src/pgplot/drivers/xwdriv.c:89:0:
/usr/include/stdlib.h:33:20: fatal error: stddef.h: No such file or directory
compilation terminated.
make: *** [xwdriv.o] Error 1
-------------------
Please note that I do the same steps as I did in my own PC.
As an old man, I do not understand why?
Thanks for reading and help
 
Old 06-15-2011, 06:47 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
How about the usual # yum install pgplot
http://www.linuxquestions.org/questi...ra13-827192/#5
.. which is about the rpmfusion version, built with f95 :
pgplot-5.2.2-31.fc11


The Fedora pgplot source + the 5 patches: pgplot-5.2.2-31.fc11.src.rpm
http://download1.rpmfusion.org/nonfr...1.fc11.src.rpm

..
 
1 members found this post helpful.
Old 06-16-2011, 07:40 AM   #6
yba
LQ Newbie
 
Registered: Aug 2010
Location: Shanghai, China
Distribution: e-mail
Posts: 18

Original Poster
Rep: Reputation: 0
As an old man I learn a lot from all of you about how to use PC and linux. But my problem of pgplot still exists. I asked the author of pgplot (Prof.Pearson). He said it is not the pgplot itself, he wanted me to check other common C programs. I did it and found what he said imay be true.
(I never use C language in my work),Now I compile a simple C program copied from textbook and get the same error message as below:
------------------------
gcc -Wall simple.c -o simple.o
In file included from simple.c:5:0:
/usr/include/stdio.h:34:21: fatal error: stddef.h: No such file or directory
compilation terminated.
----------------------------
Therefore, could you please tell me the detailed steps about how to install gcc correctly in the PC? Should I delete the mounted old gcc first?

Many thanks for reading and help
 
Old 06-17-2011, 05:20 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Well, if gcc can't find its own stddef.h, I guess you can do something like:

GCC 4.5.1 :
gcc -I/usr/lib/gcc/i686-redhat-linux/4.5.1/include/ -I/usr/include

GCC 3.4.6 :
gcc34 -I/usr/lib/gcc/i686-redhat-linux/3.4.6/include/ -I/usr/include


( I don't remember the order of the options, input, output file for
"gcc -Wall simple.c -o simple.o" when -I (upper case i) is used.)
 
Old 06-19-2011, 06:44 PM   #8
yba
LQ Newbie
 
Registered: Aug 2010
Location: Shanghai, China
Distribution: e-mail
Posts: 18

Original Poster
Rep: Reputation: 0
I have reinstalled gcc, and I already installed g77, now I can run all my previous programs using pgplot written in g77 again.
Thank you very much.
 
Old 03-05-2015, 04:13 PM   #9
debguy
Member
 
Registered: Oct 2014
Location: U.S.A.
Distribution: mixed, mostly debian slackare today
Posts: 207

Rep: Reputation: 19
Bug not resolved

GCC and GLIBC both have <stdlib.h>

neither install them

this isn't a temporary problem they are both doing it for several years now

PROBLEM NOT SOLVED

usr/lib/gcc-lib/i386-slackware-linux/stddef.h

(old but good, actually the same file but old has NO COPYRIGHT notice !)

so the tradition for (gcc/glibc) has been it was not in /usr/include

also the "linux one" that defines true - your not supposed to install /usr/src/linux/include - rtfm linux readme you'll be happy you did

------------------------
a good question. did old linux find <stddef.h> as part of (libexec) part of it's own files as it would, say,

WHY ISNT IT FINDING IT TODAY ??

i know one thing: i read the "newly hacked" "header install script". and it doesn't look right. i refuse to run it - looks like it does allot of guessing, is badly coded, and will do more harm than good.

then another question: why has new GCC and GLIBC teams opted to make "remote phone home debugging libs" default and when you use --disable-foo they do not disable ? or install somthing that tampers with stacks putting "canaries" (breaks anything that uses stacks) ? or are hacking in new functions that cause a need to upgrade compiler to be able to compile code ? (__builtins) that do little: an nothing a little .c or .h couldn't have done ?

there is definitely some suspicious activity

but as to whether <stddef.h> is supposed to "just work" on past linux distro's - i have a problem remembering if it did - but i dont remember that specific problem (there were many)

often instead of fixing a problem they hacked. for example? is strlcpy in BSD but not in linux ? they would hack things that didn't work instead of adding strlcpy.c

but they aren't doing that anymore - you'll find things like "bcopy.c" ready and available

but not stddef.h ... and it's years now no one left any reason or answered allot of people asking the question

and my problem is i see a continual flow of edits that break things that work and favor softwares that didn't work (thus need new support built-in to cover up not working)

a continual flow of things broken and what's the offered replacement: improvement yes (and some well intended). but also forced use of allot of things that are HIGHLY questionable both in code and in intent

we then ALSO see certain people holding what isn't broken while others struggle to get the basics working - that should be easy and clockwork
 
Old 03-05-2015, 04:25 PM   #10
debguy
Member
 
Registered: Oct 2014
Location: U.S.A.
Distribution: mixed, mostly debian slackare today
Posts: 207

Rep: Reputation: 19
Not solved - oops

come to think of it i have broken code asking for something simple bailing out:

#include <stddef.h>

but i get NULL defined i use it in my programs and never include <stddef.h> which defines NULL if i am correct

this MIGHT mean they hacked away the file but it is read (in libexec) but not found - but that old programs which need it the line can be removed. (problem - that's a B(*#TH and a waste of time)

i have the problem the program doesn't work anyway - and maybe that is due to actual broken code

i'm not liking the new headers. they use FOO##fob(dink)

to define FOOA1 FOOA2 . but only a short list. then when i have broken code and try to find some FOO define: i can't find it. it's hidden. and only whoever removed it has "the key" to what was removed. was it to save 200 bytes ? or to confuse me?

that was done long ago though - nothing new

one thing is for sure: it breaks old software and costs time in many ways. these "improvements"
 
Old 03-05-2015, 11:04 PM   #11
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,851
Blog Entries: 1

Rep: Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868
Sorry, I cannot follow you. Do you have a concrete question regarding stddef.h?

Edit: I've checked stddef.h in two of my systems:

1. debian6-linux (dpkg):
gcc-4.4: /usr/lib/gcc/i486-linux-gnu/4.4/include/stddef.h

2. AIX-6.1 (rpm):
gcc-4.4.5-1: /opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/4.4.5/include/stddef.h

of course gcc knows how to finds its own headers, no additional -I tags are needed. (On the other hand, when I use Oracle precompiler, I usually create a symlink to make precompilation less platform-dependent:
Code:
$ ls -l /usr/include/gcc
lrwxrwxrwx 1 root root 39 Jul  4  2012 /usr/include/gcc -> /usr/lib/gcc/i486-linux-gnu/4.4/include

Last edited by NevemTeve; 03-06-2015 at 03:25 AM.
 
Old 05-25-2015, 07:10 PM   #12
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,622

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
well it would not be and never would be on
RHEL4.5 ( end of life)
Fedora 14 ( end of life)

so if one is using UNSUPPORTED os's then they would not and never be fixed

this thread is from 2011 after all
 
  


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
gcc: installation problem, cannot exec `cc1': No such file or directory digimars Linux - General 2 11-25-2008 02:17 AM
gcc: installation problem, cannot exec `as': No such file or directory ERROR jaisol Slackware 8 08-05-2006 12:01 PM
gcc: installation problem, cannot exec `cc1': No such file or directory Error Message 08h Programming 2 07-20-2006 11:44 AM
gcc: installation problem, cannot exec `cc1': No such file or directory natsirc Linux - General 3 11-11-2004 09:26 AM
gcc: installation problem, cannot exec `cc1': No such file or directory Error Message 08h Linux - Newbie 1 06-01-2004 04:26 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:12 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