Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 22 Oct 2014, 11:24
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Troubles getting BaCon / HUG / GLADE / GLUT working
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [8 Posts]  
Author Message
afishe2000

Joined: 29 Jan 2010
Posts: 37

PostPosted: Sun 12 Dec 2010, 18:55    Post subject:  Troubles getting BaCon / HUG / GLADE / GLUT working  

I hope it is OK to start a new thread dealing with "installing and setting up" BaCon, HUG, GLADE, and GLUT.

The original thread has much more about development and use and I'm just not there yet.

Here is the info from my eee PC 900:
Linux puppypc 2.6.35.7 (puppeee 4.4 Beta 5)
BaCon version 1.0 build 19 - BASH - (c) Peter van Eerten - GPL v3.
gcc (GCC) 4.2.2
GNU bash, version 3.00.16(1)-release (i486-t2-linux-gnu)
GTK-2.0


I have BaCon up and running as a bash script and can compile and run most of the "Test Programs" with some slight modifications.

When I try a HUG example I usually get:
ERROR: could not parse line 201 in file 'hug.bac'!
which equates to:
gtk_init(0, 0) or other gtk commands.

I am just guessing that maybe my version of GTK isn't quite up to speed for all GUI work I want to do. I read the other thread and didn't see anything specific to that, and with BaCon compiling the Test Programs I didn't think it was a BASH 4.0+ problem.

Any help would be appreciated. I'm a quick learner once I have the right tools and I would like to rewrite some of the gtk-dialog programs I've done recently.

Thanks,
Back to top
View user's profile Send private message 
noryb009

Joined: 20 Mar 2010
Posts: 539

PostPosted: Sun 12 Dec 2010, 22:01    Post subject:  

Do you have BASH 4? I think the command is
Code:
bash --version
Back to top
View user's profile Send private message 
piratesmack


Joined: 16 Sep 2009
Posts: 100

PostPosted: Sun 12 Dec 2010, 22:54    Post subject: Re: Troubles getting BaCon / HUG / GLADE / GLUT working  

afishe2000 wrote:

I am just guessing that maybe my version of GTK isn't quite up to speed for all GUI work I want to do.


I don't know, I think that would only cause it to fail during the compilation stage, but it's failing during conversion. Have you tried compiling bacon.bac and using that instead?
Code:

bash bacon.bash bacon.bac


Note: if bacon.bac fails to compile, you can use Barry's pet package:
http://bkhome.org/blog/?viewDetailed=02007
Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Mon 13 Dec 2010, 00:17    Post subject:  

Hey afishe2000

you will need to upgrade bash to 4

then this script will get and keep things updated this is the latest beta HUG
this will take about 5 minutes fully automatic
good to see that your are interested in bacon

*you can manually add GLADE, and GLUT. to this script


Joe

Code:
#!/bin/bash


# Joe Arose  big_bass 12-14-2010
# call this  auto-build-compile-bacon
# auto download compile install 
# so you can easily update when needed

# thanks "mechanic" for the speed tip  using bacon instead of bacon.bash for compiling

# thanks seaside for the bash version test
# added syntax highlighting


BASHV=$(bash --version | head -1)
VN=$(echo $BASHV | cut -f1 -d. | sed 's/^.*\(.\)$/\1/')
[ $VN -lt 4 ] && Xdialog --title "bash version test " \
           --infobox "\nBash Version Problem $BASHV installed
---------------> Bash must be version 4 or above for BaCon <-------------------" "\n" 0 0





#   =====================================
#    downoad ,compile and install BaCon
#   =====================================


Xdialog --wrap --title "bacon instlaller" \
        --yesno "Do you want to install bacon  " 0 0

case $? in
  0)
    echo "Yes chosen."
   


rm -f  bacon.bash*
rm -f  bacon.bac*
rm -f  bacon
rm -f  hug.bac*
rm -f  bacon.lang*


xterm  -geometry 40x30+150+40 -e wget http://www.basic-converter.org/bacon.bash
chmod a+x bacon.bash


