FreeBASIC 1.09.0 Release

General discussion for topics related to the FreeBASIC project or its community.
Post Reply
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: FreeBASIC 1.09.0 Release

Post by D.J.Peters »

fxm wrote:How the compiler can guess your number of bytes (> 1) to read, by passing it a dereferenced byte pointer corresponding to one byte, therefore why a warning?
OK but if size isn't optional why no error/warning message ?
By the way the FB compiler and runtime could do something like this !

Joshy

Code: Select all

#include "crt.bi"
extern "C"
#ifdef __FB_LINUX__
  declare function getBufferSize alias "malloc_usable_size" (byval p as any ptr) as size_t
#elseif defined(__FB_WIN32__)
  declare function getBufferSize alias "_msize" (byval p as any ptr) as size_t   
#else
  #error 666: Build trarget must be Windows or Linux !
#endif
end extern

const fileName = "guitarra.QSF"
var hFile = FreeFile()
if open(fileName,for binary,access read,as hFile) then
  print "error: can't read: '" & fileName & "' !"
  beep:sleep:end 1
end if
dim as integer nBytes = lof(hFile)
print "file size: " & nBytes
dim as ubyte ptr fileBuffer=allocate(nBytes)
get #hFile,,*fileBuffer,getBufferSize(fileBuffer)
close hFile
fxm
Moderator
Posts: 12066
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: FreeBASIC 1.09.0 Release

Post by fxm »

The position passed (*pointer) to 'get' does not necessarily correspond to the start of an allocated memory but can be the result for example of an offset applied from the start of the allocated memory, or even issued from variables not allocated dynamically.
miilvyxg
Posts: 193
Joined: Dec 07, 2021 6:51

Re: FreeBASIC 1.09.0 Release

Post by miilvyxg »

Congratulation to coderJeff and the community. Even though I'm no longer use FreeBASIC.
Dinosaur
Posts: 1478
Joined: Jul 24, 2005 1:13
Location: Hervey Bay (.au)

Re: FreeBASIC 1.09.0 Release

Post by Dinosaur »

Hi All

As per my PinePhone thread, I have installed 1.07 aarch64 and got it to work correctly.
Also tried 1.08 which had a -T warning but other wise worked ok.
With 1.09 I got the following error:
fbc -v -C hello.bas (in directory: /media/mobian/PP64-SD/FreeBasic/Projects)
fbc: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by fbc)
Compilation failed.
Previously when I tried to find and install the dependencies, it simply blew out to more dependencies missing, but I didn't document it.I did read on the a Mobian site after extensive search that the GLIBC 2.34 was experimental, but that statement may have been a few years old.

With the help of SARG, I have compiled 1.09 and it is also working now.
He did suggest you guys should know about the error.
I still don't have GLIBC 2.34 installed but 1.09 compiles ok and works fine now.

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

Re: FreeBASIC 1.09.0 Release

Post by coderJeff »

Dinosaur wrote:With the help of SARG, I have compiled 1.09 and it is also working now.
He did suggest you guys should know about the error.
I still don't have GLIBC 2.34 installed but 1.09 compiles ok and works fine now.
fbc 1.09.0
- the arm (32bit) package was built on raspbian9 on an rpi3
- the aarch64 (64bit) package was built on ubuntu 21.04 on an rpi4

fb 1.07.2
- the aarch64 (64bit) package was built on ubuntu 20.10 on an rpi4

It is impossible that I could build binary packages for every OS. Support for other OS' will need to come from others - by bootstrapping an fbc on to that OS and building a package that other users of that OS can use.
SARG
Posts: 1753
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FreeBASIC 1.09.0 Release

Post by SARG »

@Jeff
That's was just an information maybe useful for some users and absolutely not a request.
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: FreeBASIC 1.09.0 Release

Post by caseih »

The complete lack of standardization of the ARM platform is a real problem, nothing FB devs can do anything about. This isn't Linux's fault per se. Every ARM device has its own variation on the boot loader, custom device tree, proprietary bits, etc. So there's no universal ARM Ubuntu distribution, for example, that runs on every device. Most custom devices like Pine's run their own distro that sometimes is based on something standard, but not always. So it's incredibly hard to support Linux binaries on ARM. If ARM ever finally got a standardized platform the way Intel-compatible PCs have with standardized booting, standardized device layouts, then Intel would be in serious trouble! Maybe if Microsoft would get serious about Windows on ARM then we'd see some standardization. Or Maybe Apple's M1 family will spur some of this.
Munair
Posts: 1286
Joined: Oct 19, 2017 15:00
Location: Netherlands
Contact:

Re: FreeBASIC 1.09.0 Release

Post by Munair »

Manjaro Linux has upgraded FBC to version 1.09 in their repo.
Munair
Posts: 1286
Joined: Oct 19, 2017 15:00
Location: Netherlands
Contact:

Re: FreeBASIC 1.09.0 Release

Post by Munair »

My first find so far: fbc 1.09 does not work out of the box from the Manjaro repo.

The error I get from fbc when trying to compile anything:
/usr/bin/../bin/ld: /usr/bin/../lib/freebasic/linux-x86_64/fbrt0.o: plugin needed to handle lto object
even though /lib/freebasic/linux-x86_64/fbrt0.o exists.
speedfixer
Posts: 606
Joined: Nov 28, 2012 1:27
Location: CA, USA moving to WA, USA
Contact:

Re: FreeBASIC 1.09.0 Release

Post by speedfixer »

It worked fine for me, no mods or extra care, on Manjaro. Passed my tiny test suite.

david
Munair
Posts: 1286
Joined: Oct 19, 2017 15:00
Location: Netherlands
Contact:

Re: FreeBASIC 1.09.0 Release

Post by Munair »

speedfixer wrote: Jan 24, 2022 17:45 It worked fine for me, no mods or extra care, on Manjaro. Passed my tiny test suite.
David, did you install from Manjaro's repo?
speedfixer
Posts: 606
Joined: Nov 28, 2012 1:27
Location: CA, USA moving to WA, USA
Contact:

Re: FreeBASIC 1.09.0 Release

Post by speedfixer »

Yes, I did.
I may have addressed the libtinfo problem. I don't remember. That is a long-standing, well-known recurring issue. I might have fixed it automatically on install.

I did NOT have a libfbrt0.o message, for sure.

Path problem?

david
Munair
Posts: 1286
Joined: Oct 19, 2017 15:00
Location: Netherlands
Contact:

Re: FreeBASIC 1.09.0 Release

Post by Munair »

The libtinfo issue is resolved by the Manjaro packager without leaning on ncurses5. Only when manually installing fbc from file is ncurses5 needed, but it's in the AUR repo and needs to be built, which requires manual key verification.

I'm not sure what is different on your system. I never changed paths and FBC 1.07 and 1.08 worked out of the box. Even if I downgrade 1.09 back to 1.08 then the latter works.
Munair
Posts: 1286
Joined: Oct 19, 2017 15:00
Location: Netherlands
Contact:

Re: FreeBASIC 1.09.0 Release

Post by Munair »

After contacting the package maintainer regarding the lto object error, he responded saying that the fbc 1.09 package must be rebuilt with the latest lto fixes. He said he would address this soon.
funlw65
Posts: 8
Joined: Jun 20, 2010 22:15
Contact:

Re: FreeBASIC 1.09.0 Release

Post by funlw65 »

Regarding RPi4, in my humble opinion, Alpine Linux does it right! Don't know it fb can be bootstraped there, I don't have yet the board, still on the wish list.
Post Reply