Author |
Message |
PeterSieg
Joined: 04 May 2005 Posts: 361 Location: Germany, 37603
|
Posted: Thu 02 Jun 2005, 07:09 Post subject:
Howto feed Puppy "C" to become a 'fat Puppy' :) |
|
Howto fead Puppy to become a 'fat Puppy'
---------------------------------------------------
Or, how to install GCC compiler
*** Use this at your own risk ***
Get the following slackware packages from:
http://ftp.gwdg.de/pub/linux/slackware/slackware-10.1/slackware/d/
Quote: | binutils-2.15.92.0.2-i486-2.tgz
gcc-3.3.4-i486-1.tgz |
and from:
http://ftp.gwdg.de/pub/linux/slackware/slackware-10.1/slackware/l/
Quote: | glibc-2.3.4-i486-1.tgz |
Put this in reach of a type 2 hdd install (I have put them on CD-R; so /mnt/cdrom/<tgzfile> for this howto)
boot Puppy Linux from hdd install. Open a terminal (rxvt). You should be in /root.
Save /etc because slackware files will destroy this?! I have not investigated this any further!
So here I will just repair it afterwards...
tar czvf etc.tgz /etc/*
Now install the 3 tgz files from above:
# change working dir to / ; must be in / !!
cd /
tar zxvf <tgzfile>
# important to run the slackware doinst script!
sh install/doinst.sh
# do this for all 3 tgz file
# now restore destroyed /etc files
tar zxvf /root/etc.tgz
--- DONE ---
This is enough to compile simple C apps. One would like to also install make; g++ etc. from slackware the same way...
Then probably X11 libs, GTK libs etc.
Here is a hardcopy: [img]http://www.geocities.com/petersieg/gcc50m102.jpg
[/img]
Attached is a c.zip file containing some simple c apps and splot, a tiny c+tcl/tk app. that is using tcl/tk as the frontend (by Matt Welsch).
PS
 |
Description |
some simple c programs source codes
|

Download |
Filename |
C.zip |
Filesize |
53.4 KB |
Downloaded |
1082 Time(s) |
_________________ Have fun 
|
Back to top
|
|
 |
PeterSieg
Joined: 04 May 2005 Posts: 361 Location: Germany, 37603
|
Posted: Thu 02 Jun 2005, 07:52 Post subject:
Here is the hardcopy again... |
|
PS
_________________ Have fun 
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15238 Location: Paradox Realm
|
Posted: Thu 02 Jun 2005, 08:40 Post subject:
Yo Ho Ho |
|
Good job Peter
I was just about to try this
- then I thought
You are too young and inexperienced in the ways of the Puppy 'Force'
(I wanted a print out ) but could not . . .
So what I am gonna do, as a half way house, is fire up the olde
Vector Linux 5.00 beta and try some compiling in there
Then If I am able, will try out your stuff - I did have a look at tinycc
('av a look at the How to section)
which is VERY cool and easy - but I can not find sufficient info on
C programming with it
and C is pretty hard for me - "ellow Whirled" is about my limit . . .
- however this is real c
real c in Puppy - Yo Ho ho
(Christmas has come early)
Last edited by Lobster on Thu 02 Jun 2005, 09:57; edited 1 time in total
|
Back to top
|
|
 |
PeterSieg
Joined: 04 May 2005 Posts: 361 Location: Germany, 37603
|
Posted: Thu 02 Jun 2005, 09:44 Post subject:
more food for 'fat Puppy' :) |
|
Now we will continue to X11 programming...
from:
http://ftp.gwdg.de/pub/linux/slackware/slackware-10.1/slackware/x/
get:
Quote: | x11-devel-6.8.1-i486-3.tgz |
install it the same way as before:
Quote: | # change working dir to / ; must be in / !!
cd /
tar zxvf <tgzfile>
# important to run the slackware doinst script!
sh install/doinst.sh |
Than make this link:
cd /usr/include
ln -sf /usr/X11R6/include/X11 X11
--- DONE ---
Now get make from:
http://ftp.gwdg.de/pub/linux/slackware/slackware-10.1/slackware/d/
get:
make-3.80-i386-1.tgz
install it the same way as before:
Quote: | # change working dir to / ; must be in / !!
cd /
tar zxvf <tgzfile>
# important to run the slackware doinst script!
sh install/doinst.sh |
--- DONE ---
Now some graphics
Go here:
http://mimi.naist.jp/~morihi-t/ezxdisp/
and get the ezx lib and sample apps.
cd $HOME
tar zxvf ezx*tgz
cd ezx*
cd x11
make
# should give libezx.a
cp libezx.a ../samples
cp *.h ../samples
# edit ezxdisp.h; change // to /* ... */
# compile a app
gcc -o ezx_test ezxtest.c libezx.a -lm -lX11 -L/usr/X11R6/lib
# should give ezx_test; do the same with other samples
Here is a hardcopy:
PS
_________________ Have fun 
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 8526 Location: Perth, Western Australia
|
Posted: Thu 02 Jun 2005, 10:14 Post subject:
|
|
The next Pup, v1.0.3, will have Bash, so post-install scripts will be happier maybe.
Note, I have kept Busybox Ash, and /bin/sh still runs Ash/ /bin/bash is now the full Bash.
I will upload News page with this right now...
Oh and yes, this is great what you're doing...
I'm keen to follow your instructions and fatten up Puppy also!
|
Back to top
|
|
 |
