Can't run on Pi any longer

User avatar
stevedee
Posts: 220
Joined: Monday 20th March 2017 6:06pm

Re: Can't run on Pi any longer

Post by stevedee » Friday 09th October 2020 8:37am

Many Linux distributions maintain their own Repositories, and many still have [very] old versions of applications like Gambas. Its no surprise to me that the OS on your Pi is running behind others.

If you want to be able to open and edit your Gambas projects on your systems (e.g. laptop, Pi & so on) I'd suggest you either upgrade or downgrade so that each system is running the same Gambas version. Although the Pi repository that you are using has an older version, you can usually still upgrade Gambas using another technique. See "Compilation & Installation" at http://gambas.sourceforge.net/en/main.html# ...or ask gbWilly who has been the guru for this for many years.

But if you only want to run your Gambas 'exe' on the Pi, then you could try creating an installation package via your 3.15 system, and install this on the Pi. This will probably work as long as there are no other fundamental dependency issues.

User avatar
cogier
Site Admin
Posts: 517
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Can't run on Pi any longer

Post by cogier » Friday 09th October 2020 1:20pm

I installed Ubuntu Mate on a Pi 4 and was able to add the Gambas ppa and install Gambas 3.15.2.

User avatar
stevedee
Posts: 220
Joined: Monday 20th March 2017 6:06pm

Re: Can't run on Pi any longer

Post by stevedee » Friday 09th October 2020 4:12pm

cogier wrote:
Friday 09th October 2020 1:20pm
I installed Ubuntu Mate on a Pi 4...
That's a good idea Charlie, its probably the Raspbian OS that doesn't have the up-to-date version.

User avatar
BruceSteers
Posts: 156
Joined: Thursday 23rd July 2020 5:20pm

Re: Can't run on Pi any longer

Post by BruceSteers » Friday 09th October 2020 5:29pm

sadams54 wrote:
Thursday 08th October 2020 11:27pm
As far as removing fmain that is the program. deleting that would be deleting the program? am I thinking right?

I can write a program on the pi (which is not what I usually do because the program goes many places) and that is ok, but instead of focusing on the program would it not be best to focus on updating gambas runtime? That seems to be the issue and all apt-get says that gambas 3.12 is the most up to date.
No if you have the Gambas IDE than the program is just the source code in the .src dir and a couple of settings files in the main dir.
when you compile and make the executable it makes the FMain file and any other class/form executables in the .gambas folder.

the compiler you are trying to use wont seem to overwrite the FMain you have as the interpreter is still saying a bytecode mismatch.

if you delete the files in the .gambas/ folder manually it should re-create them on the next compile.
That's technically what selecting "Compile All" should do.
I can only assume a folder/file permission/ownership issue is happening there.
It's worth a try.
easy enough to make a backup and then try.

And i'm working on installing 3.15 on raspian. i got wiki up to date with dependencies but the compile failed complaining about PDFDoc problems.
I need to get some help from the folks on the mailing list i think.
If at first you don't succeed , try it differently.

User avatar
BruceSteers
Posts: 156
Joined: Thursday 23rd July 2020 5:20pm

Re: Can't run on Pi any longer

Post by BruceSteers » Friday 09th October 2020 5:41pm

