FreeBASIC 1.10.1 Release Discussion

General discussion for topics related to the FreeBASIC project or its community.
Post Reply
coderJeff
Site Admin
Posts: 4313
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: FreeBASIC 1.10.0 Release Discussion

Post by coderJeff »

UEZ wrote: May 22, 2023 12:19 Imho, all the examples in the examples folders are useless if they can't be compiled properly
I agree.
without installing any 3rd party SDKs
Maybe. Remove headers in './inc' also? They can't be used without downloading third party libraries.

I believe many examples haven't been reviewed for years and years which I suppose indicates a lack of interest. I don't recall seeing much feedback on examples over the years but maybe I just missed or have forgotten.
UEZ
Posts: 972
Joined: May 05, 2017 19:59
Location: Germany

Re: FreeBASIC 1.10.0 Release Discussion

Post by UEZ »

srvaldez wrote: May 22, 2023 12:40 hi all :)
@UEZ
if you add #inclib "d3dx9_42" to d3d9_primitives.bas then it may work
it compiles ok here, however the first time that I ran it displayed the colorful triangle then it crashed, but ran ok on second try
this is for Windows x64, don't have the 32-bit version of the d3dx9_42.dll
I used d3dx9_43.dll instead and it worked but only x86. :)

Thx.
Provoni
Posts: 513
Joined: Jan 05, 2014 12:33
Location: Belgium

Re: FreeBASIC 1.10.0 Development

Post by Provoni »

coderJeff wrote: May 14, 2023 14:48 fxm, sounds good, let's come back to it.

For now I just want to push ahead and get a release done before we start working on whatever the next thing is. Because of course there's lots of things we could keep working on: bug fixes, testing out the new features, investigating reports from the forum (pmap, array bounds, utf8 strings, fbdoc formatting), user contributions I was too slow to deal with, the list goes on and on.

Anyway fbc 1.10.0 release will be based on this commit: FreeBASIC 1.10.0 Release

With a little luck I will be done with the builds and uploads today.
Thank you very much for 1.10.0. It works very well.

Thanks to the entire FreeBASIC team, you guys rock!

Code: Select all

░█▀█▀█ █── ▄▀▄ █▄─█ █─▄▀──
──░█── █▀▄ █▀█ █─▀█ █▀▄───
─░▄█▄─ ▀─▀ ▀─▀ ▀──▀ ▀─▀▀──

░▀▄─────▄▀ ▄▀▄ █─█──
──░▀▄─▄▀── █─█ █─█──
────░█──── ─▀─ ─▀───
angros47
Posts: 2321
Joined: Jun 21, 2005 19:04

Re: FreeBASIC 1.10.0 Release Discussion

Post by angros47 »

Tested with the last version of Emscripten, works well
Coolman
Posts: 294
Joined: Nov 05, 2010 15:09

Re: FreeBASIC 1.10.0 Release Discussion

Post by Coolman »

