Gambas on CentOS 7- is it possible to make it work?

Issues related to applications and software problems
Patrician
Posts: 10
Joined: 2016/09/08 23:06:37

Re: Gambas on CentOS 7- is it possible to make it work?

Post by Patrician » 2016/09/16 00:25:51

Gambas 3.9.1 compiled now with working SDL2 component, I have also re-enabled jit. I have successfully ran the "Gambas Gears" demo program which relies on SDL2 being installed.

I am going to try a clean install on a VM and if it works I will post up instuctions on installing on Centos.

Patrician
Posts: 10
Joined: 2016/09/08 23:06:37

Re: Gambas on CentOS 7- is it possible to make it work?

Post by Patrician » 2016/09/18 01:47:10

Clean install in VM, worked. Installed necessary RPMS from repostories, then copied across GAMBAS 3.9.1 RPMs that I built and ran yum install on them. Everything went well, downloaded a batch of examples from GAMBAS software farm and ran without issue.

Patrician
Posts: 10
Joined: 2016/09/08 23:06:37

Re: Gambas on CentOS 7- is it possible to make it work?

Post by Patrician » 2016/09/24 21:49:37

Follow these steps at your own risk, DO NOT create on a production host until you are satisfied it is safe.

To make Gambas3.9.1 binary and source RPMs:

1) Download http://pkgs.fedoraproject.org/cgit/rpms ... ter.tar.gz

2) create Directory structure:

Code: Select all

mkdir -p ~/rpmbuild/BUILD ~/rpmbuild/BUILDROOT ~/rpmbuild/RPMS ~/rpmbuild/SOURCES ~/rpmbuild/SPECS ~/rpmbuild/SRPMS
3) Unzip gambas3-master.tar.gz into ~/rpmbuild/SOURCES

4)

Code: Select all

cp ~/rpmbuild/SOURCES/gambas3.spec ~/rpmbuild/SPECS/.
5) Comment out the following lines at top of ~/rpmbuild/SPECS/gambas3.spec:

Code: Select all

%if 0%{?fedora} >= 18
%if 0%{?fedora} < 23
%global enablejit 1
%endif
%endif
6) Download Gambas sources from:
https://sourceforge.net/projects/gambas ... 2/download to ~/rpmbuild/SOURCES

7) unzip ~/rpmbuild/SOURCES/gambas3-3.9.1.tar.bz2 to ~/rpmbuild/BUILD


This is the first step next, we need to source the dependent RPMS, that is when it gets interesting.
Last edited by Patrician on 2016/09/24 22:17:27, edited 1 time in total.

Patrician
Posts: 10
Joined: 2016/09/08 23:06:37

Re: Gambas on CentOS 7- is it possible to make it work?

Post by Patrician » 2016/09/24 21:58:49

Installing the RPMs:

These were already installed in a new build wtih developer options selected.

Code: Select all

yum install SDL-devel                     #already installed
yum install gtk2-devel                    #already installed
yum install gtk3-devel                    #already installed
yum install curl-devel                    #already installed
yum install librsvg2-devel                #already installed
yum install bzip2-devel                   #already installed
yum install unixODBC-devel                #already installed
yum install libXtst-devel                 #already installed
yum install sqlite-devel                  #already installed
yum install libjpeg-devel                 #already installed
yum install libxslt-devel                 #already installed
yum install libICE-devel                  #already installed
yum install ncurses-devel                 #already installed
yum install libgnome-keyring-devel        #already installed
yum install gstreamer1-plugins-base-devel #already installed
yum install libffi-devel                  #already installed
The next RPMs were installed from the existing Repositories:

Code: Select all

yum install postgresql-devel             # installed
yum install poppler-devel                # installed
yum install libxml2-devel                # installed
yum install libtool-ltdl-devel           # installed
yum install qt4-devel                    # installed
yum install dbus-devel                   # installed
yum install glew-devel                   # installed
yum install gsl-devel                    # installed
yum install gstreamer-plugins-base-devel # installed
yum install libv4l-devel                 # installed
yum install gmp-devel                    # installed
The EPEL repository needs to be installed for these:

Code: Select all