stevedee wrote:
Friday 09th October 2020 4:12pm
cogier wrote:
Friday 09th October 2020 1:20pm
I installed Ubuntu Mate on a Pi 4...
That's a good idea Charlie, its probably the Raspbian OS that doesn't have the up-to-date version.
It's not so much "Raspian" as it is "Debian" I've got Debian Buster on my proper pc and all i get is 3.12 on that too :(

Although compiling 3.15 was successful on my Debian.
If at first you don't succeed , try it differently.

sadams54
Posts: 52
Joined: Monday 09th July 2018 3:43am

Re: Can't run on Pi any longer

Post by sadams54 » Friday 09th October 2020 11:14pm

OK, now this is making more sense. I will try the deletion of the .gambas folder and see if I can get it to clean compile. The program is already installed using the install package. By program I mean the one I wrote. I have the program on several computers. I have found that once you create the executable you can overwrite that on any other system and as long as the runtime is ok, it works. I used this to create an update feature in the program so it can download from my designated source and replace itself. Works beautifully by the way. I am using raspian on the one with issue.
I prefer to not compile my own full gambas just for that one. I like to stick to the repositories. Less work keeping things update for me that way.

Thank you all for the help so far. I will let you know how it goes.

sadams54
Posts: 52
Joined: Monday 09th July 2018 3:43am

Re: Can't run on Pi any longer

Post by sadams54 » Saturday 10th October 2020 1:17am

removed the contents of .gambas but was not able to make progress. also could not compile anything. I put the files back in and was then able to run the program in the IDE but all complied versions on that machine said that now could not load fmain. Thinking I'll have to wait until the gambas runtime for raspian ver 3.15 is out. I just can't win either way it seems.

User avatar
BruceSteers
Posts: 156
Joined: Thursday 23rd July 2020 5:20pm

Re: Can't run on Pi any longer

Post by BruceSteers » Saturday 10th October 2020 7:46am

Do you know if Raspian buster has "Sid"? (new debian unstable)

I added sid to my main pc's debian and found Gambas 3.15.2 is there but i do not know if raspian has it's own version as i couldn't add the debian sid to raspian :(

I understand about thinking the Debian/Raspian distros should be more up to date, it's a shame it's out of the Gambas developers hands.

And fully agree on not wanting to compile. especially on Raspberry, I've spent hours trying to compile gambas and it's still not working.
But for me gambas 3.12 works fine and all my projects load into it and re-compile okay.

I'm convinced your issue must be a folder/file permission/write access type of thing going on.
For gambas to not be able to create the exe's in the .gambas dir is a big issue and i think that the new version will probably have the same issue too.

My questions would be..
Did you copy or unpack the app folder as root?
If it is a permissions thing going on try running the gambas IDE as root (sudo gambas3) and see if app compiles then.
or try a chown on the folder to own it.
sudo chown -hR username projectfolder

Are you remembering to press the "Compile All" option in gambas before pressing the "run" button when moving app from one gambas version to the other.

It's a puzzle for sure :)
Never say die my friend, we'll crack this :)
If at first you don't succeed , try it differently.

User avatar
BruceSteers
Posts: 156
Joined: Thursday 23rd July 2020 5:20pm

Re: Can't run on Pi any longer

Post by BruceSteers » Saturday 10th October 2020 8:03am

What "should" also be working too is entering the GB_PCODE_VERSION 3.8 Environment variable into your IDE for your app on the newer gambas and compiling.
That should totally work. !? EVERY app i've compiled on 3.15 has worked for me without recompile on 3.12.
Are you sure you got that bit right?

But again you MUST remember to press "Compile All" to make sure ALL exe's in the .gambas dir get remade.

Post the project if you like. and i'll take a crack at it. i got a fresh Pi here with gambas 3.12 to test it on :)

hmmm, fresh PI ;)
If at first you don't succeed , try it differently.

User avatar
stevedee
Posts: 220
Joined: Monday 20th March 2017 6:06pm

Re: Can't run on Pi any longer

Post by stevedee » Saturday 10th October 2020 12:20pm

Just a note on Debian/Raspbian releases for anyone not clear;

Debian 'stable' releases are typically released every 2 years or so and are very stable. That's the main reason for using Debian and one of the reasons for so many other distros using it as a base. However, if you need a Linux OS with a shorter release interval, there are plenty of others to choose from.

Raspbian is a special Pi version of Debian for Arm processors with a similar release interval. So Raspbian is also very stable, and there are other Pi OS alternatives with shorter release intervals.

Debian has a development branch code-named 'Sid' which is always unstable (think Toy Story). So Sid is generally best avoided. Debian also has a 'testing' branch which is a better bet than Sid (i.e. less likely to have unresolved problems).

Currently;
stable = Buster
testing = Bullseye
unstable = Sid

I hope that helps.

Post Reply