BaCon

discuss compiling applications for Puppy
Post Reply
Message
Author
newphil82
Posts: 8
Joined: Tue 19 Feb 2013, 07:48

BaCon

#1 Post by newphil82 »

I'm (obviously) a newbie: I can get my demo.bac converted but the compiler goes:-
cc: error trying to exec '/usr/lib/gcc/i486-slackware-linux/4.7.1/../../../../i486-slackware-linux/bin/as': execv: Input/output error

I've tried making lots of room - no good. What am I doing wrong? ... Phil

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Re: BaCon

#2 Post by L18L »

newphil82 wrote:...What am I doing wrong? ... Phil
I have bacon but not your demo.bac
So attaching or posting it here could help. :wink:

----

edited

..and some reading too
http://bkhome.org/bacon/ :lol:
Last edited by L18L on Sat 23 Feb 2013, 14:07, edited 1 time in total.

User avatar
6502coder
Posts: 677
Joined: Mon 23 Mar 2009, 18:07
Location: Western United States

BaCon

#3 Post by 6502coder »

Not knowing anything about your setup or degree of experiece, I'd start with the basics:

1. Are you sure your C compiler setup is OK? Can you compile a simple "Hello, world" program?

2. Have you tried just compiling a simple one-liner program in BaCon just to make sure that your BaCon setup is OK?

3. Are you compiling from the command line, or you compiling from within an IDE?

4. What version of Puppy are you running?

newphil82
Posts: 8
Joined: Tue 19 Feb 2013, 07:48

Re: BaCon

#4 Post by newphil82 »

6502coder wrote:Not knowing anything about your setup or degree of experiece, I'd start with the basics:

1. Are you sure your C compiler setup is OK? Can you compile a simple "Hello, world" program?

2. Have you tried just compiling a simple one-liner program in BaCon just to make sure that your BaCon setup is OK?

3. Are you compiling from the command line, or you compiling from within an IDE?

4. What version of Puppy are you running?
-------------
Thanks for your reply.
I imagined that as my demo prog was just pasted from documentation and converted OK, it wasn't a BaCon language hiccup.

I've just started with Slacko Puppy. I manged to download the devx-slacko file and I got Puppy's boot manager to use it, I think. (BaCon now appears in the Puppy filesystem.) This sfs file is supposed to have everything BaCon needs? I've programmed before but not with C. I've found my real gcc etc in the system using Puppy file utilities, and I suspect that BaCon is looking for it in the wrong path, hence the input/output error. I can't find out how bacon.bash is supposed to be given the path -- I guess it's all somewhere in the devx-xlacko ...sfs file! Cheers, Phil

newphil82
Posts: 8
Joined: Tue 19 Feb 2013, 07:48

BaCon

#5 Post by newphil82 »

With apologies! More on 'BaCon converts but won't compile': using Slacko Puppy with the right devx apparently loaded OK.--

Compiler couldn't use 'as' (input'output error) I found my assembler at /usr/bin/as and its x permissions seemed OK.

If I type: gcc -B /usr/bin/ hi.bac.c then I get input/output error at /usr/bin/as instead of the LONG path in the earlier msg -- as if 'as' had no permission??? Is the 'as' file dodgy in some way?

I'll paste the hi.bac file in since there was a question about it:-
-------------

' BaCon / HUG Hello World

INCLUDE "/usr/share/BaCon/hug_imports.bac"
INIT

Mainwin = WINDOW( "hi from Crusty", 250, 100 )
My_label = MARK( "Hello Sardines!", 150, 30 )
ATTACH( Mainwin, My_label, 50, 20 )

My_btn = BUTTON( "I'm done", 80, 25)
ATTACH( Mainwin, My_btn, 85, 60 )

CALLBACK( My_btn, QUIT)

My_chk = CHECK( "Nada", 50, 25 )
ATTACH( Mainwin, My_chk, 175, 60 )

DISPLAY
------------------
Sorry if I'm being a pain! Phil

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Re: BaCon

