opttools.sfs GNU C Compiler released

Under development: PCMCIA, wireless, etc.
Message
Author
Guest

opttools.sfs GNU C Compiler released

#1 Post by Guest »

http://www.edgarbrits.net/puppy/opttools.sfs

To use loop
1. mkdir /op/tools
2. loopt mount opttools.sfs at /opt/tools
3. update the path export PATH=/opt/tools/bin:/opt/tools/sbin:$PATH
4. ln -s /opt/tools/bin/perl /usr/bin/perl

Now you have a complete (well just about) gcc development enviroment plus a FULL installation of perl

if you type motor at the command prompt you will be taken into an IDE

For more info
http://www.freeos.com/articles/2876/
http://linuxtoday.com/news_story.php3?l ... 6-NW-HL-SW

Or for those of you with a HDD install extract a kernel source, patch and build following the Puppy instructions.

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

That's great news!!

#2 Post by PeterSieg »

Hi. by following your link to opttool.sfs I get the following error message:
Forbidden
You don't have permission to access /puppy/opttools.sfs on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
And I know I have the commands on how to loop mount a
squash fs somewhere, but I am lazy :roll:
So it would be nice if you could just write the required command sequence
within this thread, so everybody knows what to do...

Is there also a small test app included, that can be compiled by issuing
make somewhere, so that everybody knows, that everything is setup fine?

Thanks, PS
Have fun :)

Guest

#3 Post by Guest »

Sorry didn't quite set the permissions right.

:oops:



Another sorry.....Should have really added that this is the kind of thing experienced users should try at this moment....
It works I know that for a fact (not trying to sound arrogant). I feel if you don't know the right commands to loop mount a filesystem then maybe it should be an idea to not have a go at the moment.
I should also mention that after asking for people interested in beta testing I got a big fat ZERO replies, so I thought I'd bite the bullet and see what happens.
As for a test app......If you are unable to write a simple hello world app then it maybe a good idea to give this a miss.The only libs included are glibc2 and ncurses. The LDP sight has some simple info on starting ncurses and I provided two links on a simple run down of how to use motor....
Yes this will need some prior knowledge of Linux and gcc and C in general, I suppose I really should have added this to begin with. One thing I have noticed that it is hard to get feedback on projects that are of the none GUI type, yes I know Puppy is a desktop enviroment but I feel whilst developing it's easier to iron out the bugs before even thinking of GUI. Get the basics right and then add the bells and whistles......Anyone can issue a simple make command but how many actually go through the README's INSTALL and other such files before.....Who even runs ./configure --help > cfg.hlp and read through the file to see what happens.

Guest

#4 Post by Guest »

Actually maybe I shouldn't have announced it ?
And I know I have the commands on how to loop mount a
squash fs somewhere, but I am lazy
Wanna know how much time I spent researching and experimenting trying to get it to a point that's usable ?

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

Some comments

#5 Post by PeterSieg »

Hi bladehunter.

I feel like I have to make some comments here so please forgive me..

1.
If you say you got ZERO response, you probably have NOT seen my
response of willing to test..?

2.
As you also probably NOT aware of, I have posted how to install and
use GCC from slakware and compile some apps.. So I know how to
get around in this area...

3.
Somwhow, I feel between the lines, some disappointments about peoples
reaction here..? I believe you are right, that the majority is just
interested in GUI apps, that are ready to run... But that are NOT the one
you would like to get interested with your post.. Am I right..?

4.
I still think, that my comments was ment NOT as a howto on guiding
a 'linux gcc dummy' to create a new KDE sort of thing from scratch,
but just help the really interested a bit and NOT have to sort just for
the very basic things to just get started...

Hope you don't mind if I expressed my feelings and thought to much..
but I like to be straigt if I have the feeling it helps at least me :)

I still think, the idea of having GCC environment available by just
mounting a file system is great and way better that my post of
installing from slakware packages.

I will try to download now and will google on how to mount a squash fs..

PS
Have fun :)

Guest

#6 Post by Guest »

