gcc in Xenial
-
- Posts: 7
- Joined: Sat 26 Jan 2019, 16:22
gcc in Xenial
Hello,
Was trying to use Puppy on an old laptop at home. I installed gcc through the ppm. When attempting to compile, I get this error message:
fatal error: stdio.h: No such file or directory
compilation terminated.
I attempted to find stdio.h on my system with:
find / -iname 'stdio.h' -print
but it yielded nothing. I feel like there is something simple that I am missing, since stdio.h would be included with gcc at a minimum.
Any help would be much appreciated.
Was trying to use Puppy on an old laptop at home. I installed gcc through the ppm. When attempting to compile, I get this error message:
fatal error: stdio.h: No such file or directory
compilation terminated.
I attempted to find stdio.h on my system with:
find / -iname 'stdio.h' -print
but it yielded nothing. I feel like there is something simple that I am missing, since stdio.h would be included with gcc at a minimum.
Any help would be much appreciated.
- puppy_apprentice
- Posts: 299
- Joined: Tue 07 Feb 2012, 20:32
-
- Posts: 7
- Joined: Sat 26 Jan 2019, 16:22
New Error
After installing devx through quickpet, I get a new error message:
gcc movmass.c -o movmass
In file included from /usr/include/stdio.h:27:0,
from movmass.c:25:
/usr/include/features.h:367:25: fatal error: /usr/include/sys/cdefs.h: Too many levels of symbolic links
compilation terminated.
find has a new result too.
root# find / -iname 'stdio.h' -print
/initrd/pup_ro3/usr/include/bits/stdio.h
/initrd/pup_ro3/usr/include/bsd/stdio.h
/initrd/pup_ro3/usr/include/c++/4.7/tr1/stdio.h
/initrd/pup_ro3/usr/include/c++/5/tr1/stdio.h
/initrd/pup_ro3/usr/include/diet/stdio.h
/initrd/pup_ro3/usr/include/stdio.h
/usr/include/bsd/stdio.h
/usr/include/c++/4.7/tr1/stdio.h
/usr/include/c++/5/tr1/stdio.h
/usr/include/diet/stdio.h
/usr/include/stdio.h
gcc movmass.c -o movmass
In file included from /usr/include/stdio.h:27:0,
from movmass.c:25:
/usr/include/features.h:367:25: fatal error: /usr/include/sys/cdefs.h: Too many levels of symbolic links
compilation terminated.
find has a new result too.
root# find / -iname 'stdio.h' -print
/initrd/pup_ro3/usr/include/bits/stdio.h
/initrd/pup_ro3/usr/include/bsd/stdio.h
/initrd/pup_ro3/usr/include/c++/4.7/tr1/stdio.h
/initrd/pup_ro3/usr/include/c++/5/tr1/stdio.h
/initrd/pup_ro3/usr/include/diet/stdio.h
/initrd/pup_ro3/usr/include/stdio.h
/usr/include/bsd/stdio.h
/usr/include/c++/4.7/tr1/stdio.h
/usr/include/c++/5/tr1/stdio.h
/usr/include/diet/stdio.h
/usr/include/stdio.h
-
- Posts: 7
- Joined: Sat 26 Jan 2019, 16:22
@puppy_apprentice
Hello,
Thank you for the reply. I just saw your post after I posted my update.
It appears that the sfs is already loaded as I get this message in the SFS dialog box
devx_xenialpup_7.5.sfs seems already loaded. Do you want to unload?
Thank you for the reply. I just saw your post after I posted my update.
It appears that the sfs is already loaded as I get this message in the SFS dialog box
devx_xenialpup_7.5.sfs seems already loaded. Do you want to unload?
- puppy_apprentice
- Posts: 299
- Joined: Tue 07 Feb 2012, 20:32
I don't know if you succeed or not.
When i compile c programs i do this:
1) load devx SFS (it include GCC and standard libraries and etc., so no need to use extra pet to compile most c programs)
2) before you compile any program that is not yours check if configure script exist, if yes run it as first, it will check if your Puppy has all stuff needed to compile this program
3) if you get error read carefully messages printed by configure, you will see what is missing
4) if there is no errors run make command
5) if make command finish with success make pet package
And if you have not success you can ask for help there:
http://www.murga-linux.com/puppy/index.php?f=62
When i compile c programs i do this:
1) load devx SFS (it include GCC and standard libraries and etc., so no need to use extra pet to compile most c programs)
2) before you compile any program that is not yours check if configure script exist, if yes run it as first, it will check if your Puppy has all stuff needed to compile this program
3) if you get error read carefully messages printed by configure, you will see what is missing
4) if there is no errors run make command
5) if make command finish with success make pet package
And if you have not success you can ask for help there:
http://www.murga-linux.com/puppy/index.php?f=62
@ibelieveinpup
You said you installed gcc through the PPM. As puppy_apprentice explained, the stuff you need to compile C programs, including gcc, is already in the devx SFS, which you seem to have found and installed. But did you remember to UNINSTALL gcc through the PPM? If not, that may be causing conflicts with what's in the devx SFS.
You said you installed gcc through the PPM. As puppy_apprentice explained, the stuff you need to compile C programs, including gcc, is already in the devx SFS, which you seem to have found and installed. But did you remember to UNINSTALL gcc through the PPM? If not, that may be causing conflicts with what's in the devx SFS.
-
- Posts: 7
- Joined: Sat 26 Jan 2019, 16:22
This is what I have tried
Thank you for all of the suggestions. Below is what I have attempted.
From SFS-Load on-the-fly, I removed devx. Then from ppm I removed gcc and all of its dependencies. Then I reloaded devx from SFS On-the-fly, and am the same message:
In file included from /usr/include/stdio.h:27:0,
from hello.c:1:
/usr/include/features.h:367:25: fatal error: /usr/include/sys/cdefs.h: Too many levels of symbolic links
compilation terminated.
root# ls -l /usr/include/sys/cdefs.h
lrwxrwxrwx 1 root root 29 Jan 14 2018 /usr/include/sys/cdefs.h -> ../i386-linux-gnu/sys/cdefs.h
root# file /usr/include/sys/cdefs.h
/usr/include/sys/cdefs.h: broken symbolic link to ../i386-linux-gnu/sys/cdefs.h
Does this broken symbolic link just need to be fixed by connecting to any copy of cdefs.h on my system? Does it matter which one? If so, wouldn't all of the files in that directory have a broken link, since there doesn't appear to be a /i386-linus-gnu directory? Will they fail too if ever needed?
Not sure why this directory would not be where it should be.
root# find / -iname 'cdefs.h' -print
/initrd/pup_ro3/usr/include/bsd/sys/cdefs.h
/initrd/pup_ro3/usr/include/diet/sys/cdefs.h
/initrd/pup_ro3/usr/include/sys/cdefs.h
/initrd/pup_ro3/usr/include/unistring/cdefs.h
/initrd/mnt/dev_save/xenialpup7.5frugal/xenialpupsave-steven/usr/include/sys/cdefs.h
/usr/include/sys/cdefs.h
/usr/include/bsd/sys/cdefs.h
/usr/include/diet/sys/cdefs.h
/usr/include/unistring/cdefs.h
find: ‘/proc/16354’: No such file or directory
find: ‘/proc/16369’: No such file or directory
find: ‘/proc/16370’: No such file or directory
find: ‘/proc/16371’: No such file or directory
find: ‘/proc/16372’: No such file or directory
find: ‘/proc/16373’: No such file or directory
find: ‘/proc/16376’: No such file or directory
find: ‘/proc/16377’: No such file or directory
find: ‘/proc/16378’: No such file or directory
Before I realized that devx had everything that I needed, I installed gcc from ppm, which seems to have caused some problems. Even after removing gcc and its dependencies via ppm, and just loading devx via SFS On-the-fly, gcc will not compile.
From SFS-Load on-the-fly, I removed devx. Then from ppm I removed gcc and all of its dependencies. Then I reloaded devx from SFS On-the-fly, and am the same message:
In file included from /usr/include/stdio.h:27:0,
from hello.c:1:
/usr/include/features.h:367:25: fatal error: /usr/include/sys/cdefs.h: Too many levels of symbolic links
compilation terminated.
root# ls -l /usr/include/sys/cdefs.h
lrwxrwxrwx 1 root root 29 Jan 14 2018 /usr/include/sys/cdefs.h -> ../i386-linux-gnu/sys/cdefs.h
root# file /usr/include/sys/cdefs.h
/usr/include/sys/cdefs.h: broken symbolic link to ../i386-linux-gnu/sys/cdefs.h
Does this broken symbolic link just need to be fixed by connecting to any copy of cdefs.h on my system? Does it matter which one? If so, wouldn't all of the files in that directory have a broken link, since there doesn't appear to be a /i386-linus-gnu directory? Will they fail too if ever needed?
Not sure why this directory would not be where it should be.
root# find / -iname 'cdefs.h' -print
/initrd/pup_ro3/usr/include/bsd/sys/cdefs.h
/initrd/pup_ro3/usr/include/diet/sys/cdefs.h
/initrd/pup_ro3/usr/include/sys/cdefs.h
/initrd/pup_ro3/usr/include/unistring/cdefs.h
/initrd/mnt/dev_save/xenialpup7.5frugal/xenialpupsave-steven/usr/include/sys/cdefs.h
/usr/include/sys/cdefs.h
/usr/include/bsd/sys/cdefs.h
/usr/include/diet/sys/cdefs.h
/usr/include/unistring/cdefs.h
find: ‘/proc/16354’: No such file or directory
find: ‘/proc/16369’: No such file or directory
find: ‘/proc/16370’: No such file or directory
find: ‘/proc/16371’: No such file or directory
find: ‘/proc/16372’: No such file or directory
find: ‘/proc/16373’: No such file or directory
find: ‘/proc/16376’: No such file or directory
find: ‘/proc/16377’: No such file or directory
find: ‘/proc/16378’: No such file or directory
Before I realized that devx had everything that I needed, I installed gcc from ppm, which seems to have caused some problems. Even after removing gcc and its dependencies via ppm, and just loading devx via SFS On-the-fly, gcc will not compile.
- puppy_apprentice
- Posts: 299
- Joined: Tue 07 Feb 2012, 20:32
-
- Posts: 7
- Joined: Sat 26 Jan 2019, 16:22
Success without the pup save folder
Thank you for that suggestion. Gcc worked as expected without the save folder used.puppy_apprentice wrote:Try to boot Xenial without your save file, load devx and try compile your c program.
If no success attach your program to your next post or post url link to project page of this c program.
So that means that the problem is somewhere inside of the save folder. IS it possible to dx and repair that without just deleting it and starting over?
Re: Success without the pup save folder
Yes, this should be possible, though it could be lots of work to do manually.ibelieveinpup wrote:Thank you for that suggestion. Gcc worked as expected without the save folder used.puppy_apprentice wrote:Try to boot Xenial without your save file, load devx and try compile your c program.
If no success attach your program to your next post or post url link to project page of this c program.
So that means that the problem is somewhere inside of the save folder. IS it possible to dx and repair that without just deleting it and starting over?
I won't recommend anything here, though I personally would create a new save file / save directory and start from scratch.
But I don't use save files / save directories, so don't follow my theoretical personal decision. Maybe some save file / save directory experts will have some better ways to present.
Is Puppy on a USB flash drive?
If yes.
Writes to the save file/folder are limited to pressing the desktop save icon or doing a shutdown.
Stuff is held in the save ramdisk, in memory, not the save file/folder.
Stuff you do in PPM does not get in or out of the save file/folder until you press the save button or shutdown.
So, your uninstall of GCC may not have actually gotten out of the save file/folder, yet.
If yes.
Writes to the save file/folder are limited to pressing the desktop save icon or doing a shutdown.
Stuff is held in the save ramdisk, in memory, not the save file/folder.
Stuff you do in PPM does not get in or out of the save file/folder until you press the save button or shutdown.
So, your uninstall of GCC may not have actually gotten out of the save file/folder, yet.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected
YaPI(any iso installer)
When I was a kid I wanted to be older.... This is not what I expected
YaPI(any iso installer)
-
- Posts: 7
- Joined: Sat 26 Jan 2019, 16:22
Thank You!
Thank you very much for the help. Deleting the save folder and making a new one must have been the fresh start that devx needed to work properly. Gcc is now compiling like it should. Now I can get back to learning some C on this old laptop.bigpup wrote:Is Puppy on a USB flash drive?
If yes.
Writes to the save file/folder are limited to pressing the desktop save icon or doing a shutdown.
Stuff is held in the save ramdisk, in memory, not the save file/folder.
Stuff you do in PPM does not get in or out of the save file/folder until you press the save button or shutdown.
So, your uninstall of GCC may not have actually gotten out of the save file/folder, yet.