GLBasic forum

Main forum => FAQ => Topic started by: MrTAToad on 2008-Oct-31

Title: Getting a Linux GLBasic program up and running
Post by: MrTAToad on 2008-Oct-31
There have been a few requests for information on what to do to get a Linux program up and running on, well, Linux.  Hence the reason for this post.

To start with

Compile your GLBasic program for Linux, and make sure it is available for running or copying elsewhere.

In Linux

After that, you need to boot up Linux, and get it running.  If you find that double-clicking on the program opens a dialog window asking for a program to run the application, this means that the file isn't being treated as an executable.  To do so, right-click over the correct .linux file, and left-click on Properties.  Go into the Permissions tab and select Permissions.

Make sure Owners, Group and Other are set to Read And Write Access, and more importantly, make sure the 'Is Executable' button is active.

Okay that, and try again.

But It Still Doesn't Work

Then it would appear that the packages needed by the program aren't installed.  The Linux GLBasic executable needs the following (or equivalent) installed in order to run - and are usually done via a Packet Manager.

You need to install the following :


And that should get everything up and running.

Terminal based installation would be something like :

Code: (glbasic) [Select]
sudo apt-get install libsdl-mixer1.2-dev libstdc++5
If you can't find SDL_Mixer in the Package Manager list, you'll need to install it from the SDL website (http://www.libsdl.org (http://www.libsdl.org)) and http://www.libsdl.org/projects/SDL_mixer/ (http://www.libsdl.org/projects/SDL_mixer/)

Update :

It appears that since version 6.197, extra libraries are needed.  Thanks to Gregory in sorting this out.  These files cant seem to be installed using the normal packaging system, and thus need to be installed slightly differently :


I had found that running a GLBasic linux executable in Ubuntu 8.04 (with VMWare) had running problems.  These all seem to have gone in 8.10 (just wish it would shut down properly :) ).  Speed is pretty good (at least on my iMac), although of course, not as fast as a proper installation.

I have found that mouse wheels in a VM environment aren't detected.

It is always best to get the computers graphics drivers installed of course, for optimum speed.

You'll have no problem running in Ubuntu, Kubuntu or Xubuntu.  Other distros should be fine too.
Title: Re: Getting a Linux GLBasic program up and running
Post by: Moru on 2008-Oct-31
Great tutorial! Just what I wished I had earlier :-)
Title: Re: Getting a Linux GLBasic program up and running
Post by: MrTAToad on 2008-Nov-01
Glad you like it!

I have found that, with the exception of the Ubuntu family, GLBasic programs wont run under VMWare - it says a GL context couldn't be created.

Hopefully they would on a proper machine.
Title: Re: Getting a Linux GLBasic program up and running
Post by: Moru on 2008-Nov-01
Ah thanks, I was about to post that. I also have troubles with Mandriva latest version but Ubuntu works fine.

Quote
Init GFX
Set Vidmode
INIT: Unable to create 24 BPP -> trying 16.
Couldn't set GL mode: Couldn't find matching GLX visual
Segmentation fault
Title: Re: Getting a Linux GLBasic program up and running
Post by: MrTAToad on 2008-Nov-01
Its an odd problem - as you can probably can guess, it can't create a 24-bit X window (nor probably a 16 bit one).  I get this problem on CentOS 5 and Mandriva, but no real idea why - Ubuntu uses a 32bpp screen, and according to glxinfo, 32-bit modes are available for the other systems as well.

glxgears works fine, by the way!
Title: Re: Getting a Linux GLBasic program up and running
Post by: Wild_Duck on 2008-Dec-21
As of update  6 GLBasic no longer runs on Linux (Ubuntu 8.10) Running from the Bash tells you that the import_dll MFC80.DLL, MSVCR80.dll, MSVCP80.dll are missing which are needed by the EditorE.exe. :'(
Title: Re: Getting a Linux GLBasic program up and running
Post by: MrTAToad on 2008-Dec-21
Really !?  Better test it out!

