cannot compile a simple c program [solved]
cannot compile a simple c program [solved]
I'm trying to compile a simple hello world c program.
I issue the command
# gcc hello.c
resulting in
/user/libexec/gcc/x86_64-slackware-linux/5.3.0/cc1: error while loading libraries: libmpc.so.3: cannot open shared object file: No such file or directory
I'm running Slacko 6.9.9.9 and also have the same problem with 6.9.6.4.
Thank you
I issue the command
# gcc hello.c
resulting in
/user/libexec/gcc/x86_64-slackware-linux/5.3.0/cc1: error while loading libraries: libmpc.so.3: cannot open shared object file: No such file or directory
I'm running Slacko 6.9.9.9 and also have the same problem with 6.9.6.4.
Thank you
Last edited by solex on Tue 25 Jul 2017, 10:39, edited 1 time in total.
I reinstalled libmpc-1.0.3 PPM reported it was already installed. I tried to find libmpc prior and could not.
After the install I got further along the compiler now states:
fatal error: stdio.h: No such file or directory
compilation terminated
I'm guessing a path problem
export $PATH
bash: export: '/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/root/my-applications/bin:user/games' : not a valid identifier
After the install I got further along the compiler now states:
fatal error: stdio.h: No such file or directory
compilation terminated
I'm guessing a path problem
export $PATH
bash: export: '/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/root/my-applications/bin:user/games' : not a valid identifier
The DevX contains all of the compiling programs that are excluded from the main distro.
You need to download the relevant devx for your version ... so perhaps here (note that is the 32 bit version, if you're running a different choice (64 bit perhaps?) then usually the provider posts where the devx can be obtained from alongside where they post the link to the puppy download) and once downloaded you can usually load it by right clicking on the file and select something like sfs_load
After loading you'll be able to use all of the compile/build tools
For some programs you might also need the kernel sources ... which again the provider usually posts a link to, and again a matter of loading that sfs in a similar manner.
EDIT : it does look like the 64 bit you've got (I went up to the Parent Folder from the above link and then down into the 64 directory), so the devx you require is probably here and you want the file called devx_slacko64_6.9.9.9.sfs that is just under 140MB in size
Remember that after you cc helloworld.c that will produce a a.out file (if it correctly compiles). Rename that a.out to helloworld and make it executable (chmod a+x helloworld) and then you can run it ./helloworld
You need to download the relevant devx for your version ... so perhaps here (note that is the 32 bit version, if you're running a different choice (64 bit perhaps?) then usually the provider posts where the devx can be obtained from alongside where they post the link to the puppy download) and once downloaded you can usually load it by right clicking on the file and select something like sfs_load
After loading you'll be able to use all of the compile/build tools
For some programs you might also need the kernel sources ... which again the provider usually posts a link to, and again a matter of loading that sfs in a similar manner.
EDIT : it does look like the 64 bit you've got (I went up to the Parent Folder from the above link and then down into the 64 directory), so the devx you require is probably here and you want the file called devx_slacko64_6.9.9.9.sfs that is just under 140MB in size
Remember that after you cc helloworld.c that will produce a a.out file (if it correctly compiles). Rename that a.out to helloworld and make it executable (chmod a+x helloworld) and then you can run it ./helloworld
Last edited by rufwoof on Mon 24 Jul 2017, 01:28, edited 1 time in total.
Only what is needed to run programs is in the main Puppy iso.Seems strange the gcc would be partially installed
Also,
sfsget entered in a terminal, should bring up the needed devx to download and load.
Place the devx sfs in /mnt/home
Load it by using SFS load-on-the-fly program found in menu->Setup->
If you are only running and installing programs, the stuff in the devx and the kernel sources are not needed, so why put them in Puppy iso and make it twice the size.
In a Puppy frugal install, sfs packages are easy to load and unload from the file system.
They are not actually installed, but loaded into the file system, to use, and unloaded when not needed.
Keeps Puppy small and fast.
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)