After getting the 1.10.0 version from the official github, i compiled it and generated a deb package (ubuntu) with checkinstall (it's easier to install uninstall with dpkg). i quickly tested a few programs. no problem found. great job.
Landeel
Posts: 777
Joined: Jan 25, 2007 10:32
Location: Brazil
Contact:

Re: FreeBASIC 1.10.0 Release Discussion

Post by Landeel »

The old '#811 *(ptr).field should give an error' bug is now fixed for fbc version 1.10.0 (and later).
Ouch, this one got me right in the nut. Most are easy to fix, but when you have some nested macros it gets a little crazier.
Awesome release, though.
coderJeff
Site Admin
Posts: 4313
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: FreeBASIC 1.10.0 Release Discussion

Post by coderJeff »

Coolman wrote: May 24, 2023 13:26 After getting the 1.10.0 version from the official github, i compiled it and generated a deb package (ubuntu) with checkinstall (it's easier to install uninstall with dpkg). i quickly tested a few programs. no problem found. great job.
NIce. Do you know anything about updating debian/ubuntu package servers? I know nothing about it other than our release is a little weird in that it has only ever been released with './install.sh' in the binaries -- or if building from sources 'make install'.

For comparison, Only days after the release, Felix Yan released for Arch Linux: https://archlinux.org/packages/extra/x86_64/freebasic/
We didn't send out any reminder or announcement there, it just happens like by magic.
Coolman
Posts: 294
Joined: Nov 05, 2010 15:09

Re: FreeBASIC 1.10.0 Release Discussion

Post by Coolman »

coderJeff wrote: May 28, 2023 10:11
Coolman wrote: May 24, 2023 13:26 After getting the 1.10.0 version from the official github, i compiled it and generated a deb package (ubuntu) with checkinstall (it's easier to install uninstall with dpkg). i quickly tested a few programs. no problem found. great job.
NIce. Do you know anything about updating debian/ubuntu package servers? I know nothing about it other than our release is a little weird in that it has only ever been released with './install.sh' in the binaries -- or if building from sources 'make install'.

For comparison, Only days after the release, Felix Yan released for Arch Linux: https://archlinux.org/packages/extra/x86_64/freebasic/
We didn't send out any reminder or announcement there, it just happens like by magic.
not really, a long time ago I studied the debian utilities for generating deb packages but I found that checkinstall is much faster and easier to use. I use a vm under qemu to generate packages and compile all the programs I use under linux. that said, I have sometimes compiled and installed programs (for example qemu, ffmpeg, HandBrakeCLI. ...) in the /opt directory, then compress the directories to transfer them to the real system, which works very well without generating deb packages. note that choosing the /opt directory avoids conflicts with other packages and facilitates uninstallation by simply deleting them...

the generated freebasic package is about 3.3 MiB in size and contains only the essentials of freebasic, the executable, the includes and the libraries. i've deactivated the documentation. i'll get it and the examples in the source code...

if you want, i can post the package. you can add it as a download. it surprises me that nobody like Felix Yan offers the same thing in deb format for debian and ubuntu. if i have time, i'll do a tutorial on compiling and generating a freebasic deb package in my blog.

i'm impressed by the amount of work you put into maintaining freebasic. thank you.

installing a program using make install from source is inevitably a source of conflict when upgrading. if you want to keep a clean system, it's best to avoid it. i've been using kde neon, a distribution based on ubuntu lts, for years. i've only installed it once, and so far the upgrade has gone without a hitch...

if you want more information, you can visit my blog :

https://www.developpez.net/forums/blogs ... ezako2016/

sorry, it's in french.
St_W
Posts: 1619
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: FreeBASIC 1.10.0 Release Discussion

Post by St_W »

I've set up deb packaging for my CI builds some years ago, but don't update them very often. It uses the bash scripts included in the FB repo. Just triggered a new build and it ran through, but did not test it whether it's still fine.

see https://freebasic.net/forum/viewtopic.php?p=254744
Coolman
Posts: 294
Joined: Nov 05, 2010 15:09

Re: FreeBASIC 1.10.0 Release Discussion

Post by Coolman »

for those who might be interested here's a quick tutorial

after installing all the dependencies, here are the instructions for generating a deb package :

git clone https://github.com/freebasic/fbc.git
cd fbc


you must have freebasic installed :

make

here, for example, I got an error message related to gpm :

apt search gpm
sudo apt install libgpm-dev
make


you must have checkinstall installed :

please note that so that the documentation is not integrated, I have renamed the doc directory.

sudo checkinstall -D --fstrans=yes --install=no --pkgname=freebasic --pkgversion=1.10.0 --maintainer=freebasic --nodoc

for details of these orders, man checkinstall

the package is generated :

freebasic_1.10.0-1_amd64.deb - 3,3 Mio

Note that the changelog in the github displays :

Version 1.20.0

[changed]

[added]

[fixed]

Version 1.10.0

[changed]
- gcc: '-funwind-tables' enabled on 64-bit targets for stack unwinding (adeyblue)
- fbc: '--eh-frame-hdr' for linking on 64-bit nix targets for stack unwinding (adeyblue)
- .....


and so, when I type fbc -version, I get :

FreeBASIC Compiler - Version 1.20.0 (2023-05-23), built for linux-x86_64 (64bit)
Copyright (C) 2004-2023 The FreeBASIC development team.
coderJeff
Site Admin
Posts: 4313
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: FreeBASIC 1.10.0 Release Discussion

Post by coderJeff »

Coolman wrote: May 30, 2023 11:56 for those who might be interested here's a quick tutorial
That's neat and worked for me. That kind of gives me idea how things might produce a package. Looks like 'checkinstall' can handle some more detailed information to fill out details about the package. I didn't modify 'requires' but the package still worked because I have all the dependencies already installed.
coderJeff
Site Admin
Posts: 4313
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: FreeBASIC 1.10.0 Release Discussion

Post by coderJeff »

St_W wrote: May 30, 2023 10:56 I've set up deb packaging for my CI builds some years ago, but don't update them very often. It uses the bash scripts included in the FB repo. Just triggered a new build and it ran through, but did not test it whether it's still fine.

see https://freebasic.net/forum/viewtopic.php?p=254744
Sorry, I never saw that before. Just tried the 64bit package and worked for when 1) saved first, and then 2) right click on the file to install.
Nice!
tbh, now the first time I ever noticed `./contrib/deb/bintar-to-bindeb.sh`
St_W
Posts: 1619
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: FreeBASIC 1.10.0 Release Discussion

Post by St_W »

coderJeff wrote: May 31, 2023 22:29 tbh, now the first time I ever noticed `./contrib/deb/bintar-to-bindeb.sh`
I just checked and actually I'm using a slightly customized version of that script. Main difference being added args for specifying arch and distro as well as updated dependencies (removed the amd64 specific stuff and added "libffi-dev" and "libgl1-mesa-dev". Plus some file permissions fixup (only needed in my specific case as I have a ZIP instead of a tarball as input) and lintian overrides for the arm packages.

Code: Select all

#!/bin/sh
set -ex

if [ ! -f "$1" ] || [ -z "$2" ] || [ -z "$3" ] || [ -z "$4" ] || [ -z "$5" ] || [ -z "$6" ] ]; then
  echo "usage:  $0  FB-binary.tar.gz  maintainer  email  version  distro  arch"
  exit 1