Programs run fine here.

I do notice that I always get "bad shoebox header: /home/nicholas/Desktop/Spots/Spots.linux []".  Is this because I'm not using Shoebox ?

If your talking about the Editor within WINE - then I have never got it running.
Title: Re: Getting a Linux GLBasic program up and running
Post by: Kitty Hello on 2008-Dec-22
aw, bad. The editor should run on WINE.
Title: Re: Getting a Linux GLBasic program up and running
Post by: MrTAToad on 2008-Dec-22
'Tis true - needs a whole lot of MFC80 DLL's...
Title: Re: Getting a Linux GLBasic program up and running
Post by: Moru on 2008-Dec-22
Editor is running under Wine for me (Xubuntu 8.10 in VirtualBox)
I had to change the font to get the text in the debug-window readable since it was too small but I get no errors. Installation took for ever though :-)

Also, there are no squares on the end of the lines when you do a find in files search.
Title: Re: Getting a Linux GLBasic program up and running
Post by: Kitty Hello on 2008-Dec-23
got it running on Ubuntu in VirtualPC, too.. Very strange.
Title: Re: Getting a Linux GLBasic program up and running
Post by: MrTAToad on 2008-Dec-23
I get :

fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.VC80.CRT"
err:module:import_dll Library MFC80.DLL (which is needed by L"C:\\Program Files\\GLBasic\\EditorE.exe") not found
err:module:import_dll Library MSVCR80.dll (which is needed by L"C:\\Program Files\\GLBasic\\EditorE.exe") not found
err:module:import_dll Library MSVCP80.dll (which is needed by L"C:\\Program Files\\GLBasic\\EditorE.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"C:\\Program Files\\GLBasic\\EditorE.exe" failed, status c0000135g

The odd thing is the last 2 DLL's aren't present on my XP or Vista machines...
Title: Re: Getting a Linux GLBasic program up and running
Post by: Kitty Hello on 2008-Dec-23
I think I set WINE to emulate Win98, not 2k. Maybe ...
Title: Re: Getting a Linux GLBasic program up and running
Post by: MrTAToad on 2008-Dec-23
I'll try that although I think the problem is due to the fact that my version of WINE on Ubuntu is later than 1.0.1 - VMWare's Ubuntu is 1.0.1 (and GLBasic works fine), whilst my proper Linux installation as a Wine version of 1.10

Time to remove things from the repositry, uninstall and re-install :)

Anyway, got it working again.  Aside from uninstalling WINE and reverting back to the original version (obviously its not compatible with the later ones, which isn't terribly surprising as Ubuntu dont offer it as standard), I had to delete the hidden .wine folder

And all is fine now.

The text in the debug area is almost impossible to read unfortunately though - obviously its using a font that isn't currently present.
Title: Re: Getting a Linux GLBasic program up and running
Post by: Kitty Hello on 2008-Dec-24
Oh, please tell the WINE team about that.
Title: Re: Getting a Linux GLBasic program up and running
Post by: MrTAToad on 2008-Dec-24
I've let them know...
Title: Re: Getting a Linux GLBasic program up and running
Post by: Wild_Duck on 2008-Dec-25
I`ve installed wine 1.1.10 and it now works ok except for the minute font in the results window.
Thanks for your help and A Merry Christmas to you
Title: Re: Getting a Linux GLBasic program up and running
Post by: Wild_Duck on 2008-Dec-25
After compiling one of my own projects the font in the results window return to a readable size. =D
Title: Re: Getting a Linux GLBasic program up and running
Post by: Moru on 2008-Dec-25
If you change font in the options of GLBasic, then close GLBasic and open it again, the debug window will work fine again.
Title: Re: Getting a Linux GLBasic program up and running
Post by: Kitty Hello on 2011-Sep-20
Next update will bring this:
Code: (glbasic) [Select]
user@Ubuntu-VirtualBox:/mnt/tauschxl$ ldd _support.linux
linux-gate.so.1 =>  (0x002a0000)
libGL.so.1 => /usr/lib/mesa/libGL.so.1 (0x0083b000)
libSDL_mixer-1.2.so.0 => /usr/lib/libSDL_mixer-1.2.so.0 (0x001c3000)
libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0x00eca000)
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0x00b75000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0x00342000)
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0x00763000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0x0016d000)
libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0x00955000)
libXext.so.6 => /usr/lib/i386-linux-gnu/libXext.so.6 (0x00539000)
libXdamage.so.1 => /usr/lib/i386-linux-gnu/libXdamage.so.1 (0x00110000)
libXfixes.so.3 => /usr/lib/i386-linux-gnu/libXfixes.so.3 (0x00f8b000)
libXxf86vm.so.1 => /usr/lib/i386-linux-gnu/libXxf86vm.so.1 (0x00d63000)
libdrm.so.2 => /lib/i386-linux-gnu/libdrm.so.2 (0x00114000)
libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0x00548000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0x0011e000)
/lib/ld-linux.so.2 (0x00324000)
libmikmod.so.2 => /usr/lib/libmikmod.so.2 (0x0021b000)
libvorbisfile.so.3 => /usr/lib/libvorbisfile.so.3 (0x008fd000)
libsmpeg-0.4.so.0 => /usr/lib/libsmpeg-0.4.so.0 (0x002a1000)
libpulse-simple.so.0 => /usr/lib/libpulse-simple.so.0 (0x00d3e000)
libpulse.so.0 => /usr/lib/libpulse.so.0 (0x004a3000)
libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0x008cd000)
librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0x0013a000)
libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0x0019b000)
libogg.so.0 => /usr/lib/libogg.so.0 (0x00b0a000)
libpulsecommon-0.9.22.so => /usr/lib/libpulsecommon-0.9.22.so (0x004e4000)
libX11-xcb.so.1 => /usr/lib/i386-linux-gnu/libX11-xcb.so.1 (0x00abe000)
libICE.so.6 => /usr/lib/i386-linux-gnu/libICE.so.6 (0x00143000)
libSM.so.6 => /usr/lib/i386-linux-gnu/libSM.so.6 (0x0015b000)
libXtst.so.6 => /usr/lib/libXtst.so.6 (0x0090d000)
libxcb-atom.so.1 => /usr/lib/libxcb-atom.so.1 (0x00cb4000)
libdbus-1.so.3 => /lib/i386-linux-gnu/libdbus-1.so.3 (0x00633000)
libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0x00163000)
libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0x00d2f000)
libwrap.so.0 => /lib/libwrap.so.0 (0x00186000)
libsndfile.so.1 => /usr/lib/libsndfile.so.1 (0x00670000)
libuuid.so.1 => /lib/i386-linux-gnu/libuuid.so.1 (0x00e92000)
libnsl.so.1 => /lib/i386-linux-gnu/libnsl.so.1 (0x00267000)
libFLAC.so.8 => /usr/lib/libFLAC.so.8 (0x006d7000)
libvorbisenc.so.2 => /usr/lib/libvorbisenc.so.2 (0x00f91000)
user@Ubuntu-VirtualBox:/mnt/tauschxl$

Notice the non-dependency of libstdc++.so.5 now. Wo-hoo.

Title: Re: Getting a Linux GLBasic program up and running
Post by: MrTAToad on 2011-Sep-20
Shouldn't be too bad really - looks like a more moderned STDC++ library is used too, which is good :)
Title: Re: Getting a Linux GLBasic program up and running
Post by: Kitty Hello on 2011-Sep-20
I used a flag to ignore unresolved symbols and dropped the SDL_mixer lib dependencies. That way the program binds to the libs I specified but not the libs depending on these libs on link stage, but only at run time. very clever idea.
Title: Re: Getting a Linux GLBasic program up and running
Post by: MrTAToad on 2011-Sep-20
Hopefully it'll be more stable on x64 machines now too...
Title: Re: Getting a Linux GLBasic program up and running
Post by: Kitty Hello on 2011-Sep-23
OK, the current update (the setup with Caanoo support) has this fixed now. I hope the dependencies are "just" SDL_mixer on most systems now. A shame that ubuntu does not ship this on default.
Title: Re: Getting a Linux GLBasic program up and running
Post by: Hemlos on 2014-Aug-16
Old thread, same subject. Long Live Linux.
I am using GLBasic on Linux Mint 17( :good:), Native OS, Multiboot Windows 7.
Using WINE To run GLBasic IDE, the binaries.app.exe i compile all seem to crash after a few minutes.
These binaries i compile are .exe that run in WINE/XP.
And the IDE wont compile multiplatform, win32 only.

Using Windows 7 OS, im trying to use GLBasic IDE to compile .linux programs using multiplatform, with linux in the program options.
When running one of these files, you need to set permissions and execute from terminal.
However, there is no luck here getting it to run, as there seems to be a problem with SDL errors, and OpenGL errors.

I compiled an .exe using windows 7, and it runs in linux using WINE/XP.
So far this method is working ok, for a 2d(havent tried 3d)OpenGL binary.app.exe compiled in windows.
Also, it doesnt seem to stop rendering after a few minutes of being minimized in linux (unlike windows, i made a bug report. about it (http://www.glbasic.com/forum/index.php?topic=9963.0))

@Gernot: And that leaves me with a question, which Linux Dist did you base the multiplatform linux distribution output.linux on? Ubuntu doesnt have everything, does fedora, or SUSE, or some other distribution?

Title: Re: Getting a Linux GLBasic program up and running
Post by: mentalthink on 2014-Aug-17
Perhaps we can make runs GLBasic under Linux like in windows, I think the only we need it's now what uses GLBasic in windows ?¿ I refer to someFramekor or some V++Redistributable... Wine tricks permet install some of this packages... also, if Wine can done perhaps CodeWeaver can be the solution, it's WINE but more advanced...

Really I try both, but bad using I don't understand too much how make bottles and this things, and another thing perhaps don't works fine in all future versions or in different distros of Linux.

I give a idea for make a Ide for Linux, really I don't know if this it's a huge work then excuseme, but the guys of AGK the Ide are using it's CodeBlocks(in Window)  and the get money for the compiler, I think use CodeBlocks in Linux works perfectly and modify for use GLbasic?¿, I think eclipse can do this too, have a version for any one wants makes a own IDE, perhaps don't it's necessary have all the platforms at one time, progressive adding platforms to the Ide, while in the forum can do Betatesting and leave it OK, and finally have the IDE for Win and Linux and anyone select the better choice for him.

Title: Re: Getting a Linux GLBasic program up and running
Post by: kanonet on 2014-Aug-18
Yeah newer GLBasic releases seems to be bugged on Linux, see my post here: www.glbasic.com/forum/index.php?topic=6497.msg87169#msg87169
Title: Re: Getting a Linux GLBasic program up and running
Post by: Parv on 2019-Jun-06
OK, the current update (the setup with Caanoo support) has this fixed now. I hope the dependencies are "just" SDL_mixer on most systems now. A shame that ubuntu does not ship this on default.

I got my app running on MX-Linux 18.3 32 BIT, Great  :)

I have a phone with Ubuntu Touch OTA-9 (UBports), (the app did not run on this, of course it's an arm7).

Will there be a build for this environment?

The SDK available for Ubuntu Touch, since the linux build is on 8086 hardware and 32Bit, I think it would be possible to do the build on arm7 with the SDK from UBports

https://ubports.com/ (https://ubports.com/)

Thanks,
Parv