Howto feed Puppy "C" to become a 'fat Puppy' :)

Under development: PCMCIA, wireless, etc.
Message
Author
PeterSieg
Posts: 363
Joined: Wed 04 May 2005, 16:06
Location: Germany, 37603
Contact:

Howto feed Puppy "C" to become a 'fat Puppy' :)

#1 Post by PeterSieg »

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/ ... ackware/d/
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/ ... ackware/l/
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
Attachments
C.zip
some simple c programs source codes
(53.4 KiB) Downloaded 1239 times
Have fun :)

PeterSieg
Posts: 363
Joined: Wed 04 May 2005, 16:06
Location: Germany, 37603
Contact:

Here is the hardcopy again...

#2 Post by PeterSieg »

Image

PS
Have fun :)

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

Yo Ho Ho

#3 Post by Lobster »

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, 13:57, edited 1 time in total.

PeterSieg
Posts: 363
Joined: Wed 04 May 2005, 16:06
Location: Germany, 37603
Contact:

more food for 'fat Puppy' :)

#4 Post by PeterSieg »

Now we will continue to X11 programming...

from:
http://ftp.gwdg.de/pub/linux/slackware/ ... ackware/x/

get:
x11-devel-6.8.1-i486-3.tgz
install it the same way as before:
# 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/ ... ackware/d/

get:
make-3.80-i386-1.tgz

install it the same way as before:
# 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:
Image

PS
Have fun :)

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#5 Post by BarryK »

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!

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#6 Post by GuestToo »

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

PeterSieg
Posts: 363
Joined: Wed 04 May 2005, 16:06
Location: Germany, 37603
Contact:

TinyGL compiles out of the box

#7 Post by PeterSieg »

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:
Image

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
Attachments
Mech.zip
TinyGL executable. 77kb unzipped.
Should not require any additional libs...
(36.69 KiB) Downloaded 1153 times
Have fun :)

PeterSieg
Posts: 363
Joined: Wed 04 May 2005, 16:06
Location: Germany, 37603
Contact:

Here is 3d_clock

#8 Post by PeterSieg »

Here is 3d_clock...

PS
Attachments
3d_clock.zip
(8.91 KiB) Downloaded 1149 times
Have fun :)

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

Mercy

#9 Post by Lobster »

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 . . .] :cry:

Humph! :shock:
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? . . .)
8)

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#10 Post by BarryK »

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

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#11 Post by BarryK »

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.

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#12 Post by GuestToo »

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

Jesse
Posts: 466
Joined: Sun 08 May 2005, 16:07
Location: Auckland, NZ

#13 Post by Jesse »

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

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

Thanks Jesse

#14 Post by Lobster »

8) 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 :shock:

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

Re: Thanks Jesse

#15 Post by Flash »

Lobster wrote:<>
gosh you sure have to be smart to be penguinated :shock:
Did you mean "o'penguinated?" :)

marquitico
Posts: 25
Joined: Tue 26 Jul 2005, 16:16
Location: New York, NY

Can't get this to work...

#16 Post by marquitico »

Please help a new Puppy who is also a (whimper) Windows refugee. (There. I said it.)

I am using Puppy to help learn Linux before buying a new computer on which I will install (I hope) some complete distro on its own partition. I want to learn simple routine tasks, such as installing new software, for example. To do this I picked xzip, a simple, small interpreter for z-machine interactive fiction games.

I couldn't locate a Puppy package for this, so I thought this topic would help me install what I need to be able to compile source code for myself.
Get the following slackware packages from:
http://ftp.gwdg.de/pub/linux/slackware/ ... ackware/d/
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/ ... ackware/l/
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 ---
Following these instructions, the first two files seemed to work just fine. The glibc file won't work, however. Running sh install/doinst.sh after untarring produces:

Error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

To whomever all this info may be meaningfull, PLEEZE explain it to me.

Thank you, everyone.

Mark
"marquitico"

marquitico
Posts: 25
Joined: Tue 26 Jul 2005, 16:16
Location: New York, NY

Forgot...

#17 Post by marquitico »

Running Puppy 1.0.4, by the way. Sorry, forgetful.

Mark
"marquitico"

Guest

#18 Post by Guest »

you could also have a look at the opttools thread too...


The only prob is that Puppy uses glibc-2.3.2 and slackware-10.1 uses glibc-2.3.4 there maybe some prob's there

masinick
Posts: 11
Joined: Thu 28 Jul 2005, 02:43
Location: Concord, NH
Contact:

Heard about Chubby Puppy, seems off line

#19 Post by masinick »

I had a positive recommendation from a friend about trying out Chubby Puppy. I already have Puppy 1.0.4 and like it very much.

There is a link on the main Puppy site to a gentleman who kindly provided a "Rolls Royce" Chubby Puppy Edition, but I have not been able to access it this evening.

Is this offering still available? Is there a second source for it, or will the posted site be back online again soon?

I see that there are many ways now to extend Puppy, but I was hoping not to have to invest a great deal of time into that myself, at least not right at this moment (though in the future, who knows, I may start doing extensions myself).

For now, I'd appreciate a way to get the already created edition dubbed "Chubby Puppy".

Great stuff in here, especially some of this cutting edge stuff. When I get more free time, I certainly WOULD LOVE to experiment more with it myself!
Brian Masinick
masinick \at\ yahoo \dot\ com

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

Chubby Puppy P2P download link

#20 Post by Lobster »

Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

Post Reply