fbc works on Debian 11 but not on Debian 12

Linux specific questions.
Post Reply
Dinosaur
Posts: 1495
Joined: Jul 24, 2005 1:13
Location: Hervey Bay (.au)

fbc works on Debian 11 but not on Debian 12

Post by Dinosaur »

Hi all

Using a cheap Rpi Zero 32 bit for a project.
Using version 1.10 on Debian 11 everything is fine.
When I try to use it with Debian 12 I get this error:
-mfloat-abi=hard :selected architecture lacks an FPU

Recall many years ago there was a compile switch to emulate an FPU, but looking
at all the options now that does not seem to be the case.
Tried the various -fpu options to no avail.

Can someone shed some light on this please.

Regards
marcov
Posts: 3465
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Re: fbc works on Debian 11 but not on Debian 12

Post by marcov »

If that really is the zero (and not -W etc), that is the same processor as the original RPI (BCM2835). Which does have FPU, but a lower level (ARMV6) vs later ones (ARMV7 or V8). So maybe the debian compiler dropped armv6, or you must explicitly select it ?
Dinosaur
Posts: 1495
Joined: Jul 24, 2005 1:13
Location: Hervey Bay (.au)

Re: fbc works on Debian 11 but not on Debian 12

Post by Dinosaur »

Hi All

marcov, after using the magnifying glass to read the back of the board,
it is a Rpi Zero W v1.1. without Wifi.
So maybe the debian compiler dropped armv6, or you must explicitly select it ?
Are you referring to the FreeBasic compiler ? I don't understand your statement.
Are there compile options that would rectify this problem. ?

Regards
fxm
Moderator
Posts: 12181
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: fbc works on Debian 11 but not on Debian 12

Post by fxm »

Dinosaur wrote: May 15, 2024 19:04 Are there compile options that would rectify this problem. ?

Perhaps among these:
Compiler Option: -arch
Compiler Option: -fpu
Dinosaur
Posts: 1495
Joined: Jul 24, 2005 1:13
Location: Hervey Bay (.au)

Re: fbc works on Debian 11 but not on Debian 12

Post by Dinosaur »

Hi All

fxm , I tried -fpu but will try -arch.

ps: Still not getting email notifications of replies ??
srvaldez
Posts: 3388
Joined: Sep 25, 2005 21:54

Re: fbc works on Debian 11 but not on Debian 12

Post by srvaldez »

Hi Dinosaur
try the arm6 build from https://users.freebasic-portal.de/stw/b ... armv6-rpi/
Dinosaur
Posts: 1495
Joined: Jul 24, 2005 1:13
Location: Hervey Bay (.au)

Re: fbc works on Debian 11 but not on Debian 12

Post by Dinosaur »

Hi All

srvaldez , it does not show any 32 bit installs.

Regards
Dinosaur
Posts: 1495
Joined: Jul 24, 2005 1:13
Location: Hervey Bay (.au)

Re: fbc works on Debian 11 but not on Debian 12

Post by Dinosaur »

Hi All

@fxm
Managed to get it to work with -arch native

Just as an observation: Debian 12 takes 3 min to boot on the Rpi Zero W v1.1
whereas Debian 11 takes 2 min.

Many thanks for the help.

Regards
coderJeff
Site Admin
Posts: 4354
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: fbc works on Debian 11 but not on Debian 12

Post by coderJeff »

Dinosaur wrote: May 14, 2024 22:31 Can someone shed some light on this please.
fbc uses gcc to compile programs.
fbc intends to build to 'arm-linux-gnueabihf' target, but gcc default options have changed over the years
- required on gcc 12: -march=armv7-a does not enable hard float so -march=armv7-a+fp required
- optional on gcc 8 through 11: -march=armv7-a has hard-float by default so is same as -march=armv7-a+fp
- won't work on gcc 7 and earlier: -march=armv7-a only, hard-float by default, '-march=armv7-a+fp' is not recognized and can't be used

https://freebasic.net/forum/viewtopic.p ... 36#p301636
Post Reply