#6 Post by L18L »

newphil82 wrote:...If I type: gcc -B /usr/bin/ hi.bac.c then I get input/output error at /usr/bin/as instead of the LONG path in the earlier msg -- as if 'as' had no permission??? Is the 'as' file dodgy in some way?
...
Thus do not type: : gcc -B /usr/bin/ hi.bac.c

type: bacon hi.bac
and then
./hi
my console wrote:# bacon hi.bac
Converting 'hi.bac'... done.
Compiling 'hi.bac'... done.
Program 'hi' ready.
# ./hi
Attachments
capture18302.png
(4.48 KiB) Downloaded 1043 times

newphil82
Posts: 8
Joined: Tue 19 Feb 2013, 07:48

BaCon

#7 Post by newphil82 »

My hi.bac has developed a problem now! I'll check it later.
! Oh dear! So I used hug.bac (also lifted out of the documentation).

Similar to your tip, I typed bacon hug.bac ---- got "input/output error'
I tried bash bacon.bash hug.bac and got lots of convertor messages, ending:

Converting 'hug.bac'... 2696[0J
Converting 'hug.bac'... done.[0J
Compiling 'hug.bac'... Compiler emits messages!

cc: error trying to exec '/usr/lib/gcc/i486-slackware-linux/4.7.1/../../../../i486-slackware-linux/bin/as': execv: Input/output error

This was like what I was reporting at the start. Converts OK ... You can see why I wondered about the 'as' file. (But I'm probably being thick!! I can hardly type today!) I'm just using the system as Slacko Puppy and its .devx ..sfs file made it, as far as I can see.

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Re: BaCon

#8 Post by L18L »

newphil82 wrote:... I typed bacon hug.bac ---- got "input/output error'
...
I am in slacko 5.4 now

Code: Select all

# bacon hug.bac
Converting 'hug.bac'... done.
Compiling 'hug.bac'... done.
Program 'hug' ready.
# 
Something seems to be wrong with your installation.
Suggest you reload devx_slacko...

newphil82
Posts: 8
Joined: Tue 19 Feb 2013, 07:48

BaCon

#9 Post by newphil82 »

Thanks for advice, L18L - I checked my devx .. I confess I didn't often check md5sums!

I d'loaded a 'fresh' Slacko 5.4 iso and devx from ibiblio (slow)
Ditto from nluug (Netherlands) - much faster.
The nluug devx gave me the "wrong" md5sum. - I tried again, got the same "wrong" md5sum. All the other md5sums were OK.

Would it be worth some more experienced person checking up on the download? It might be significant, or it might (??) be some fault at my end..

I haven't got clear yet how it affects my BaCon. First go, neither version solves the prob. Work in progress!!

newphil82
Posts: 8
Joined: Tue 19 Feb 2013, 07:48

BaCon

#10 Post by newphil82 »

I'm in love with Puppy!! What other OS would let me do what I did yesterday, all for free!

I got a tip that Wary would help. So I d'loaded the Wary devx and iso (from the slow website. I had some tea while it came down!) and did the drill. I'm still a clueless newbie - I don't really get it - but, no difficulty ... "Wary BaCon" is now eating out of my hand, if you get my meaning, making me feel really happy! I do appreciate the friendly advice.

I'd love to know what the trouble was, but you can't have everything.

newphil82
Posts: 8
Joined: Tue 19 Feb 2013, 07:48

BaCon

#11 Post by newphil82 »

Sorry to take BaCon fans' time --- Looks like it had nothing at all to do with BaCon. It seems to have been local trouble with file 'as' : I got input/output error by just going 'md5sum as' (nluug version). md5sum was OK with 'wary' version -- and, later with Slacko version from ibiblio. FIND A GOOD D'LOAD SITE AND STICK TO IT!

Complete clean start, (everything from ibiblio) - Slacko is now being a Good Dog as well as Wary!!!

Lovely to be able to 'spring-clean' so freely and easily!

Post Reply