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.
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}
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
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
=====================================
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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-iFreeBASICcompilersuccessfullyinstalledin/usr/localkevin@kevin-ThinkPad-A275:~/Downloads/FreeBASIC-1.10.2-debian12-armhf$fbc--versionbash:/usr/local/bin/fbc:cannotexecutebinaryfile:ExecformaterrorAtthispointIdon't get the result you show in the instructions here: https://gcbasic.sourceforge.io/Typesetter/index.php/Install-GCBASIC-for-LinuxIshouldseethis: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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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:
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 :)
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:
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.
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:
***Installedsuccessfullyto/opt/GCBASIC!Checkthereforsomehelpershellscripts(*.sh).YoucanchecktheGCBASICversionnumberandreleasedatewith,'gcbasic /version'.YourPATHshouldbeautomaticallyupdatedthenexttimeyoulogin.Touse'gcbasic'beforeyournextlogin(ie.now),you'll need to ensure that '/opt/GCBASIC' is in your normal user (not root) path. Check if it'stherewith,'echo $PATH'.Ifit's not there, add it with, 'PATH=$PATH:/opt/GCBASIC'.ToviewthelocalHTMLhelpfiles,pointyourwebbrowserto/opt/GCBASIC/Help/index.htmlWehopeyouenjoyusingGCBASIC.Pleaseletusknowifyouneedanyhelp:http://sourceforge.net/p/gcbasic/discussion/kevin@kevin-ThinkPad-A275:~/Downloads/GCBASIC/sources/LinuxBuild$
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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 !!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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}
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
No dice...
The line 75 in question is here: - it's the line "$CC" in the GCB file "install.sh"
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 -
=====================================
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
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
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:
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:
I get the same result from any directory, like root:
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:
I'll continue with it, and keep an eye for any replies to this message.
thank you
Kevin
Kevin,
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
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.
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.
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,
That's what i get in the directory.
attached
BUT
this is what i get fbc --version
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
kevin
here is the other screen shot
Thanks Mark,
here's what's in /usr/local/bin:
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
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
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:
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...
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
seems to work , only get a warning now,
Onto the next command
So, nearly there, I hope...
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:
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.
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:
( skipping about 10 pages .. )
Still watching.
The case thing... all should be lower case. Are they in the archive ?
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:
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.
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
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.
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.
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 !!
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.
Perhaps I should take-up the arguments and praises above into a new thread. Yes, I'll do that.
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?
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.