Menu

Linux Install Help

2022-04-10
2022-09-25
1 2 > >> (Page 1 of 2)
  • Brian Williams

    Brian Williams - 2022-04-10

    I am having trouble installing the latest version of GCB on linux. I have followed the directions and I get the following error when I run ./install.sh build.

    jokersbox@pop-os:~/Downloads/GreatCowBASIC/sources/linuxbuild$ ./install.sh bui
    

    Great Cow Basic generic Linux installer, Version 0.6

    Extracting release, version information...

    Compiling GCBASIC Version v0.99.build_1072, released 29/01/2022

    FreeBASIC Compiler - Version 1.09.0 (2022-01-01), built for linux-x86_64 (64bit)
    Copyright (C) 2004-2021 The FreeBASIC development team.
    target: linux-x86_64, x86-64, 64bit
    backend: gcc
    compiling: gcbasic.bas -o gcbasic.c (main module)
    /home/jokersbox/Downloads/GreatCowBASIC/sources/preprocessor.bi(1516) error 8: Undefined symbol, Origin in 'LogError Temp, .Origin'

    I have a fresh install POP OS version 21.10, and I have installed Freebasic 1.09.0. I am trying to install the latest verion of GCB. I have searched google and GCB discussions. I hope I did not miss a simple fix, but any help would be very much appreciated.

    Thank you

     
  • Anobium

    Anobium - 2022-04-10

    Very odd.

    @All Linux users .. seeing the same issue?

     
  • stan cartwright

    stan cartwright - 2022-04-10

    Not me on twisteros rpi, Debian based. I posted my method which is from gcb on sourceforge.
    It builds freebasic from a partial build ... I dunno, then freebasic builds gcb.
    No error messages in the whole process
    It seemed to work but I don't understand the terminal commands to get gcb to compile code from a file and then get avrdude to flash it, so gave up . So not really tested linux gcb but it builds ok on rpi.

     
  • stan cartwright

    stan cartwright - 2022-04-10

    is this gcb? type gcbasic in terminal says no

     
  • mmotte

    mmotte - 2022-04-11

    Brian,
    I installed GCB in ubuntu mint 1804 after xmas a Dell tower PC
    version says : Version: 0.99.01 2022-01-27 (Linux 64 bit) : Build 1073

    My FBC is older than yours:
    FreeBASIC Compiler - Version 1.07.1 (2019-09-27), built for linux-x86_64 (64bit)
    Copyright (C) 2004-2019 The FreeBASIC development team.

    gcbasic installs in /opt/GCBASIC directory

    I updated the instructions to install in Linux earlier this year and those are the instructions you are following. Thankyou for copying the command line to you question above. You are in the correct directory and that is the correct first command. FBC starts and got a quite aways because "preprocessor.bi" is the 3rd file. FBC tells you Error 8 is "undefined symbol".

    Looking at "preprocessor.bi" there on line 1516 is "LogError Temp". I looked before that and 2 other places where it is. But I am not seeing the problem.

    So let us compare files.
    drwxrwxr-x 5 mmotte mmotte 4096 Jan 30 18:03 ./
    drwxrwxr-x 9 mmotte mmotte 4096 Jan 30 18:04 ../
    -rw-rw-r-- 1 mmotte mmotte 63834 Jan 23 02:01 assembly.bi
    drwxrwxr-x 2 mmotte mmotte 4096 Jan 29 01:47 darwinbuild/
    drwxrwxr-x 2 mmotte mmotte 4096 Jan 8 2020 freebsdbuild/
    -rwxrwxr-x 1 mmotte mmotte 1742392 Jan 30 18:03 gcbasic*
    -rw-rw-r-- 1 mmotte mmotte 692205 Jan 29 01:17 gcbasic.bas
    -rw-rw-r-- 1 mmotte mmotte 867 Oct 8 2021 gcbasic.fbp
    -rw-rw-r-- 1 mmotte mmotte 23633 Nov 12 03:48 greatcowbasic.acp
    drwxrwxr-x 3 mmotte mmotte 4096 Jan 31 10:57 linuxbuild/
    -rw-rw-r-- 1 mmotte mmotte 96496 Jan 26 13:08 preprocessor.bi
    -rw-rw-r-- 1 mmotte mmotte 65778 Oct 14 10:35 utils.bi
    -rw-rw-r-- 1 mmotte mmotte 45143 Jul 15 2021 variables.bi

    How many bytes is your "preprocessor.bi?? Maybe something got into yours or was edited.

    i am not familar with your OS .
    I did install GCB on a RP3B+ into Raspian almost 2 years ago and it did compile fine. Never used it there except to try it.

    Check your file for size.
    73
    Mike

     
  • Anobium

    Anobium - 2022-04-11

    This is a source file error that is not being picked up by FB.

    Please change line 1516 to LogError Temp, "" . So, remove the .Origin and change to double quotes.

    This change has been made to the source at build 1108.

     
  • Brian Williams

    Brian Williams - 2022-04-11
      Anobium, that did the trick! Thank you!
    
      Thank you everyone else for the help also. I appreciate it.
    
     
    • Anobium

      Anobium - 2022-04-11

      Most odd... the different FB compiler permitting that error.

      I did test here. And, all is good.

      :-)

       
      • Brian Williams

        Brian Williams - 2022-09-25

        Just to let you know. I just installed gcbasic on a raspberry pi and I had to change the same line. Very strange.

         
  • stan cartwright

    stan cartwright - 2022-04-11

    mmotte, I'm using rpi400 which in the guide says not tested. http://gcbasic.sourceforge.net/help/_introduction.html

    It says Verify the compiler is properly installed and view the full list of compiler options
    $ gcbasic
    gcbasic in the terminal says
    pi@raspberrypi:~ $ gcbasic
    bash: gcbasic: command not found
    pi@raspberrypi:~ $

    I tried cd pi/GCB@Syn/GreatCowBasic
    but same bash error.

    These files in GreatCowBasic sources. see image.
    I tried
    pi@raspberrypi:~ $ cd pi/GCB@Syn/GreatCowBasic/sources
    bash: cd: pi/GCB@Syn/GreatCowBasic/sources: No such file or directory

     
  • mmotte

    mmotte - 2022-04-12

    stan,
    If gcbasic was installed then it would run from anywhere.

    If I am going to help you Then you will need to use the console. Simple as that.

    First let us see if you have FBC working.
    on the console type: fbc -version
    What do you get?
    should be something like :
    (base) mmotte@mmotte-OptiPlex-990:~/GreatCowBASIC/sources$ fbc -version
    FreeBASIC Compiler - Version 1.07.1 (2019-09-27), built for linux-x86_64 (64bit)
    Copyright (C) 2004-2019 The FreeBASIC development team.
    (base) mmotte@mmotte-OptiPlex-990:~/GreatCowBASIC/sources

    If not then go back to the install fbc!

    So it looks like you did number 1 of "Install Great Cow BASIC"
    let's do the last step of number 1, step by step.
    on the console type: cd \
    on the console type: ls
    you should see all the files and directories in the home(pi) directory
    otct: =on the console type: cd GCB@Syn
    in linux case is important, use exactly the right cases
    otct: ls
    otct: cd GreatCowBASIC
    otct: ls
    see the sources directory
    otct: cd sources
    otct: ls
    see the linuxbuild directory
    otct: cd linuxbuild
    otct: ls
    see the install.sh script, we got to make it executable!
    otct: chmod +x install.sh
    should come right back to the prompt.
    otct: ./install.sh build
    should tell you it is compiling gcbasic using fbc. Look at the first post above of Brian's
    no errors?
    otct: sudo ./install.sh install
    This makes the install, makes it executable from anywhere, any directory but from the console.
    finally we are back to what you were trying
    otct: gcbasic
    you shoud get
    (base) mmotte@mmotte-OptiPlex-990:/$ gcbasic
    Great Cow BASIC - A BASIC compiler for microcontrollers
    Version: 0.99.01 2022-01-27 (Linux 64 bit) : Build 1073

    We were here a year or two ago but you lost your concentration,
    You were playing games and trying to make fbc compile something else than gcb.

    Good Luck Stan!

    Mike

     
  • stan cartwright

    stan cartwright - 2022-04-12

    MMotte- thank you
    I think gcb did build ok as it said compiled ok before but didn't work, not even type gcbasic in the console.
    fbc -version
    FreeBASIC Compiler - Version 1.08.0 (2020-09-17), built for linux-arm (32bit)
    I recompiled gcb with fb and no errors-- see image, but same message.
    pi@raspberrypi:~ $ gcbasic
    bash: gcbasic: command not found.
    Should the folder in GCB@Syn be GreatCowBASIC or GreatCowBasic please?
    pi@raspberrypi:~ $ cd GreatCowBASIC
    bash: cd: GreatCowBASIC: No such file or directory

    BUT GreatCowBASIC exists in GCB@Syn
    I changed it to GreatCowBasic but same error.

    Why is gcbasic executable in GCB@Syn and also same in GCB@Syn sources please?

     

    Last edit: stan cartwright 2022-04-12
  • mmotte

    mmotte - 2022-04-12

    Stan,
    Your close!
    hould the folder in GCB@Syn be GreatCowBASIC or GreatCowBasic please?
    Your right on your machine it is lower case. GreatCowBasic

    gcbasic compiled!

    Now you need the next instruction.
    otct: sudo ./install.sh install
    This makes the install, makes it executable from anywhere, any directory but from the console.
    finally we are back to what you were trying. sudo is super user which allows you to dig around below the "home" directory.
    otct: gcbasic
    you shoud get
    (base) mmotte@mmotte-OptiPlex-990:/$ gcbasic
    Great Cow BASIC - A BASIC compiler for microcontrollers
    Version: 0.99.01 2022-01-27 (Linux 64 bit) : Build 1073

     
    • stan cartwright

      stan cartwright - 2022-04-12

      Cheers mmotte... but
      otct: sudo ./install.sh install
      This makes the install, makes it executable from anywhere, any directory but from the console.
      finally we are back to what you were trying
      otct: gcbasic
      It still says bash: gcbasic: command not found

      I thought linux was the same. The file folders all look similar and on twisteros.
      I would have thought it would be the same as other rpi os's.
      This may sort out if gcb will work with twisteros... assuming it works with rpi os... buster/jessie. Doubt a rpi4 or 400 issue???

      twisteros is not recommended for earlier than rpi4 & 400... too slow ??? dunno.
      I don't want to dig out my rpi3 to test gcb but it maybe an option to test installing.
      I'm happy with win10 gcb. linux gcb is just a challenge.

      OptiPlex-990..... I bought one from a "charity shop" for £10 with 4G ram, 1TB hhd,boxed keyboard and mouse, win10 installed but never used.. I was the first user and a 22 inch dell monitor with dvi thrown in. I sold the pc to a mate for £25, I got lots of pc's.
      I kept the monitor... it's 1080.

       

      Last edit: stan cartwright 2022-04-12
  • stan cartwright

    stan cartwright - 2022-04-12

    I think rpi gcb don't work on rpi4 or 400 or maybe it's twisteros... which seems polished.
    I dunno. I can only copy and paste commands... not a linux user so my problems may not be
    rpi gcb install problems but I followed all gcb install.
    Is rpi4 different processor to rpi3 and would affect anything???
    It would be nice if gcb worked on rpi4/400 twisteros and interesting to see why it doesn't

     

    Last edit: stan cartwright 2022-04-12
  • stan cartwright

    stan cartwright - 2022-04-12

    GCB rpi install sourceforge

    Install Great Cow BASIC

    Download and extract the Great Cow Basic sources:
    $ wget "https://downloads.sourceforge.net/project/gcbasic/GCBasic%20-%20Linux%20Distribution/GCB%40Syn.rar"
    $ sudo apt install unar
    # the password when requested in the next step is "GCB"
    $ unar GCB@Syn.rar
    $ cd GCB@Syn/GreatCowBASIC/sources/linuxbuild/
    Build and install the compiler:
    $ chmod +x install.sh
    $ ./install.sh build
    $ sudo ./install.sh install
    Verify the compiler is properly installed and view the full list of compiler options
    $ gcbasic

     
  • stan cartwright

    stan cartwright - 2022-04-12

    sudo ./install.sh install

    install.sh is in GreatCowBasic/sources/linuxbuild

     
  • mmotte

    mmotte - 2022-04-12

    and that is the directory where you executed from? GCB@Syn/GreatCowBASIC/sources/linuxbuild/

    sudo ./install.sh install

    did it give any errors?

    Where did bash come from? Your working from the console not bash.

     
  • stan cartwright

    stan cartwright - 2022-04-12

    and that is the directory where you executed from?

    No, I followed the published install method and your different posted version

    GCB@Syn/GreatCowBASIC/sources/linuxbuild/
    The console is the terminal??

     

    Last edit: stan cartwright 2022-04-12
  • mmotte

    mmotte - 2022-04-12

    Console <-> Terminal
    Potato < - > Potatoe
    Pickle <-> cucumber

    what's an app?
    gcbasic is a compiler program that has switches and runs when called by you in terminal or by a script which are included in the install.

    gcbasic installs in /opt/GCBASIC directory

    stop sending windows screenshots because you are working on the terminal
    Remember you are working in Terminal.
    use your now learned terminal commands and get in the correct directory
    send terminal screenshot of :
    sudo ./install.sh install

    M

     
  • stan cartwright

    stan cartwright - 2022-04-12

    the console shows
    pi@raspberrypi:~ $ sudo ./install.sh install
    sudo: ./install.sh: command not found
    pi@raspberrypi:~ $
    Is the install.sh in the correct place ie. sources/linuxbuild?
    I don't want to set up rpi3 to test and I want to use twisteros rather than rpios
    twisteros only recommended for rpi4 & 400
    so is everything in the correct place as file locations? Hence screen shots.

     

    Last edit: stan cartwright 2022-04-12
  • mmotte

    mmotte - 2022-04-12

    Read the instructions.

    on the console type: cd \
    on the console type: ls
    you should see all the files and directories in the home(pi) directory
    They are multi colored files from directories from executables
    otct: =on the console type: cd GCB@Syn
    in linux case is important, use exactly the right cases
    otct: ls
    otct: cd GreatCowBASIC
    otct: ls
    see the sources directory
    otct: cd sources
    otct: ls
    see the linuxbuild directory
    otct: cd linuxbuild
    otct: ls

    Yes the directory you should be in is:
    GCB@Syn/GreatCowBASIC/sources/linuxbuild/

    which you told me earlier!
    Remember you are working in Terminal.
    use your now learned terminal commands and get in the correct directory
    send terminal screenshot of :
    sudo ./install.sh install

    send a screenshot of the result

    M

    Then:

     
  • stan cartwright

    stan cartwright - 2022-04-13

    Screenshot of sudo ./install.sh install from root pi
    and after cd GCB@Syn/GreatCowBASIC/sources/linuxbuild/
    The error text. Do I delete what gcb I got and start again?

    Thanks for having patience with me... I think a lot of people find Linux difficult at first...
    I first used ubuntu cd sent free from Holland on win98 and ran windows programs...
    I thought but it launched WINE to run the programs... but I didn't know that at the time.

    Why is this not apt-get install GCB like most programs? It's no wonder people use windows.
    Is there a problem with my os/rpi400? The terminal is universal ie same commands?
    Am I flogging a dead horse with this gcb installation ie is it flawed on the hardware/os I'm using?
    That is what I'm trying to find out as nowt works as supposed to.
    Maybe it was used on rpi2/3 with no OS, just a command line interface and no gui.

    You got the brains and I got the hardware so I think it could be labelled as sorted/tested on rpi4/400 soon if you're bothered. My personal patience span is limited... not with people, more with computer stuff that don't work and I can't sort it out. Very frustrating... so I give up :(

    If you think I'm wasting your time then that's fair enough. I doubt many rpi users would use GCB anyway. When I mentioned rpi/gcb years ago one reply was "why bother". Well rpi 4 is like your mini pc. I had one and the rpi was as fast to use.

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.