GuestToo
Puppy Master
Joined: 04 May 2005 Posts: 4078
|
Posted: Thu 02 Jun 2005, 15:54 Post subject:
|
|
bash scripts often will not work quite right with the busybox replacements for the gnu utils
i symlinked /bin/sh to bash so bash runs whether it's called by /bin/bash or /bin/sh
i set SHELL=/bin/bash so it is the default shell that rxvt uses
i symlinked /bin/ash to busybox so i still have busybox's ash if i want it (i mostly use it to see if a script will work in ash as well as bash)
bash could be put in /usr (or could even be on the hard drive) ... if you symlink /bin/sh to a drive that will be unmounted when Puppy shuts down, /bin/sh needs to be symlinked to busybox before the drive is unmounted
|
Back to top
|
|
 |
PeterSieg
Joined: 04 May 2005 Posts: 361 Location: Germany, 37603
|
Posted: Fri 03 Jun 2005, 03:40 Post subject:
TinyGL compiles out of the box |
|
Hi.
get TinyGL from:
http://fabrice.bellard.free.fr/TinyGL/
untar it and cd into it. Then just say 'make' and wait a few minutes
See the results here:
The colors are not correct in x24 display? Hardcopy was taken in x16.
For the one's, that just want's to see 'mech' in Puppy, I have
attached the compile app...
PS
Description |
TinyGL executable. 77kb unzipped.
Should not require any additional libs...
|

Download |
Filename |
Mech.zip |
Filesize |
36.69 KB |
Downloaded |
987 Time(s) |
_________________ Have fun 
|
Back to top
|
|
 |
PeterSieg
Joined: 04 May 2005 Posts: 361 Location: Germany, 37603
|
Posted: Fri 03 Jun 2005, 03:42 Post subject:
Here is 3d_clock |
|
Here is 3d_clock...
PS
Description |
|

Download |
Filename |
3d_clock.zip |
Filesize |
8.91 KB |
Downloaded |
1011 Time(s) |
_________________ Have fun 
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15238 Location: Paradox Realm
|
Posted: Fri 03 Jun 2005, 07:34 Post subject:
Mercy |
|
It is not right. It is not even fair.
I managed to get Puppy on the HD (previously holding Vector 4.6) using the John Murga Opera Puplet (by using a selection 2 boot - no reading or saving from HD) Thus it was easy to do a Number 2 Install and Grub install (I found installing to hda1 rather than MBR worked OK)
Now to C
I tarred - and untarred(detarred?) and eh . . .
went wrong somewhere . . . [grumble . . .mutter . . .]
Humph!
So I thought I would do some sulking - luckily Menno has shown me how to do a random function in tinycc - no time to sulk - programming to experiment with . . .
PS. (I hear GCC is not that fast anyway . . . sour grapes? . . . moi? . . .)
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 8526 Location: Perth, Western Australia
|
Posted: Fri 03 Jun 2005, 07:48 Post subject:
|
|
GuestToo wrote: | bash scripts often will not work quite right with the busybox replacements for the gnu utils
i symlinked /bin/sh to bash so bash runs whether it's called by /bin/bash or /bin/sh
i set SHELL=/bin/bash so it is the default shell that rxvt uses
i symlinked /bin/ash to busybox so i still have busybox's ash if i want it (i mostly use it to see if a script will work in ash as well as bash)
bash could be put in /usr (or could even be on the hard drive) ... if you symlink /bin/sh to a drive that will be unmounted when Puppy shuts down, /bin/sh needs to be symlinked to busybox before the drive is unmounted |
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 8526 Location: Perth, Western Australia
|
Posted: Fri 03 Jun 2005, 07:53 Post subject:
|
|
GuestToo wrote: | bash scripts often will not work quite right with the busybox replacements for the gnu utils
i symlinked /bin/sh to bash so bash runs whether it's called by /bin/bash or /bin/sh
i set SHELL=/bin/bash so it is the default shell that rxvt uses
i symlinked /bin/ash to busybox so i still have busybox's ash if i want it (i mostly use it to see if a script will work in ash as well as bash)
bash could be put in /usr (or could even be on the hard drive) ... if you symlink /bin/sh to a drive that will be unmounted when Puppy shuts down, /bin/sh needs to be symlinked to busybox before the drive is unmounted |
The way I have my "1.0.3beta" setup right now is bash is in /usr/bin so as not to add to the size of the initial ramdisk, and /bin/bash is a link to it.
The initial ramdisk has /bin/sh pointing to busybox.
I have had problems with the busybox versions of mkdir, cp and mv -- well, Puppy already has cp-FULL, but now cp is the full version, also mkdir and mv are full versions.
probably ultimately should look at compiling busybox without ash, just have bash.
And, what you suggest about SHELL, yes, in /etc/profile i guess, would be good.
|
Back to top
|
|
 |