yum install SDL_mixer-devel       # epel
yum install SDL2-devel            # epel
yum install SDL_image-devel       # epel
yum install SDL_ttf-devel         # epel
yum install sqlite2-devel         # epel
yum install imlib2-devel          # epel
yum install qt-webkit-devel       # epel
yum install gtkglext-devel        # epel
yum install gmime-devel           # epel
yum install qt5-qtsvg-devel       # epel
yum install qt5-qtx11extras-devel # epel
yum install qt5-qtwebkit-devel    # epel
yum install openal-soft-devel     # epel
This set of RPMs is where it gets interesting, you will have to source these yourself (if anyone know any repository that contains these RPMs, please add to this thread) :

Code: Select all

yum localinstall SDL2_ttf-2.0.12-5.fc23.x86_64.rpm
yum localinstall SDL2_ttf-devel-2.0.12-5.fc23.x86_64.rpm
yum localinstall SDL2_mixer-2.0.1-1.fc23.x86_64.rpm
yum localinstall SDL2_mixer-devel-2.0.1-1.fc23.x86_64.rpm
yum localinstall alure-1.2-8.fc22.x86_64.rpm
yum localinstall alure-devel-1.2-2.1.x86_64.rpm
yum localinstall allegro-4.4.2-14.fc24.x86_64.rpm
yum localinstall allegro-devel-4.4.2-14.fc24.x86_64.rpm
yum localinstall dumb-0.9.3-22.fc24.x86_64.rpm
yum localinstall dumb-devel-0.9.3-22.fc24.x86_64.rpm
yum localinstall SDL2_image-2.0.0-4.fc19.x86_64.rpm
yum localinstall SDL2_image-devel-2.0.0-4.fc19.x86_64.rpm
You might need to have a look at this page: https://wiki.centos.org/TipsAndTricks/M ... aOnCentOS7 for some more REPOs to install, if you want media.

Patrician
Posts: 10
Joined: 2016/09/08 23:06:37

Re: Gambas on CentOS 7- is it possible to make it work?

Post by Patrician » 2016/09/24 22:16:36

If you have got this far, well done. We are now going to build the RPMs:

1) Run the following code

Code: Select all

cd ~/rpmbuild/SPECS/
rpmbuild -ba gambas3.spec > ~/gambas3_rpmBuild.txt 2>&1
2) After what might seem a while, the command will stop. Check the file ~/gambas3_rpmBuild.txt. The last few lines should look like:

Code: Select all

+ umask 022
+ cd ~/rpmbuild/BUILD
+ cd gambas3-3.9.1
+ /usr/bin/rm -rf ~/rpmbuild/BUILDROOT/gambas3-3.9.1-1.el7.centos.x86_64
+ exit 0
2.1) If last line is not "exit 0", check the error message. The error message will most likely be a missing dependency, if it is then install it.

3) If all good then to install the binaries:

Code: Select all

cd ~/rpmbuild/RPMS/x86_64
yum install gambas3*
3.1) hopefully it completes successfully. you might see this message:
Dependency Installed:
llvm-libs.x86_64 0:3.4.2-8.el7

4) to examine sources,

Code: Select all

cd ~/rpmbuild/SRPMS

Patrician
Posts: 10
Joined: 2016/09/08 23:06:37

Re: Gambas on CentOS 7- is it possible to make it work?

Post by Patrician » 2016/09/24 22:29:21

If you have gotten this far with no issues, congratulations Gambas 3.9.1 is ready to run. Start a desktop session and you will find Gambas 3 at menu: Applications-->Programming-->Gambas3.

I installed this as root (which probably breaks loads of security) and run it with my local account, but if anyone wants to use another user to install please let me know how it goes.

So far with my testing I haven't found any bugs with the build, all the programs I have downloaded and run have worked.

I will say this, install at your own risk. It hasn't messed up the 2 installs I have built it on but I can't guarantee there aren't any bugs.

DO NOT do this install on a production system until you are happy it won't break it.

Patrician
Posts: 10
Joined: 2016/09/08 23:06:37

Re: Gambas on CentOS 7- is it possible to make it work?

Post by Patrician » 2017/04/13 00:09:51

Gambas 3.9.2 is now compiled and working, using the previous instructions.

Post Reply

Return to “CentOS 7 - Software Support”