FreeBasic Raspberry Pi OS Bullseye

Linux specific questions.
Post Reply
PavelUT
Posts: 78
Joined: Jun 14, 2021 14:42

FreeBasic Raspberry Pi OS Bullseye

Post by PavelUT »

Hello. Can you please tell me if a FreeBasic version will be implemented for the latest Raspberry Pi OS Bullseye?
Respectfully yours, Pavel
PavelUT
Posts: 78
Joined: Jun 14, 2021 14:42

Re: FreeBasic Raspberry Pi OS Bullseye

Post by PavelUT »

Nobody can answer my question? The fact is that the existing version of FB for Raspberry with the new operating system does not work.
St_W
Posts: 1619
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: FreeBasic Raspberry Pi OS Bullseye

Post by St_W »

Maybe you could first provide some technical details what you exactly mean with "does not work"?
For example
- version and build of FreeBasic, that you tried to use
- description what you tried to do and how it didn't work
- error message(s), if applicable
- (verbose) log output of fbc or other (system) logs, if applicable
- memory dump, if applicable
and possibly more ... depending on how it exactly behaves.
(Or - if you already know why it does not work for you - please tell us why and ideally what needs to be done.)
Rudy
Posts: 2
Joined: Apr 26, 2019 19:21

Re: FreeBasic Raspberry Pi OS Bullseye

Post by Rudy »

I had the same problem with the 64bit version of Bullseye.

Therefore I installed a 32 bit version for the PI.
Thereafter an install of Freebasic.
Everything is working fine now.

Rudy
St_W
Posts: 1619
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: FreeBasic Raspberry Pi OS Bullseye

Post by St_W »

I wonder how you can say you have/had the same problem if there's no useful description of the issue, so nobody really knows what the problem is? ;-)

Probably just the wrong architecture build was chosen - classical RPI uses armhf (older ones armv6, newer ones armv7), the new 64-bit OS uses aarch64 (armv8).
St_W
Posts: 1619
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: FreeBasic Raspberry Pi OS Bullseye

Post by St_W »

As the previous contributors to this thread unfortunately didn't leave any usable information on why they think FreeBasic doesn't work on Pi OS bullseye I got curious and had to try out myself.

So I grabbed latest 64-bit (aarch64) version of Pi OS (based on Debian bullseye) and tried to run "FreeBASIC-1.09.0-linux-aarch64" on it. Not sure if my fellow posters tried the raspian9 or linux-arm builds, but those clearly won't run on a default 64-bit Pi OS install, as it does not come with any other loader than the aarch64 one by default. Unfortunately the aarch64 FreeBasic binaries aren't compatible with Debian bullseye either, because they were built against a newer libc version. Bullseye comes with glibc 2.31 while the fbc binary was built against glibc 2.34 (not sure why such a ridiculously new version was chosen only supported by very few distros currently).

As the current official binaries aren't compatible I tried my older aarch64 fbc build dating back to 2016: https://users.freebasic-portal.de/stw/b ... -03-07.tgz
That one still links to the old libtinfo.5, but that is still available in the 64-bit Pi OS bullseye package repository. After installing that dependency it worked and I was able to compile and run a little hello-world application. So that old FreeBasic build (originally intended for the RPi until i found out that there was not aarch64 distro available for it at the time) works, but is quite outdated meanwhile, so it would be nice to have official binaries targeting a lower glibc version (which should be very easy to do).
PavelUT
Posts: 78
Joined: Jun 14, 2021 14:42

Re: FreeBasic Raspberry Pi OS Bullseye

Post by PavelUT »

I have a 32 bit Raspberry Pi OS Bullseye. FB build offered on the forum for download (viewtopic.php?t=31376#:~:text=linux-arm ... pbian9-x86)
in this operating system does not start at all.
As I understand it, a specific "raspbian10" assembly is needed. But it's not on the forum yet.
Or am I doing something wrong?
Thanks for answers.
St_W
Posts: 1619
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: FreeBasic Raspberry Pi OS Bullseye

Post by St_W »

If you have a 32-bit version of Pi OS you need binaries built for the "armhf" architecture. This applies to the "FreeBASIC-1.09.0-linux-arm" or "FreeBASIC-1.09.0-raspian9-arm" build, which are binary identical btw (not sure why they exist under two different names). Raspian 9 used libc 2.24, which is way older than the one provided by Bullseye, so it should work without issues. You don't need a build exactly for the libc shipped with Bullseye, so no specific "raspian11" build is required.

Thus I'm not really sure why it doesn't work for you. Have you installed all required dependencies (especially tinfo, usually provided by ncurses)? (you should get an according error message in the console when you try to run fbc).

Do you get any error message? (you should if it doesn't run; if it's the wrong binary it should at least claim the the file was not found, otherwise you should get a more details error message explaining what's wrong)

And one more thing: you didn't mention which version of the raspberry you have. I was assuming a Pi 3 or newer. If you still have a Pi 1, which only supports ARMv6 (not ARMv7) you can try these builds:
Pi 1 (ARMv6): https://users.freebasic-portal.de/stw/b ... -02-14.zip
Pi 2/3/4 (ARMv7): https://users.freebasic-portal.de/stw/b ... -02-14.zip
Pi 3B/4 (ARMv8 64-bit): https://users.freebasic-portal.de/stw/b ... -03-07.tgz

If the official builds don't work for you, you can try above builds as well (but make sure to make fbc executable with chmod +x fbc as they're packaged in a ZIP archive, which does not support storing unix permissions).
coderJeff
Site Admin
Posts: 4313
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: FreeBasic Raspberry Pi OS Bullseye

Post by coderJeff »

On last release, When I tried to update ubuntu my SD card became corrupted and I had no back-up copy. I went to https://ubuntu.com/download/raspberry-pi and grabbed the recommended desktop. I have no interest in building multiple versions for RPI.

Use the old fbc version to build a new fbc 1.09.0 on an OS of choice.
St_W
Posts: 1619
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: FreeBasic Raspberry Pi OS Bullseye

Post by St_W »

I'd recommend choosing the official OS for the Raspberry, Raspberry Pi OS (debian based) for the next official build instead of the third-party OS Ubuntu, which is rather untypical for the Pi (the resulting build would've worked on Ubuntu as well). Not taking the latest version, but e.g. going one major version back would increase compatibility even more.