xterm  -geometry 40x30+150+40 -e wget http://www.basic-converter.org/bacon.bac
chmod a+x bacon.bac


xterm  -geometry 40x30+150+40 -e ./bacon.bash bacon.bac

# copy bacon bin into the path
cp bacon /usr/sbin



xterm  -geometry 40x30+150+40 -e wget http://www.basic-converter.org/beta/hug.bac

chmod a+x hug.bac

xterm  -geometry 40x30+150+40 -e bacon hug.bac

Xdialog --title "Complete" \
           --infobox "\nInstalling bacon has finished.\n" 0 0 3000


   ;;
  1)
    echo "No chosen."
    exit
   ;;
  255)
    echo "Box closed."
    exit
   ;;

esac


#   =====================================
#    syntax highlighting
#   =====================================

#(0) download the file http://www.basic-converter.org/bacon.lang
     

    xterm  -geometry 40x30+150+40 -e wget http://www.basic-converter.org/bacon.lang

#(1) Create language directory for GtkSourceView:

    mkdir -p ~/.local/share/gtksourceview-2.0/language-specs/

#(2) Copy this file to the new directory:

    cp bacon.lang ~/.local/share/gtksourceview-2.0/language-specs/

#Now start gedit, Anjuta, Scribes etc and the BaCon sourcecode has
#   syntax highlighting!



Xdialog --title "syntax highlighting" \
           --infobox "\nsyntax highlighting has installed.\n" 0 0 3000


_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send private message 
afishe2000

Joined: 29 Jan 2010
Posts: 37

PostPosted: Tue 14 Dec 2010, 11:13    Post subject:  

Continuing saga,

I've downloaded BASH4, compiled and have it up and running:

# bash --version
GNU bash, version 4.1.0(1)-release (i686-pc-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>


I download and ran the .pet for BaCon and have the latest version

# /usr/bin/bacon -v
BaCon version 1.0 build 20 - (c) Peter van Eerten - GPL v3.

BaCon is integrated into Geany and for now I'm just using filetype.FreeBasic for syntax highlighting.

The HUG programs will compile without errors.

I'm using the Password Manager program as my test1.bac.

When I try:

# ./test1
ERROR: signal for SEGMENTATION FAULT received - memory invalid or array out of bounds? Try to compile the program with TRAP LOCAL to find the cause.

I assume the TRAP LOCAL is an option for gcc and not BaCon?

I haven't done any command line compiling in probably two decades so my memory is pretty fuzzy on all of this. Everyone's help is very appreciated.

Thanks,

Jeff
Back to top
View user's profile Send private message 
2lss

Joined: 20 Sep 2009
Posts: 225

PostPosted: Wed 15 Dec 2010, 17:41    Post subject:  

Are you downloading the code or copy/pasting?

I have had problems (similar to yours), because I was copying the code from the website and then pasting it into a text file.

From what I can tell, the problem is a webkit issue. Somehow the spaces are not recognized as characters. I don't have the issue using a mozilla browser.

Try this. Download Peter's file-fetch program.
Code:
wget http://www.basic-converter.org/fetch.bac


Compile this with bacon and then run it. It will download all of the text files from www.basic-converter.org directly, to avoid any issues.

My thread:
http://basic-converter.proboards.com/index.cgi?board=bugs&action=display&thread=48

EDIT: Also, puppeee 4.4 has bash 4 by default in the devx, its just renamed. I think its "bash4"
Back to top
View user's profile Send private message 
afishe2000

Joined: 29 Jan 2010
Posts: 37

PostPosted: Wed 15 Dec 2010, 18:36    Post subject:  

THANK YOU!

That was it - examples are up and running, extremely cool.

Coding questions to follow, I'm sure...

Jeff
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Wed 15 Dec 2010, 18:40    Post subject: compilation  

Dear afishe2000,

Thanks to Peter, Joe, 2lss, piratesmack and a few others, you are up and running. Great!

With kind regards,
vovchik

PS. I forgot Doyle and Barry and a few others. No offence intended, ladies and gents. Mea culpa.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [8 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0722s ][ Queries: 12 (0.0051s) ][ GZIP on ]