FreeBASIC 1.08 Development

For other topics related to the FreeBASIC project or its community.
coderJeff
Site Admin
Posts: 3118
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

FreeBASIC 1.08 Development

Postby coderJeff » Sep 29, 2019 14:36

Development on fbc 1.08.0 started around September 2019.

I would like to use this topic to help concentrate discussions related to fbc 1.08 development. Sometimes the conversations and discussions can get spread out all over the forums and it's tough to keep track. So if there is a another topic about development, it can be linked from here.

For discussions on bugs / development, there is also:
Issue tracker on github: https://github.com/freebasic/fbc/issues
Bug tracker on sourceforge.net: https://sourceforge.net/p/fbc/bugs/

For discussion on the 1.07.1 release see: FreeBASIC 1.07.1 Release Discussion
St_W
Posts: 1476
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: FreeBASIC 1.08 Development

Postby St_W » Sep 29, 2019 16:17

I don't know if it's of any importance, but some recent commit on master broke the TDM-GCC build.

Code: Select all

CC src/rtlib/obj/win32/file_htruncate.o
In file included from src/rtlib/win32/file_htruncate.c:4:0:
d:\tdm-gcc-32\include\unistd.h:41:20: error: unknown type name 'off_t'
 int ftruncate(int, off_t);
coderJeff
Site Admin
Posts: 3118
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: FreeBASIC 1.08 Development

Postby coderJeff » Sep 29, 2019 21:35

Sorry, I have not tested with TDM tool chain in ages. Looks like 'ftruncate' in unistd.h refers to 'off_t' when it should refer to '_off_t'. Normally, unistd.h <= io.h <= sys/types.h, would define 'off_t', but we prefer non-old-names so it only gets defined as '_off_t'. Changing the declaration in unistd.h to '_off_t' should fix it.

Wondering if should not even try to use ftruncate/ftruncate64 on windows toolchains, and just call windows API SetEndOfFile, only.
coderJeff
Site Admin
Posts: 3118
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: FreeBASIC 1.08 Development

Postby coderJeff » Sep 29, 2019 22:25

To catch everybody up on changes made this month:

robert
Posts: 10
Joined: Aug 06, 2019 18:45

Re: FreeBASIC 1.08 Development

Postby robert » Sep 30, 2019 1:50

Compiling Git Cloned 1.08 on OpenSUSE Leap 15.1 x86_64

PROBLEM:
WhoMeYeahYou:~/dev/fbc> make
mkdir -p src/compiler/obj/linux-x86_64
FBC src/compiler/obj/linux-x86_64/ast-gosub.o
fbc: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
make: *** [makefile:576: src/compiler/obj/linux-x86_64/ast-gosub.o] Error 127

SOLUTION:
WhoMeYeahYou:~/dev/fbc> sudo zypper in libncurses5

There are symlink workarounds for the libtinfo.so.5 problem but it would be simpler if libncurses5 is added to the OpenSUSE Installing development packages section of the Compiling FB on Linux page of the FBWiki at

https://www.freebasic.net/wiki/wikka.ph ... BuildLinux

Also under the OpenSUSE Installing development packages section the line

libffi48-devel

should be changed to

libffi-devel

I had the same problem with libtinfo.so.5 when compiling 1.08 on Kubuntu Eoan Ermine 19.10 x86_64 but

sudo apt-get install libtinfo5

solved the problem, so maybe

libtinfo5

could be added to the Debian-based systems (including Ubuntu, Mint etc.): Installing development packages section of the Compiling FB on Linux page of the FBWiki
coderJeff
Site Admin
Posts: 3118
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: FreeBASIC 1.08 Development

Postby coderJeff » Sep 30, 2019 3:08

robert wrote:fbc: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

This seems to be a common problem. Yeah, I usually just fix with a symlink...lazy, I know.

WhoMeYeahYou:~/dev/fbc> sudo zypper in libncurses5

Sorry, I don't have any experience with OpenSUSE. If I understand correctly, 'ncurses-devel' is listed but this command must be run also? Or should 'libncurses5' be added to the list of OpenSUSE packages?

should be changed to
libffi-devel

OK, done.

I had the same problem with libtinfo.so.5 when compiling 1.08 on Kubuntu Eoan Ermine 19.10 x86_64 but
sudo apt-get install libtinfo5

Should this be "-dev" package? Maybe add separate list for Kubuntu?

robert, thanks for your feedback.
coderJeff
Site Admin
Posts: 3118
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: FreeBASIC 1.08 Development

Postby coderJeff » Sep 30, 2019 3:10

St_W wrote:I don't know if it's of any importance, but some recent commit on master broke the TDM-GCC build.

OK, I applied a change that should fix this. I did not install TDM and test. For the windows toolchains, not using unistd.h at all now. And left some notes in the source.
coderJeff
Site Admin
Posts: 3118
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: FreeBASIC 1.08 Development

Postby coderJeff » Sep 30, 2019 3:13

changelog.txt wrote:- rtlib: inc/file.bi:FileFlush() function, usable for file, PIPE, CONS, and ERR streams opened for BINARY, RANDOM, OUTPUT, APPEND.
- rtlib: inc/file.bi;FileTruncate() function


Documentation added:
- FILESETEOF
- FILEFLUSH
robert
Posts: 10
Joined: Aug 06, 2019 18:45