And of course it's actually pretty easy to build fbc oneself, I'd definitely do that if I'd need it myself, but I doubt it's very beginner friendly and probably not doable by PavelUT or Rudy (or at least they most likely won't understand what they are doing, if one tells them the commands to execute, considering they don't even know about basics like different architectures or library dependencies).
coderJeff
Site Admin
Posts: 4313
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: FreeBasic Raspberry Pi OS Bullseye

Post by coderJeff »

If I go to that page I see releases made just a couple of weeks ago:

32-bit one major revision older:

Code: Select all

Release date: January 28th 2022
System: 32-bit
Kernel version: 5.10
Debian version: 10 (buster)
64-bit: the only available?

Code: Select all

Release date: January 28th 2022
System: 64-bit
Kernel version: 5.10
Debian version: 11 (bullseye)
St_W
Posts: 1619
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: FreeBasic Raspberry Pi OS Bullseye

Post by St_W »

That looks like a good choice. The recent release date for the 32-bit legacy version just shows that it still gets (security) updates. And I think going one major release back is a good compromise between compatibility and availability of modern features. Unfortunately there are no usage statistics for the different OS versions (like you know them from Windows or Android), or at least I don't know of any, but I assume that fbc binaries built on buster will be compatibly with most systems out there. btw both have ncurses6 already (besides ncurses5 legacy) as far as I can see.

The 64-bit release is actually pretty new indeed - aarch64 was only available as a beta release for a long time until the first non-beta release has been published recently. So most of the software for Raspberry Pi will still be 32-bit (armhf) and 64-bit (aarch64) is definitely the exception currently.
Rudy
Posts: 2
Joined: Apr 26, 2019 19:21

Re: FreeBasic Raspberry Pi OS Bullseye

Post by Rudy »

Sorry for my late reaction,

I obtained a good working 32bit freebasic version on my Pi3 and Pi4 with the 32bit version of Bullseye:

(Purpose: I ‘m going to make my own beer brewing software for the kettle, reading T-sensors DS18B20, regulating of the heater elements with SSR’s and so on).

uname -all:
===========
Linux rasp 5.10.63-v7+ #1459 SMP Wed Oct 6 16:41:10 BST 2021 armv7l GNU/Linux


Thereafter I installed XFCE as desc top following the instructions on:
https://raspberrypiuser.co.uk/how-to-in ... erry-pi-os


Info “About XFCE”:
=================
rasp
Raspbian GNU/Linux 11 (bullsdeye)
36-bit
Version XFCE 4,16
Debian
CPU: ARMv78 Processor rev 4 (v71) x 4
Mem: 9222,8 MiB
GPU: livmpipe (LLVM 11,0,1,128 bits) (922,0 MiB)


fbc -version:
=============
FreeBASIC Compiler - Version 1.09.0 (2021-12-31), built for linux-arm (32bit)
Copyright (C) 2004-2021 The FreeBASIC development team.
(Good working fbc with no more errors like “missing library”...)


To obtain WiringPi using GIT:
=============================
git clone git://git.drogon.net/wiringPi

Test: GPIO soft on the Pi works perfect.
WiringPi works also perfect with the FBC (Tested with blinking leds).

After testing I made a (good working) copy of the micro-SD card.
Pim Scheffers
Posts: 54
Joined: Jun 29, 2014 17:15

Re: FreeBasic Raspberry Pi OS Bullseye

Post by Pim Scheffers »

Hi,

I've build FreeBasic 1.09.0 64bit for the latest Raspberry Pi OS Bullseye (on a 3b+) using the FreeBasic 1.06 build linked above

It works without the glibc version error.

See the link below:
https://1drv.ms/u/s!ArvnuLSK5obmgr9bNZ ... ?e=VTdLz7
Post Reply