fi

name="freebasic"
maintainer="$2"
email="$3"
version="$4"
distro="$5"
arch="$6"

list_depends()
{
	distro="$1"
	arch="$2"

	# Determine the deb dependencies

		echo "libc6"
		echo "libncurses5"
		echo "binutils"
		echo "gcc"
		echo "g++"
		echo "libc6-dev"
		echo "libncurses5-dev"
		echo "libffi-dev"
		echo "libgl1-mesa-dev"
		echo "libx11-dev"
		echo "libxext-dev"
		echo "libxpm-dev"
		echo "libxrandr-dev"
		echo "libxrender-dev"

}


# Extract the binary .tar.gz into FreeBASIC-x.xx.x-abcdef/
#tar -xzf "$1"
unzip "$1"
tarballbasename=`find . -mindepth 1 -maxdepth 1 -type d | head -n1 | sed 's|^./||'`

chmod +x "$tarballbasename/bin/fbc"
chmod +x "$tarballbasename/install.sh"

# Set everything to standard permissions (for deb packages)
find "$tarballbasename" -type d               -print0 | xargs -0 chmod 755
find "$tarballbasename" -type f   -executable -print0 | xargs -0 chmod 755
find "$tarballbasename" -type f ! -executable -print0 | xargs -0 chmod 644


mkdir package
mkdir -m 0755 package/usr
mkdir -m 0755 package/usr/bin
mkdir -m 0755 package/usr/include
mkdir -m 0755 package/usr/lib
mkdir -m 0755 package/DEBIAN

mkdir -p package/usr/share/lintian/overrides
cp freebasic.overrides package/usr/share/lintian/overrides/freebasic


# install.sh into package/usr/
cd "$tarballbasename"
./install.sh -i ../package/usr/
cd ..
freebasic.overrides

Code: Select all

freebasic [armhf] binary: embedded-library * ncurses
freebasic [armel] binary: embedded-library * ncurses
Coolman
Posts: 294
Joined: Nov 05, 2010 15:09

Re: FreeBASIC 1.10.0 Release Discussion

Post by Coolman »

coderJeff wrote: May 31, 2023 22:26
Coolman wrote: May 30, 2023 11:56 for those who might be interested here's a quick tutorial
That's neat and worked for me. That kind of gives me idea how things might produce a package. Looks like 'checkinstall' can handle some more detailed information to fill out details about the package. I didn't modify 'requires' but the package still worked because I have all the dependencies already installed.
yes, it works if all the dependencies are installed. for freebasic there are many, including gcc and many libraries. normally these dependencies are installed automatically if they are referenced in the package. it's a long and tedious job because you have to identify them all. i prefer the manual method for freebasic but it's not suitable for beginners. the ideal would be to find someone who's motivated enough and has the time to maintain and create a package that meets the criteria of debian ubuntu packages. these linux distributions have the necessary tools and documentation but you need to have the time to study them in depth to master them.
Luxan
Posts: 222
Joined: Feb 18, 2009 12:47
Location: New Zealand

Re: FreeBASIC 1.10.0 Release Discussion

Post by Luxan »

About gcc and gas

Is gcc going to be supported for all future releases of FreeBasic.

What are the advantages of gas.

Can FreeBasic, compiled with gcc, be cross compiled for other
platforms , or devices .
Post Reply