Re: FreeBASIC 1.08 Development

Postby robert » Sep 30, 2019 4:18

coderJeff wrote:
robert wrote:fbc: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

This seems to be a common problem. Yeah, I usually just fix with a symlink...lazy, I know.

WhoMeYeahYou:~/dev/fbc> sudo zypper in libncurses5

Sorry, I don't have any experience with OpenSUSE. If I understand correctly, 'ncurses-devel' is listed but this command must be run also? Or should 'libncurses5' be added to the list of OpenSUSE packages?

should be changed to
libffi-devel

OK, done.

I had the same problem with libtinfo.so.5 when compiling 1.08 on Kubuntu Eoan Ermine 19.10 x86_64 but
sudo apt-get install libtinfo5

Should this be "-dev" package? Maybe add separate list for Kubuntu?

robert, thanks for your feedback.


To avoid having to make a symlink on OpenSUSE, 'libncurses5' should be added to the list of OpenSUSE packages.

At the bottom of the FBWiki page at

https://www.freebasic.net/wiki/wikka.ph ... Installing

there is a note, concerning the libtinfo.so.5 issue, (which I'm sure has wrecked more than one noobie's compilation ambitions) titled

Compiling under Ubuntu 10.04 LTS, 64-bit:

which indicates to me that the libtinfo.so.5 missing problem on Ubuntu goes back to at least Lucid (10.04 LTS) which came out nine years ago. So to avoid having to make a symlink on Ubuntu variants, 'libtinfo5' should be added to the list of Ubuntu etc packages. Maybe Debian doesn't have the problem. All the flavours and versions derived from Debian make a real rat's nest of possibilities.

This note, concerning the libtinfo.so.5 issue, is not found on the Compiling FB on Linux page at

https://www.freebasic.net/wiki/wikka.ph ... BuildLinux

Noobies, do not despair. Even people using CERN's data analytics couldn't figure it out and had to ask for help. See

https://root-forum.cern.ch/t/cannot-loa ... 04-2/33195

Ubuntu 19.10 is due for release on October 17, 2019.
St_W
Posts: 1476
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: FreeBASIC 1.08 Development

Postby St_W » Sep 30, 2019 18:01

re TDM: build works again, thank you.

re new file functions: any reason why the function is called fileTruncate in the changelog and fileSetEOF in the wiki?
angros47
Posts: 1535
Joined: Jun 21, 2005 19:04

Re: FreeBASIC 1.08 Development

Postby angros47 » Sep 30, 2019 19:07

Is there any chance that audio support could be added, in this version, as it has been discussed on https://freebasic.net/forum/viewtopic.php?f=17&t=26256 ?
coderJeff
Site Admin
Posts: 3118
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: FreeBASIC 1.08 Development

Postby coderJeff » Oct 06, 2019 16:13

@robert, I believe I have added the needed notes to wiki documentation regarding libtinfo/libncurses for installing and building fbc. You are welcome to change as needed.

If I understand a little of this issue: libncurses and libncursesw both need libtinfo functionality, but libtinfo may or may not be separate library. Some lInux distros have the libtinfo package available for install, but only serves to install a symlink to ncurses. However, if the package dependencies are correct, then all dependencies should get installed when installing ncurses-dev, which includes libtinfo-dev, which may be a library or a just symlink.
coderJeff
Site Admin
Posts: 3118
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: FreeBASIC 1.08 Development

Postby coderJeff » Oct 06, 2019 16:14

St_W wrote:re new file functions: any reason why the function is called fileTruncate in the changelog and fileSetEOF in the wiki?


Name was changed. Should read FileSetEof() in fbc/master now. Thanks.
coderJeff
Site Admin
Posts: 3118
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: FreeBASIC 1.08 Development

Postby coderJeff » Oct 06, 2019 16:15

angros47 wrote:Is there any chance that audio support could be added, in this version, as it has been discussed on https://freebasic.net/forum/viewtopic.php?f=17&t=26256 ?

I had a quick look at the library source only. Looks like a pretty good start. I will follow-up there.
St_W
Posts: 1476
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: FreeBASIC 1.08 Development

Postby St_W » Oct 06, 2019 21:18

This weekend I took the time to update a few bindings (headers for 3rd party libraries) shipped with FreeBasic. Luckily dkl has provided us a great tool which drastically simplifies binding creation called "fbfrog" (https://github.com/dkl/fbfrog). Beside that there's a repository with fbfrog configuration files and additional scripts to automate the binding creation for many common libraries (https://github.com/dkl/fbbindings). As dkl stopped working on FreeBasic these repositories are unmaintained, but (in my consideration) still very valuable for FreeBasic.

What about making these two repositories/projects official FreeBasic projects? Which would involve
- having them maintained by the https://github.com/freebasic user
- FreeBasic dev team managing pull requests for those projects

This would allow a simplified maintenance of the bindings and other FB users could easily provide their own or help updating. Everything one needs to do to update a binding that already exists in the fbbindings repository is to
- update the makefile to download the latest version of the C headers
- repeat: run the fbfrog tool & manually review results & update the fbfrog configuration if needed; until headers look fine
- test binding (e.g. compile & run example application (ideally on different platforms)) and apply fixes to fbfrog config (preferable) or manually (if needed)
- submit a PR for the fbbindings repo with the updated configurations and headers

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest