[Gambas-user] Gambas on FreeBSD

Admin admin at allunix.ru
Tue Feb 4 15:01:14 CET 2020


To whom it may concern.

I was willing to create a Cisco-style remote CLI for FreeBSD for a very 
long time, but since I'm no so good at any native programming languages 
for that system, I could only wish that gambas would be available for 
FreeBSD once again some time.

There used to be an official port of Gambas2 in FreeBSD port subsystem, 
but it's long gone. And Gambas3 simply could not be built on FreeBSD due 
to some libraries absence. Well, that changed when Gambas 3.14 was 
released.  There are still some header files missing in base FreeBSD 
system, but that's fixable. Also, I'm not even talking about Gambas IDE 
at this point, all I needed was an interpreter. Realistically it is 
what's most people need, I think, since FreeBSD is not as popular as a 
desktop system then it is as a server platform (which it's great at 
btw), so all I always wanted to compile is basically speaking - a gbrx3 
binary. There's a FreeBSD install instructions on a gambaswiki.org, but 
they are literally last-century-old, because, for example, there's 
mentioning that FreeBSD has it's OpenGL libraries at /usr/X11R6 which 
isn't true since, like, 2003. And a lot more. So this page is no good. 
It's actually better to take it down completely, because if you follow 
those instructions, you will break any modern FreeBSD installation this 
way. Anyway, let's get to the point:

So, after some trial and error I was able to find a stable way to build 
a Gambas 3.14.2 interpreter from sources and created a binary package 
that works on currently last stable syetem realease - FreeBSD 12.1 x64.

I've created some scripts. So, if you happen to also want to write 
non-graphical software for BSD, this is what I can now offer:

on a fresh install of FreeBSD 12.1 x64 just run this command you're good 
to go:

# fetch http://allunix.ru/back/gbinst.sh && sh gbinst.sh

this will install required dependencies, and you will have your Gambas 
infrastructure installed in /usr/local/ (just as all software under 
FreeBSD does)

This is purely binary installation, no compilation needed. If you want 
to compile Gambas 3.14.2 under FreeBSD yourself, here's another command 
for you:

# fetch http://allunix.ru/back/gb3compile.sh && sh gb3compile.sh

this will fetch a tarball of vanilla gambas 3.14.2 sources and make all 
necessary modifications to them, then compile and install Gambas3 in 
/usr/local

Since I did all this firstly for myself, you may find my choice of 
dependencies strange or unsuitable for your needs, but since I only 
needed this amount of functionality (like, for example, mysql but not 
postgres or sqlite), you may want to change the script any way you like.

I hope this would be useful for somebody in the future.

Best Regards
Dmitry Bachilo
admin at allunix.ru



More information about the User mailing list