GuestToo
Puppy Master
Joined: 04 May 2005 Posts: 4078
|
Posted: Fri 03 Jun 2005, 15:11 Post subject:
|
|
it sounds like you are not making full use of bash
i have /bin/ash symlinked to busybox, but the only time i use ash is to see if a script i wrote will also run in ash
if you put SHELL=/bin/bash in /etc/profile, then rxvt and aterm will use bash
if you have bash in /usr/bin (that's the way i did it, for the same reason, to not make image.gz bigger ... except i have bash in /root now) ... you can symlink bash to /bin/sh, and bash will completely replace busybox's sh (scripts starting #!/bin/sh will use bash instead of busybox) ... i've been running Puppy like that for a long time, and have not had problems with it
what i do is basically this:
i have a script (/usr/bin/bash-on) to enable bash (note that it executes /usr/bin/bash not /bin/sh):
#!/usr/bin/bash
ln -sf /usr/bin/bash /bin/bash
ln -sf /usr/bin/bash /bin/sh
ln -sf /bin/busybox /bin/ash
and i have a script (/usr/bin/bash-off) to disable bash
#!/usr/bin/bash
ln -sf /bin/sh /bin/busybox
# fix /bin/bash if rc.reboot is likely to run a script that runs /bin/bash
bash-on would probably execute from rc.sysinit or maybe rc.local0 and bash-off would execute from rc.reboot (you need this or you lose the shell when /usr unmounts ... if you copy bash to /bin/bash then bash-off isn't needed ... i don't know whether this really uses more ram or not, with the way the kernel caches stuff)
when bash is symlinked to /bin/sh, a script that runs /bin/sh will really be running bash ... but bash will behave as though it was sh ... so it will use /etc/profile like sh would ... it will not use .bashrc ... you might find that if you kill X and restart X, that the environment variables in /etc/profile have been lost ... it might be necessary to source /etc/profile in $HOME/.bash_profile
anyway, the way i did it was to completely replace busybox with bash ... and Puppy seems to run with little or no problems that way
actually, i find the main benefit of using bash is .bash_history
|
Back to top
|
|
 |
Jesse
Joined: 08 May 2005 Posts: 465 Location: Auckland, NZ
|
Posted: Sat 04 Jun 2005, 00:08 Post subject:
|
|
Hi Lobster,
Now that I'm using 1.0.2 (off CD) and I have it set up to use tinycc, I could tar up my /root/.usr directory so that you could easilly have tcc for your computer.
If I bz2 it the file is about 2.2MB. There are lots of C header files in it. Installing would be as easy as downloading and untaring once.
Jesse
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15238 Location: Paradox Realm
|
Posted: Sat 04 Jun 2005, 02:27 Post subject:
Thanks Jesse |
|
That would be kewl - have sent you a private message.
`What the MasterPups are up to is all very well (I am just jealous - 'coz I can't do it) but a tcc with a Gui interface IDE type environment would be one of the (yet more things) that makes puppy unique
. . . now all I have to do is learn C
gosh you sure have to be smart to be penguinated
|
Back to top
|
|
 |
Flash
Official Dog Handler

Joined: 04 May 2005 Posts: 12823 Location: Arizona USA
|
Posted: Sat 04 Jun 2005, 09:51 Post subject:
Re: Thanks Jesse |
|
Lobster wrote: | <>
gosh you sure have to be smart to be penguinated  | Did you mean "o'penguinated?"
|
Back to top
|
|
 |
|