Don't mind me I can be a bit hard...

Let's play games :)


It's the same as mounting an iso file....and if you look through the boot scripts you'll find out....

Only thing I don't do is setup a loop device.......It seems that some earlier version of mount don't interact witth the kernel to do that but later version do....don't ask me what the cut off is...hahahahaha

I think the only diff is when mounting a raw file and creating a filesystem.

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

It works!!

#7 Post by PeterSieg »

Hi bladehunter. It works!! Great stuff!
Actually googling for the mount command was a lot faster then writing
my comment.. :oops:

My test environment:
w2k with qemu. 1.0.3 bare bones running as live-cd. I downloaded opttools.sfs (app.46MB) and put it into the root of the 1.0.3 iso image.
Then started qemu to boot from cd image und selected option 2 (don't touch hdd). When puppy was up and running, I opened a rxvt terminal and
based on your instructions, I did:

1. mkdir /opt/tools
2. loop mount opttools.sfs at /opt/tools:
[..mounted cd image with puppy drive mounter on /mnt/cdrom]
mount /mnt/cdrom/opttools.sfs /opt/tools -t squashfs -o loop
(#mount: WARNING: loop device is read-only)
3. update the path
export PATH=/opt/tools/bin:/opt/tools/sbin:$PATH
4. ln -s /opt/tools/bin/perl /usr/bin/perl
(#ln: /usr/bin/perl: Read-only file system)
5. test it: created an ascii file named 'hello.c' that contains:

Code: Select all

main()
{
  printf("Hello World\");
}
compiled it: gcc -o hello hello.c
run it: ./hello
(#Hello World)

(#... are messages/responses you get back..)
Yup. It works guys!
I also compiled a more complex program (txt2pdb.c) the same way
without any problem!

Just great work bladehunter!!
===================

Now you really have fatten Puppy :wink:

Will do some more compiling when times allows and will let you know
about the results..

PS

Here is a quick 2min hack scripts, that could be a starting point to
automated the above steps:

Code: Select all

#!/bin/sh
mkdir /opt/tools
echo "mount cd that (hopefully) contains opttools.sfs :)"
echo Use Puppy drive mounter for that. Press any key when done.
read x
# loop mount opttools.sfs at /opt/tools
mount /mnt/cdrom/opttools.sfs /opt/tools -t squashfs -o loop
# (#mount: WARNING: loop device is read-only) is ok
# update the path 
export PATH=/opt/tools/bin:/opt/tools/sbin:$PATH
ln -s /opt/tools/bin/perl /usr/bin/perl
# (#ln: /usr/bin/perl: Read-only file system) is ok
cat <<EOF >hello.c
#create a ascii file named hello.c that contains:
main()
{
  printf("Hello World\");
}
<<EOF
# compile it: 
gcc -o hello hello.c
# run it: 
./hello
Have fun :)

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

Some more test results and corrections

#8 Post by PeterSieg »

Hi. I booted from a hdd installation (qemu+1.0.3bb) and did nearly the same
as with the live-cd. Just /opt was not there, so mkdir -p /opt/tools heals that.

Also everything works!!

Here is the corrected script, that works for me to automate things a bit:
(Also attached as zip file)

Code: Select all

#!/bin/sh
mkdir -p /opt/tools
echo "mount cd that (hopefully) contains opttools.sfs :)"
echo User Puppy drive mounter for that. Press any key when done.
read x
# loop mount opttools.sfs at /opt/tools
mount /mnt/cdrom/opttools.sfs /opt/tools -t squashfs -o loop
# (#mount: WARNING: loop device is read-only) is ok
ln -s /opt/tools/bin/perl /usr/bin/perl
# (#ln: /usr/bin/perl: Read-only file system) is ok
cat <<EOF >hello.c
//create a ascii file named hello.c that contains:
main()
{
  printf("Hello World\n");
}
EOF
# update the path 
export PATH=/opt/tools/bin:/opt/tools/sbin:$PATH
# compile it: 
gcc -o hello hello.c
# run it: 
./hello
# (#Hello World) should print this..
echo "You shoud see a Hello World messages above this line, if all ok.."


PS
Attachments
opttools.zip
(573 Bytes) Downloaded 883 times
Have fun :)

menno

#9 Post by menno »

Hi bladehunter. It works!!

I have download it to my download directory and mount it to /opt/tools .

Hi , you have to put there because of the libc.so has the referencing to this directori . (That the same comment I give in my version of gcc )

I run puppy 0.9.9 on harddisk . (700mHz/256mByte)

I run two examples the first is the program to talk to parrallel port directly .
(This comes from the old forum : parcom.c ) This use outb() inb() function .
As far I know this are defined in asm/io.h . This file does a request to linux/config.h which ask for linux/autoconfig.h . The last one isn't there .
I have , in my system , markoff the linux/config.h in asm/io.h .
The problem now is that the file system is readonly so I cann't change it .

Maybe you have to thing about the fact that all compilers normaly look in /usr/include for the default includes (puppy has linked this to /root/my-applications/include . This is a writeble directory . Maybe it beter to put it there , so you can add and change the include files .

The secound example was the peu interpreter (public version of euphoria) .
This uses a make files , it compiles and runs currectly .

The third example was the randtest.c (used for tcc' wiki) , this works correctly .

A other thing I noticed is that the executuble's are a 10% bigger as which of the older compiler . You used gcc 3.3.3 , I use gcc 3.2.2 . I have know idea where this comes from .

Some other comment is that .sfs is only mounteble by puppy 0.9.9 and higher the older version doesn't have this type .

Have fun , Menno

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

#10 Post by Flash »

Hey guys, I have a suggestion: why not ask JohnM to create a Developers "Usergroup," that only you coders can belong to? That way you could have fun without feeling like those of us who like GUI applications don't appreciate your work. :)

Maybe John could even find room for a "beta test" area, where you release your programs for testing by people who won't ask you to do everything for them.

That's if the idea of a VPN Puppy development server doesn't interest you :?:

Guest

#11 Post by Guest »

Menno and Paul,

Thanks guys, I'll look into autoconf.h, as this is generated automatically, I'll look into that a bit more, I'm assuming it maybe generated after a kernel config and a make dep.Yes it will be only mountable by Puppy 0.9.9 and later as Barry changed from cramfs to squashfs with that version, so I thought I'd just keep with the current trend to avoid confusion.
As for final compiler version and what not that should really be a issue voted on by the community or let Barry decide. The only thing is I'd suggest staying away from 3.4.x as I could not get a 2.4.x kernel to compile with this version. And I guess the kernel headers used to compile glibc should be decided upon too. Should I look into downgrading to glibc-2.3.2 ?
I'll confess and say that this is my first attempt at this sort of thing and all I know so far has been from my experience with LFS and the uclibc buildroot enviroment, so if I've stuffed up or made some errors along the way please feel free to douse me in petrol and set me alight.....hahahaha
I knew this would work ok as I compiled the included perl with it.

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

#12 Post by BarryK »

Don't forget, as announced on the News page, that opttools.sfs will get mounted automatically by loopback device when Pup 1.0.4 boots -- well, in theory anyway as I haven't actually tested it.

However, the other stuff like setting PATH still has to be done.

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

Hi coders/compilers - isn't that just great news!

#13 Post by PeterSieg »

Just would like to give my kudos to bladehunter for this excellent work and
idea! To my knowledge, NO distribution before hat a compiling environment that one just has to mount it is (almost) ready to rumble!!

The envision I have is:
* Stay with the small end user centric approach that Puppy already has.
* Have a compiling environment, that contains all that is needed to
compile Puppy apps and kernel modules, resulting in no longer
requiring ANY other distribution for make a Puppy!
(but still allows that too :) )
* If found, this compiling environment could/should be automounted.
* It should be possible to alter small things, by using unionfs for that.
That would give the change to install an extra lib needed for a special
app. etc. etc. But there should normally nothing copied to valuable
space in ANY read/write area, so you still can have your pup001/100
on an USB-Stick, even now when compiling apps!
* There should be some kind of a autorun functionality executed after
mounting the squash filesystem, allowing here for ex. setting the PATH
etc. etc.

To what I have read so far, we are almost there :P

Great!
Already 'seeing' the news posting on the well known linux sites about
this unique feature.

PS
Have fun :)

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

Puppy C development . . . develops . . .

#14 Post by Lobster »

Wonderful.

So important to Puppy potential.
John has been very quiet but I have a feeling he might be working on something. . ..

Also some of our holidaying Pups will be back in August with tails wagging at Puppy 1.0.4

Who was working on the GUI for Tinycc?

I still feel Puppy Bare Bones was the best Puppy ever. (my belief is min Pup and then add ons with Pupget)

C and C++ are with us - does anyone use nasm? (available as a dotpup?)
and our first user of LUA which seems an excellent language has yet to emerge . . .

Congratulations to Bladehunter, Menno and Peter
As always Puppy will attract new users and developers.

. . . gosh so much going on - had no time to look into XUL very much


:)
Woof! woof!
Last edited by Lobster on Sat 23 Jul 2005, 05:00, edited 1 time in total.
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

Guest

#15 Post by Guest »

I've canned it but if anyone wants to take over they may.


cya's

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

Why?

#16 Post by PeterSieg »

Hi bladehunter, was that from you:
I've canned it but if anyone wants to take over they may.
If yes, than why? You have put so much efford in that and it is almost there!
It think it is/will be a new outstanding feature, that NO OTHER distro has!!
So !PLEASE!, if I can do anything, to convince you to continue to support this, let me know!

If that wasn't you, than who has posted that..?

PS
Have fun :)

Guest

#17 Post by Guest »

Well to keep going and not waste my time I need a list of required libs and versions.

Or maybe just rebuild puppy using libs from LFS and BLFS and go from there.

Any suggestions...anyone....

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

Suggestion for versions

#18 Post by PeterSieg »

Hi. Well what you have established right now, looks ok to me so far.
You said you could compile the kernel (I assume 2.4.29 now?), I could
compile some console apps and ran them inside Puppy without any problem
and some other people have done similiar things - also without any problem..

In another post I suggested to stay as close as possible to:

Mandrake 9.2 (former Puppy dev env)
Vectorlinux 5.0 (now Puppy dev env)
Slackware 10.1


Hey Barry, I think your input would be much appreciated here - please..

In general, I think go for the libs puppy is using right now or is targeting
for the next version(s) (1.0.5).

If Vectorlinux 5.0STD is the actual dev platform, then if opttools.sfs
uses exactly the same libs... and allows the same apps to be compiled than Vectorlinux 5.0... then why would be the/any need to having Vectorlinux around anymore..?

Code: Select all

Puppy + opttools.sfs = Fat Puppy!
et voila

The opttools.sfs should then stay for quite some time, meaning that even
if for ex. opttools.sfs uses glibc 2.3.3 und Puppy 1.0.8 switches to 2.3.5,
apps would still be able to run (normally..)

PS
Have fun :)

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

#19 Post by Flash »

bladehunter wrote:Sorry <snip>.....Should have really added that this is the kind of thing experienced users should try at this moment....
It works I know that for a fact (not trying to sound arrogant). I feel if you don't know the right commands to loop mount a filesystem then maybe it should be an idea to not have a go at the moment.
I should also mention that after asking for people interested in beta testing I got a big fat ZERO replies<snip>
Bladehunter, you've gotta admit that if you say your software is just too advanced for the average user, you shouldn't be too disappointed when no one tries it out. :D

menno

merge topics

#20 Post by menno »

I try to follows the discussion about the GCC project .
But I lost something ?
Why we have a topic "gcc.glibc and other lib versions for opttools.sfs" and this one .
(There has been more discussion about this subject .)
Is it not posseble to merge this topics ?

Post Reply