Menu

2025 Linux Mint install

Bonkers
2025-01-07
2025-03-02
1 2 > >> (Page 1 of 2)
  • Bonkers

    Bonkers - 2025-01-07

    I've used GCB for a couple of years, love it - especially the .asm and .lst files, - you don't get any clue from Arduino as to what got compiled into what. " Good C programmers will inspect their assembler code output" - Kernigan and Ritchie.

    Anyway, I'm following the instructions to install GCB into Linux, here: https://gcbasic.sourceforge.io/Typesetter/index.php/Install-GCBASIC-for-Linux

    Firstly, Linux Mint "Cinnamon" doesn't have a proper unrar installed, as evidenced here:
    {yes OK it's a Linux problem not a GCB problem, I'm just describing my path for the benefit of others}

    kevin@kevin-ThinkPad-A275:~$ apt policy unrar
    unrar:
      Installed: (none)
      Candidate: 1:7.0.7-1build1
      Version table:
         1:7.0.7-1build1 500
            500 http://archive.ubuntu.com/ubuntu noble/multiverse amd64 Packages
    kevin@kevin-ThinkPad-A275:~$ apt policy unrar
    unrar:
      Installed: 1:7.0.7-1build1
      Candidate: 1:7.0.7-1build1
      Version table:
     *** 1:7.0.7-1build1 500
            500 http://archive.ubuntu.com/ubuntu noble/multiverse amd64 Packages
            100 /var/lib/dpkg/status
    

    That was fixed using software manager (to install unrar), but still, clicking "extract" on the file in Downloads returned the same error of "unusual termination" - and no option to enter a password to decode the rar file.
    The command-line interface worked, however, and extracted the files.
    ~/Downloads$ unrar x GCBASIC
    {end of linux problem}

    I then followed the GCB instructions, to get "install.sh" to run:
    change directory to Downloads/GCBASIC/Sources/linuxbuild
    type "./install.sh build

    kevin@kevin-ThinkPad-A275:~/Downloads/GCBASIC/sources/linuxbuild$ ./install.sh build
    
    Great Cow Basic generic Linux installer, Version 0.6
    
    Extracting release, version information...
    
    
    Compiling GCBASIC Version Version_1_00_1288 , released Version_1_00_1288 
    
    ./install.sh: line 75: /usr/local/bin/fbc: cannot execute binary file: Exec format error
    

    No dice...
    The line 75 in question is here: - it's the line "$CC" in the GCB file "install.sh"

      echo -e "Extracting release, version information...\n"
      read VersionRelease <$VersionReleaseFile
      VersionRelease=${VersionRelease%$'\r'}
      Release="$( cut -d ':' -f 1 <<< "$VersionRelease" )"
      Version="$( cut -d ':' -f 2 <<< "$VersionRelease" )"
    
      echo -e "\nCompiling GCBASIC Version $Version, released $Release\n"
      $CC
      if [ $? -ne 0 ]; then
        echo "There was an error executing: $CC"
      else
        echo -e "\nCompiled successfully.\n"
    

    I've scratched around for other answers, there's a horrendous thread here from 6 years ago; https://sourceforge.net/p/gcbasic/discussion/579125/thread/c7b6cce72d/?page=1
    I tried its answer:
    sudo apt install libncurses5-dev libffi-dev libgl1-mesa-dev libx11-dev libxext-dev libxrender-dev libxrandr-dev libxpm-dev

    but there were errors -

    Err:1 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libgl1-mesa-dev amd64 24.0.9-0ubuntu0.2
      404  Not Found [IP: 185.125.190.83 80]
    E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mesa/libgl1-mesa-dev_24.0.9-0ubuntu0.2_amd64.deb  404  Not Found [IP: 185.125.190.83 80]
    E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
    

    =====================================
    So, the question is, "How do I install GCB_2025 on Linux Mint? "

    I'm pretty sure that it would be possible to create a verified version that "Software Manager" would recognise and install - yes, do that, please, donations available.

    Thank you

     
  • mmotte

    mmotte - 2025-01-08

    Bonkers,
    There are instructions on the download page:
    https://sourceforge.net/projects/gcbasic/files/GCBASIC%20-%20Linux%20Distribution/
    and i didn't know about the instruction you are trying to follow:
    https://gcbasic.sourceforge.io/Typesetter/index.php/Install-GCBASIC-for-Linux

    Couple years ago i tried to help another fellow, Stan:
    https://sourceforge.net/p/gcbasic/discussion/579125/thread/3792b1dd46/
    I think unsuccessfully but there is a lot of good info there.

    In your notes I did not see mention of "fbc" , you need that first!

    There is two parts to the install.sh , which you have found; "build" and "install" and it sounds like it is executing so your did use "chmod" on it.

    I have not used GCB on linux for a couple years, so i don't know the capabilitys beyond compiling. I see anobium has a linux PICKIT2++ loader but i have not tried that.

    GCB does work. I'm working on a project right now to keep sidereal time. I will throw in any clues when I think of them.
    GL
    Mike

     
    👍
    1
  • Bonkers

    Bonkers - 2025-01-08

    Thanks Mike :)
    I'm still not there yet, here is what I've done so far...
    I looked for the freeBASIC at the link specified
    https://sourceforge.net/projects/fbc/files/Binaries%20-%20Linux/FreeBASIC-1.06.0-linux-x86_64.tar.gz/download

    This is referring to an older version, so I downloaded the latest instead, hoping that it might have the additional components that were missing . ( I ran the big command to install these, but some were not found - I'll paste the results lower down) .

    Here's FreeBASIC installing, reports OK:

    kevin@kevin-ThinkPad-A275:~/Downloads/FreeBASIC-1.10.2-debian12-armhf$ sudo ./install.sh -i
    FreeBASIC compiler successfully installed in /usr/local
    kevin@kevin-ThinkPad-A275:~/Downloads/FreeBASIC-1.10.2-debian12-armhf$ fbc --version
    bash: /usr/local/bin/fbc: cannot execute binary file: Exec format error
    

    At this point I don't get the result you show in the instructions here: https://gcbasic.sourceforge.io/Typesetter/index.php/Install-GCBASIC-for-Linux
    I should see this:

    fbc --version
    
    bed@bed-VirtualBox:~/Downloads/FreeBASIC-1.06.0-linux-x86_64$ fbc --version
    FreeBASIC Compiler - Version 1.06.0 (02-17-2019), built for linux-x86_64 (64bit)
    Copyright (C) 2004-2019 The FreeBASIC development team.
    

    I get the same result from any directory, like root:

    kevin@kevin-ThinkPad-A275:~$ fbc --version
    bash: /usr/local/bin/fbc: cannot execute binary file: Exec format error
    kevin@kevin-ThinkPad-A275:~$ 
    

    It looks like something is quite broken - I could go back to your earlier version of fbc, but the add-on commands won't work.

    here's what the long install command generates:

    kevin@kevin-ThinkPad-A275:~/Downloads/GCBASIC/sources/linuxbuild$ sudo apt-get install libncurses5-dev libffi-dev libgl1-mesa-dev libx11-dev libxext-dev libxrender-dev libxrandr-dev libxpm-dev
    [sudo] password for kevin:   
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    Note, selecting 'libncurses-dev' instead of 'libncurses5-dev'
    The following additional packages will be installed:
      libegl-dev libgl-dev libgles-dev libgles1 libglvnd-core-dev libglvnd-dev
      libglx-dev libopengl-dev libpthread-stubs0-dev libxau-dev libxcb1-dev
      libxdmcp-dev x11proto-dev xorg-sgml-doctools xtrans-dev
    Suggested packages:
      ncurses-doc libx11-doc libxcb-doc libxext-doc
    The following NEW packages will be installed
      libegl-dev libffi-dev libgl-dev libgl1-mesa-dev libgles-dev libgles1
      libglvnd-core-dev libglvnd-dev libglx-dev libncurses-dev libopengl-dev
      libpthread-stubs0-dev libx11-dev libxau-dev libxcb1-dev libxdmcp-dev
      libxext-dev libxpm-dev libxrandr-dev libxrender-dev x11proto-dev
      xorg-sgml-doctools xtrans-dev
    0 to upgrade, 23 to newly install, 0 to remove and 176 not to upgrade.
    Need to get 17.3 kB/2,468 kB of archives.
    After this operation, 11.6 MB of additional disk space will be used.
    Do you want to continue? [Y/n] Y
    Err:1 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libgl1-mesa-dev amd64 24.0.9-0ubuntu0.2
      404  Not Found [IP: 185.125.190.83 80]
    E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mesa/libgl1-mesa-dev_24.0.9-0ubuntu0.2_amd64.deb  404  Not Found [IP: 185.125.190.83 80]
    E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
    

    I'll continue with it, and keep an eye for any replies to this message.

    thank you
    Kevin

     
  • mmotte

    mmotte - 2025-01-08

    Kevin,

    Here's FreeBASIC installing, reports OK:
    
    kevin@kevin-ThinkPad-A275:~/Downloads/FreeBASIC-1.10.2-debian12-armhf$ sudo ./install.sh -i
    FreeBASIC compiler successfully installed in /usr/local
    kevin@kevin-ThinkPad-A275:~/Downloads/FreeBASIC-1.10.2-debian12-armhf$ fbc --version
    bash: /usr/local/bin/fbc: cannot execute binary file: Exec format error
    
    At this point I don't get the result you show in the instructions here: https://gcbasic.sourceforge.io/Typesetter/index.php/Install-GCBASIC-for-Linux
    I should see this:
    
    fbc --version
    

    So it sounds like a FBC problem. It has been a while but I remember latest version did not work at that point of time.

    use the fbc -- version command instead of just fbc

    got to get fbc working first.

    Mike

     
  • Bonkers

    Bonkers - 2025-01-08

    I did try only the fbc --version command, not fbc on its own, but just tried again, same result .
    Is there another way to check if fbc actually installed? It did confirm it installed, but clearly it hasn't done so properly.

     
  • Bonkers

    Bonkers - 2025-01-08

    I did try only the fbc --version command, not fbc on its own, but just tried again, same result .
    Is there another way to check if fbc actually installed? It did confirm it installed, but clearly it hasn't done so properly.

     
  • Bonkers

    Bonkers - 2025-01-08

    I don't know if it helps, but I navigated to where FreeBASIC installed itself, and these are the files and folders in that directory

    kevin@kevin-ThinkPad-A275:/usr/local/lib/freebasic/linux-arm$ ll
    total 3656
    drwxr-xr-x 2 root root 4096 Dec 10 12:30 ./
    drwxr-xr-x 3 root root 4096 Dec 10 12:30 ../
    -rw-r--r-- 1 root root 416 Jan 8 14:12 fbextra.x
    -rw-r--r-- 1 root root 1304 Jan 8 14:12 fbrt0.o
    -rw-r--r-- 1 root root 1304 Jan 8 14:12 fbrt0pic.o
    -rw-r--r-- 1 root root 718080 Jan 8 14:12 libfb.a
    -rw-r--r-- 1 root root 198906 Jan 8 14:12 libfbgfx.a
    -rw-r--r-- 1 root root 205254 Jan 8 14:12 libfbgfxmt.a
    -rw-r--r-- 1 root root 204326 Jan 8 14:12 libfbgfxmtpic.a
    -rw-r--r-- 1 root root 198082 Jan 8 14:12 libfbgfxpic.a
    -rw-r--r-- 1 root root 736224 Jan 8 14:12 libfbmt.a
    -rw-r--r-- 1 root root 733012 Jan 8 14:12 libfbmtpic.a
    -rw-r--r-- 1 root root 714700 Jan 8 14:12 libfbpic.a
    kevin@kevin-ThinkPad-A275:/usr/local/lib/freebasic/linux-arm$

     
  • mmotte

    mmotte - 2025-01-08

    Kevin,

    That's what i get in the directory.
    attached
    BUT
    this is what i get fbc --version

    (base) mmotte@mmotte-OptiPlex-990:~$ 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:~$  
    

    somehow fbc did not install?
    It did copy the files but does have a executable fbc file

    The executable is in /usr/local/bin

    just fbc

    check there

     
  • mmotte

    mmotte - 2025-01-08

    kevin
    here is the other screen shot

     
  • Bonkers

    Bonkers - 2025-01-08

    Thanks Mark,
    here's what's in /usr/local/bin:

     
  • mmotte

    mmotte - 2025-01-08

    Yours is a different size.

    But it is there and says it is executable. So it should work.

    Check; right click> properties>permissions

    But you can't run it!?! fbc or fbc --version

    I have to think.
    M

     
  • mmotte

    mmotte - 2025-01-08

    Kevin,
    I am on ubuntu 20.04 &mint
    I tried to install fbc version 1.10 for ubuntu 22.04 and it don't work.
    I have version 1.07.1 and that was working until install 1.10
    I downloaded fbc vers 1.07.3 and installed it and that works!

    Also I see the version you installed was for ARM? do you have an ARM processor?
    Never matter!
    Try installing fbc 1.07.3 and see if that works.

    73
    M

     
  • Bonkers

    Bonkers - 2025-01-09

    I have this kernel: Kernel: 6.8.0-38-generic arch: x86_64 bits:
    This Distro: Linux Mint 22 Wilma base: Ubuntu 24.04 noble
    And this processor: Info: quad core model: AMD PRO A12-8830B R7

    Progress report:

    I have successfully downloaded and installed fbc1.07.3:

    kevin@kevin-ThinkPad-A275:~/Downloads/FreeBASIC-1.07.3-ubuntu-20.04-x86_64$ sudo ./install.sh -i
    [sudo] password for kevin:   
    FreeBASIC compiler successfully installed in /usr/local
    
    kevin@kevin-ThinkPad-A275:~/Downloads/FreeBASIC-1.07.3-ubuntu-20.04-x86_64$ fbc -version
    FreeBASIC Compiler - Version 1.07.3 (2021-04-10), built for linux-x86_64 (64bit)
    Copyright (C) 2004-2019 The FreeBASIC development team.
    

    now onto the install of GCB
    It didn't work, full logs are below.
    the main error was this:
    ld: cannot find -lncurses: No such file or directory

    The full log below has a bit to say about substituting libncurses, after I re-executed the "missing bits" instruction
    sudo apt install libncurses5-dev libffi-dev libgl1-mesa-dev libx11-dev libxext-dev libxrender-dev libxrandr-dev libxpm-dev

    so, some progress, many thanks for your patience :)

    full logs below...

    kevin@kevin-ThinkPad-A275:~/Downloads/GCBASIC/sources/linuxbuild$ sudo apt install libncurses5-dev libffi-dev libgl1-mesa-dev libx11-dev libxext-dev libxrender-dev libxrandr-dev libxpm-dev
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    Note, selecting 'libncurses-dev' instead of 'libncurses5-dev'
    The following additional packages will be installed:
      libegl-dev libgl-dev libgles-dev libgles1 libglvnd-core-dev libglvnd-dev
      libglx-dev libopengl-dev libpthread-stubs0-dev libxau-dev libxcb1-dev
      libxdmcp-dev x11proto-dev xorg-sgml-doctools xtrans-dev
    Suggested packages:
      ncurses-doc libx11-doc libxcb-doc libxext-doc
    The following NEW packages will be installed
      libegl-dev libffi-dev libgl-dev libgl1-mesa-dev libgles-dev libgles1
      libglvnd-core-dev libglvnd-dev libglx-dev libncurses-dev libopengl-dev
      libpthread-stubs0-dev libx11-dev libxau-dev libxcb1-dev libxdmcp-dev
      libxext-dev libxpm-dev libxrandr-dev libxrender-dev x11proto-dev
      xorg-sgml-doctools xtrans-dev
    0 to upgrade, 23 to newly install, 0 to remove and 176 not to upgrade.
    Need to get 17.3 kB/2,468 kB of archives.
    After this operation, 11.6 MB of additional disk space will be used.
    Do you want to continue? [Y/n] Y
    Err:1 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libgl1-mesa-dev amd64 24.0.9-0ubuntu0.2
      404  Not Found [IP: 91.189.91.82 80]
    E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mesa/libgl1-mesa-dev_24.0.9-0ubuntu0.2_amd64.deb  404  Not Found [IP: 91.189.91.82 80]
    E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
    kevin@kevin-ThinkPad-A275:~/Downloads/GCBASIC/sources/linuxbuild$ ./install.sh build
    
    Great Cow Basic generic Linux installer, Version 0.6
    
    Extracting release, version information...
    
    
    Compiling GCBASIC Version Version_1_00_1288 , released Version_1_00_1288 
    
    FreeBASIC Compiler - Version 1.07.3 (2021-04-10), built for linux-x86_64 (64bit)
    Copyright (C) 2004-2019 The FreeBASIC development team.
    target:       linux-x86_64, x86-64, 64bit
    compiling:    gcbasic.bas -o gcbasic.c (main module)
    compiling C:  gcc -m64 -march=native -S -nostdlib -nostdinc -Wall -Wno-unused-label -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-main -Werror-implicit-function-declaration -O0 -fno-strict-aliasing -frounding-math -fno-math-errno -fwrapv -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Wno-format -masm=intel "gcbasic.c" -o "gcbasic.asm"
    assembling:   as --64 --strip-local-absolute "gcbasic.asm" -o "gcbasic.o"
    linking:      ld -m elf_x86_64 -o "gcbasic" -dynamic-linker /lib64/ld-linux-x86-64.so.2 "/usr/local/bin/../lib/freebasic/linux-x86_64/fbextra.x" -L "/usr/local/bin/../lib/freebasic/linux-x86_64" -L "." -L "/usr/lib/gcc/x86_64-linux-gnu/13" "/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/crt1.o" "/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/crti.o" "/usr/lib/gcc/x86_64-linux-gnu/13/crtbegin.o" "/usr/local/bin/../lib/freebasic/linux-x86_64/fbrt0.o" "gcbasic.o" "-(" -lfb -lncurses -lm -ldl -lpthread -lgcc -lgcc_eh -lc "-)" "/usr/lib/gcc/x86_64-linux-gnu/13/crtend.o" "/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/crtn.o" 
    ld: warning: /usr/local/bin/../lib/freebasic/linux-x86_64/fbextra.x contains output sections; did you forget -T?
    ld: cannot find -lncurses: No such file or directory
    linking failed: 'ld' terminated with exit code 1
    
     
  • Bonkers

    Bonkers - 2025-01-09

    I searched for lncurses, found this page:
    https://www.cyberciti.biz/faq/linux-install-ncurses-library-headers-on-debian-ubuntu-centos-fedora/
    where they suggest the following command:
    sudo apt-get install libncurses5-dev libncursesw5-dev

    kevin@kevin-ThinkPad-A275:~/Downloads/GCBASIC/sources/linuxbuild$ sudo apt-get install libncurses5-dev libncursesw5-dev
    [sudo] password for kevin:   
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    Note, selecting 'libncurses-dev' instead of 'libncurses5-dev'
    Note, selecting 'libncurses-dev' instead of 'libncursesw5-dev'
    Suggested packages:
      ncurses-doc
    The following NEW packages will be installed
      libncurses-dev
    0 to upgrade, 1 to newly install, 0 to remove and 176 not to upgrade.
    Need to get 0 B/384 kB of archives.
    After this operation, 2,417 kB of additional disk space will be used.
    Selecting previously unselected package libncurses-dev:amd64.
    (Reading database ... 491510 files and directories currently installed.)
    Preparing to unpack .../libncurses-dev_6.4+20240113-1ubuntu2_amd64.deb ...
    Unpacking libncurses-dev:amd64 (6.4+20240113-1ubuntu2) ...
    Setting up libncurses-dev:amd64 (6.4+20240113-1ubuntu2) ...
    Processing triggers for man-db (2.12.0-4build2) ...
    

    seems to work , only get a warning now,

    kevin@kevin-ThinkPad-A275:~/Downloads/GCBASIC/sources/linuxbuild$ ./install.sh build
    ........ lots of stuff like previous .... 
    ld: warning: /usr/local/bin/../lib/freebasic/linux-x86_64/fbextra.x contains output sections; did you forget -T?
    
    Compiled successfully.
    
    kevin@kevin-ThinkPad-A275:~/Downloads/GCBASIC/sources/linuxbuild$ 
    

    Onto the next command

    Compiled successfully.
    
    kevin@kevin-ThinkPad-A275:~/Downloads/GCBASIC/sources/linuxbuild$ sudo ./install.sh install
    
    Great Cow Basic generic Linux installer, Version 0.6
    
    cp: cannot stat 'LinuxBuild/SupportFiles/*': No such file or directory
    

    So, nearly there, I hope...

     
  • Bonkers

    Bonkers - 2025-01-09

    Yep, getting there, if anyone's still with me.
    There's a bit of case-sensitivity confusion going on between the install script and the required directories.
    I renamed supportfiles to SupportFiles, that moved it along:

    kevin@kevin-ThinkPad-A275:~/Downloads/GCBASIC/sources/linuxbuild$ sudo ./install.sh install
    
    Great Cow Basic generic Linux installer, Version 0.6
    
    The Target Directory "/opt/GCBASIC" already exists.
    Please read "readme-linux-install.txt" Step 7 carefully.
    Exiting.
    

    So, step7 talks about renaming you old GCBASIC directory - which didn't work, but since it was empty, I just deleted it. Deleting in file manager wasn't allowed, had to use "rmdir" in a terminal window.

    kevin@kevin-ThinkPad-A275:~/Downloads/GCBASIC/sources/linuxbuild$ sudo ./install.sh install
    
    Great Cow Basic generic Linux installer, Version 0.6
    
    cp: cannot stat 'LinuxBuild/SupportFiles/*': No such file or directory
    

    More CamelCase versus lower case troubles - had to rename linuxbuild to LinuxBuild, and another round of deleting GCBASIC directory - and finally, it kicks-off properly, with a huge splurge of text output, abbreviated below:

    kevin@kevin-ThinkPad-A275:~/Downloads/GCBASIC/sources/LinuxBuild$ sudo ./install.sh install
    
    Great Cow Basic generic Linux installer, Version 0.6
    
    sending incremental file list
    flash.sh
    gcbasic
    makeasm.sh
    makehex.sh
    messages-br.dat
    

    ( skipping about 10 pages .. )

    *** Installed successfully to /opt/GCBASIC !
    
    Check there for some helper shell scripts (*.sh). You can check the GCBASIC version number and release date with, 'gcbasic /version'.
    
    Your PATH should be automatically updated the next time you login.
    
    To use 'gcbasic' before your next login (ie. now), you'll need to ensure that '/opt/GCBASIC' is in your normal user (not root) path. Check if it's there with, 'echo $PATH'. If it's not there, add it with, 'PATH=$PATH:/opt/GCBASIC'.
    
    To view the local HTML help files, point your web browser to /opt/GCBASIC/Help/index.html
    
    
    We hope you enjoy using GCBASIC. Please let us know if you need any help:
    http://sourceforge.net/p/gcbasic/discussion/
    
    kevin@kevin-ThinkPad-A275:~/Downloads/GCBASIC/sources/LinuxBuild$ 
    
     
  • Anobium

    Anobium - 2025-01-10

    Still watching.

    The case thing... all should be lower case. Are they in the archive ?

     
  • Bonkers

    Bonkers - 2025-01-10

    Cool,
    the directories in the archive are all lower case, the compiler script (?) is looking for CamelCase.
    Close inspection of the logs, particularly the directory-level given in the $ prompt, confirms this - showing that capitalised directories are needed for a successful compile.

    Success! - typing gcbasic at the terminal prompt gives me all the options below:

    kevin@kevin-ThinkPad-A275:~$ gcbasic -v
    GCBASIC - A BASIC compiler for microcontrollers
    Version: 1.01.00 2023-09-23 (Linux 64 bit) : Build 1288
    
    To compile a file, drag and drop it onto the icon for this program. See
    Getting Started with GCBASIC for more info.
    
    Command line parameters:
    GCBASIC [/O:output.asm] [/A:assembler] [/P:programmer] [/K:{C|A}] [/V] [/L]
            [/R:format] [/S:settings.ini] [/NP] [/WX] [/F] filename
    
            /O:output.asm   Set an output filename other than the default
            /CP             Send the default config selected by the compiler to a .CONFIG file.
            /A:assembler    Batch file used to call assembler. If /A:GCASM is
                              given, GCBASIC will use its internal assembler.
            /P:programmer   Batch file used to call programmer, or programmer
                          name if defined in settings file.
            /K:{C|A}        Keep original code in assembly output. /K:C will
                              save comments, /K:A will preserve all input code.
            /R:format       Write a compilation report. Format can be html, text
                              or none.
            /S:settings.ini Specify name of settings file to load
            /V              Verbose mode
            /L              Show license
            /NP             Do not pause on errors. Use with IDEs.
            /WX             Treat warnings as errors
            /F              Skip compilation if up to date hex file found, call
                              programmer immediately and then exit.
            /Version        Display the version of the software.
            filename        The file to compile.
    
    You may use - in place of /, such as -V instead of /V.
    Press any key to continue
    

    I'm now working on getting the familiar GUI up and running, if that's possible.
    I particularly like the GCB text editor and it's use of colour for keywords. I expect I could configure other editors with the "reserved words" list given amongst the GCB files, but I'd prefer not to.

     
  • mmotte

    mmotte - 2025-01-10

    A GUI... I don't know of one for Mint.
    Couple years ago i was using Gedit which is a simple editor but it does have some features.
    One is "highlighting" and I did not find where to make the highlighter for GCB but using Csharp or VB works pretty good.
    It also has "external tools" through which you can invoke the compiler and the program to run PicKit2. These worked good and where hooked up to the F5 and F6 keys.
    You can have multiple files up.
    Simple but works good!

    Some people wanted Geanie edit to work . i tried but it never worked for me.

    But now we have GCcode for GCB built on Visual Studio code. i have not worked with this but It should be transferable to Mint/Ubuntu . i downloaded a copy of Visual StudioCode and am exploring it. looks complicated.

    GL
    Mike

     
  • Bonkers

    Bonkers - 2025-01-10

    Thanks Mike, I wouldn't have got this far without your help and interest. I will pursue the options above and report back . It's a good call to mention that even you couldn't manage to get Geany working properly, that was looking like a possible next step. - the reference I've been following (https://gcbasic.sourceforge.io/Typesetter/index.php/Install-GCBASIC-for-Linux) goes into further detail beyond simply installing GCB, mentions MPLABX - looking way too complicated, and Geany - supposedly a natural favourite for coding.

    I have a working command-line GCB compiler. result! :)
    Using the right-click "open in terminal", within my code sub-directory, and then the very simplest command possible, I get the same output files that I like. In particular the .asm file.

    kevin@kevin-ThinkPad-A275:~/Documents/PICS/rotary_decode$ gcbasic TM1637_test1.gcb
    GCBASIC (1.01.00 2023-09-23 (Linux 64 bit) : Build 1288)
    
    Compiling TM1637_test1.gcb
    Program compiled successfully (Compile time: 0 seconds)
    
    Summary:
         Compiled:
              Program lines: 276
              Subroutines:  User: 0 ; System: 12 of 437 ; Total: 12
         Chip resource usage:
              Program Memory: 446/2048 words (21.78%)
              RAM: 28/128 bytes (21.87%)
              OSC: INTRC_OSC_NOCLKOUT, 8Mhz (Internal oscillator)
    Done
    kevin@kevin-ThinkPad-A275:~/Documents/PICS/rotary_decode$ ls
    TM1637_test1.asm
     TM1637_test1.gcb
    TM1637_test1.html
    
     
  • Anobium

    Anobium - 2025-01-10

    Wow... build 1288. That iss a very old build. All scripts and the toolchain is very different in the latest build.

    I woukd download again and retry the GCBASIC install.

     
  • Bonkers

    Bonkers - 2025-01-10

    I'm very impressed at what has happened here, am I correct in the summary below:
    Installing - i.e. stitching-into Linux Mint paths, commands, etc - a pre-compiled x86 image for the FreeBASIC compiler, characterised for Linux Mint. [I note that other builds, for different Linux's didn't work, so there is complexity here] I'm guessing this would have been written in C.
    This then allows anything written in FreeBASIC to be compiled as an x86 executable, and stitched into this Linux Mint. [i.e. This Distro: Linux Mint 22 Wilma base: Ubuntu 24.04 noble]
    The GCB compiler, written in FreeBASIC, should then be compilable into x86 code. -but there are a collection of additional functions required, really not sure why. I have to say that for whatever "n" our friend libncurses was defined, erm, might have been exceeded...
    Anyway, the add-ons were eventually found, or acceptable substitutes (thanks Linux !) - and it all worked.
    The GCB compiler compiled, and can now compile GCB files into relevant assembler for the target PIC, AVR, whatever... Brilliant !!

     
  • Bonkers

    Bonkers - 2025-01-10

    I can't stress enough the value of what the GCB compiler provides.
    It gives an xx.asm file that shows what was coded in BASIC and what assembler was generated therefrom.
    This was once the norm. High-level-language coders were expected to inspect the assembler output. (see screenshot from Google)

    This is totally contrary to what has been accepted as the output from an Arduino toolchain. - a hex file, that's it.
    - Yes, great if it works, but engineering is the science of things that don't quite work, yet.

     
  • Bonkers

    Bonkers - 2025-01-10

    Perhaps I should take-up the arguments and praises above into a new thread. Yes, I'll do that.

     
  • Bonkers

    Bonkers - 2025-01-10

    On this thread, installing GCB into Linux, I'm a bit disappointed.
    I was hoping for the GUI and the nice GCB code editor - and the one-click compile/assemble/download_and_program into PicKit2+ .
    That looks like a lot more work, to make a clunky command-line-driven toolchain.

    Perhaps a better starting point would have been to take the Windows GCBASIC, such as I know and love, with its editor and GUI, and run it under WINE?

     
  • Bonkers

    Bonkers - 2025-01-10

    Ooh, Anobium, just spotted your comment above.
    The GCBASIC downloads on this Linux machine are recent, within days - or at least I thought.
    Perhaps I've missed GCBASIC(1) or (2) downloads that are more recent - but on checking, we're talking 7th and 9th Jan 2025 as the whole span of GCBASIC.rar .downloads. Perhaps there's a mystery there to be solved.

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.