BlitzMax 1.34 on Ubuntu 9.10 (Karmic Koala) 64-bit

Archives Forums/Linux Discussion/BlitzMax 1.34 on Ubuntu 9.10 (Karmic Koala) 64-bit

Otus(Posted 2009) [#1]
I'm running the latest BlitzMax+MaxGUI 1.34 on Ubuntu 9.10 Karmic Koala 64-bit release candidate. The final release will be out this week. There were some differences from 1.32 on Jaunty, so I'll document them here in case someone else needs it (and so I remember it if I reinstall). Thanks to dewlane for the Jaunty guide.

I've since used this with Blitz versions 1.34-1.38.

Install dependencies (64-bit):
sudo apt-get install ia32-libs g++-multilib libxxf86vm-dev libglu1-mesa-dev libxft-dev


Install dependencies (32-bit):
sudo apt-get install g++ libxxf86vm-dev libglu1-mesa-dev libxft-dev


For MaxGUI also install:
sudo apt-get install x11proto-xext-dev libxpm-dev


Not needed with latest MaxGUI: Due to either the version of GCC (4.4.1) or new libs, some bits about FLTK MaxGUI cause compile errors, so there were a couple of changes I had to make. Here's the diff:
diff -r fltkmaxgui.mod/FLU_src/Flu_File_Chooser.cpp fltkmaxgui.mod.original/FLU_src/Flu_File_Chooser.cpp
2722c2722
<     ext = strrchr( (char*)filename, '.' );

---
>     ext = strrchr( filename, '.' );

3135c3135
< 	      char *lastSlash = strrchr( (char*)newS.c_str(), '/' );

---
> 	      char *lastSlash = strrchr( newS.c_str(), '/' );

3750c3750
<       char *lastSlash = strrchr( (char*)currentDir.c_str(), '/' );

---
>       char *lastSlash = strrchr( currentDir.c_str(), '/' );

4184c4184
< 	      char *p = strrchr( (char*)retname.c_str(), '/' );

---
> 	      char *p = strrchr( retname.c_str(), '/' );

diff -r fltkmaxgui.mod/src/filename_list.cxx fltkmaxgui.mod.original/src/filename_list.cxx
93c93
<   int n = scandir(d, list, 0, (int(*)(const dirent**,const dirent**))sort);

---
>   int n = scandir(d, list, 0, (int(*)(const void*,const void*))sort);


Just replace the numbered lines and everything should build fine. I did a Rebuild Modules and everything built fine. Also Digesteroids and the MaxGUI samples built and ran fine, as did Brucey's libxml. Haven't tried anything else yet, but looking good so far.


dawlane(Posted 2009) [#2]
Has ia32-apt-get been fixed at all in Karmic? As I'm waiting for the final release and the parts for the new Intel i7 Extreme computer I'm building so Windows 7 and Ubuntu 9.10 can dual boot on it.

Due to either the version of GCC (4.4.1) or new libs

My moneys on gcc 4.4.1.


Jim Teeuwen(Posted 2009) [#3]
Has ia32-apt-get been fixed at all in Karmic?


I do hope it is fixed. It's been giving me all manner of problems on 9.04.
To the point of completely breaking aptitude and I decided to just toss the 32 bit compatibility out altogether. Odly, bmax still worked fine after I did.

I suspect it's not even needed in the first place though. A while ago I did a full system reinstall. Installed blitz using the install.sh script in this forum. it has the ia32 bit commented out because of the aptitude problems it causes. Blitz still worked fine without it. I'm not sure why though. I suspect some other program I installed prior to that already took care of some dependency. I havn't been able to figure out what exactly that was.


dawlane(Posted 2009) [#4]
I suspect it's not even needed in the first place though.

The idea behind ia32-apt-get package is so you can install and update 32bit libraries along with there 64bit counterparts by just using the normal apt-get command. You will still need to install the ia32-libs package to run Blitzmax and any program that you write with it, so it's always a good idea when deploying your software to state that ia32-libs (or other distros version of these libs) is needed to run on a 64bit linux environment.


Otus(Posted 2009) [#5]
ia32-apt-get no longer exists in Karmic. I have never used it on Jaunty, so I have no idea if there's something else to do the same as it did.


Jim Teeuwen(Posted 2009) [#6]
The idea behind ia32-apt-get package is so you can install and update 32bit libraries along with there 64bit counterparts by just using the normal apt-get command. You will still need to install the ia32-libs package to run Blitzmax and any program that you write with it, so it's always a good idea when deploying your software to state that ia32-libs (or other distros version of these libs) is needed to run on a 64bit linux environment.


I know what it's for, but stating that it's a good idea to install it is a bit far fetched tbh. As stated, it causes a lot of problems with the regular aptitude. Specifically when performing a system update it tends to segfault because of some bug in the ia32-apt-get. (There's a few bug reports floating around on the web about this). As I said, I got blitz to work just fine without actually installing the ia32-apt-get package. I'm just not quite sure how I did it (yet).


dawlane(Posted 2009) [#7]
@Jim T
Sorry if my post sounded like an attack, but I didn't state that it's a good idea to install ia32-apt-get, only the ia32-libs package as Blitzmax applications will need these as well as Blitzmax its self. This I know this by using a clean install with nothing more that the default setup with updates and BlitzMax.

It would have been a good idea if ia32-apt-get had worked as I have only seen sporadic updates to the ia32-libs package. Canonical doesn't support the ia32-libs package (and many of the ia32 prefix packages) and this could be a security risk.
The only other method for getting Blitzmax (or any 32bit application) to work in a 64bit environment while solving the update problem is to chroot the system with the 32bit equivalents. But then you have to run two updates one for the 64bit and one for 32bit.

So to summarize, the ia32-apt-get package isn't need for blitzmax to work but you do need the the ia32-libs package that would be automatically added to the dependency list if you had installed the ia32-apt-get package (ia32-apt-get depends on ia32-libs). As to how you got it to work... well it looks like something that was installed needed ia32-libs package as a dependency.

@Otus
Any idea if getlibs will still work? I haven't used this for a long time.
http://ubuntuforums.org/showthread.php?t=474790


Angus(Posted 2009) [#8]
Thanks for the info OTUS.

I've been playing with ubuntu on my eeepc901, and it wasn't really up for running BMax. I think the graphics drivers were a bit knackered.

Now it runs fine! Not blisteringly fast, but good enough for most development, I'm really chuffed.

Strangely running BMax executables without the IDE running is a lot faster than compiling from the Editor. Anyhoo...

I need to successfully rebuild Box2D though, which is generating an error now...


xlsior(Posted 2009) [#9]
FYI, for those interested: The final release of Ubuntu 9.10 is available for download now.

US mirror appears horrible slow, but the torrent is blazing fast.
("9 days" vs. "32 minutes" for me)


Nigel Brown(Posted 2009) [#10]
Great, fully installed 9.10, but Blitz MAX 1.34 returns a compile error "sh: g++: not found" when trying to build the breakout sample?

Does anyone have a complete BLitz MAX installation instructions for this?


Brucey(Posted 2009) [#11]
Nigel, the command-lines mentioned in the first post (above) should help ?


Nigel Brown(Posted 2009) [#12]
Brucy, thanks. Have tried 'sudo apt-get install g++' etc... and even that gives an error 'could not find package g' ? I think I need an idiots guide.

Would love to give up at this point, very short attention span. However I really need this to work as I am trying to compare the new intel graphics drivers that come with 9.10


dawlane(Posted 2009) [#13]
Nigel try and use synaptic to install the above packages.


Nigel Brown(Posted 2009) [#14]
thanks all, no luck here at all. A little disappointed there are no step by step guides. If I ever get it going I will write one.


markcw(Posted 2009) [#15]
Nigel, do you have the 64bit or 32bit version? You may have copied the wrong line to Terminal.


Nigel Brown(Posted 2009) [#16]
@markcw, Ubuntu Desktop 32 Bit version, have set the proxy settings under system->settings... I have a feeling that it is not finding things, I have minimal experience of Linux so this is a little stressful.


Otus(Posted 2009) [#17]
@markcw, Ubuntu Desktop 32 Bit version, have set the proxy settings under system->settings... I have a feeling that it is not finding things, I have minimal experience of Linux so this is a little stressful.


Maybe something wrong with the proxy in that case... Can you install any of the other packages? Or any other packages/programs at all through either Synaptic or the App Center?


markcw(Posted 2009) [#18]
Nigel, in the 'Network Proxy Preferences' dialog I'm using 'Direct Internet Connection'. Did you have to use the manual proxys to get online?


Nigel Brown(Posted 2009) [#19]
markcw, yes I have asked that I am given a connection without proxy but will have to wait for that :-(


Otus(Posted 2009) [#20]
I verified the 32-bit dependencies above on a clean install.

Angus:
Strangely running BMax executables without the IDE running is a lot faster than compiling from the Editor. Anyhoo...


I'm seeing ~30% CPU for Xorg while MaxIDE is open... Same there?


Angus(Posted 2009) [#21]
Pardon my ignorance, but I'm not sure what Xorg is.

I couldn't see it as a process in the system monitor.

However! It's worth pointing out that I've greatly reduced the problem by lowering the "Visual Effects" on the desktop to "None".

When I was first playing with Ubuntu, I didn't think I could notice any speed difference between the two lowest settings, so I went with the Medium one.

The eeepc901 is much happier without the graphical snazzies, I now see.

The programs run almost as fast with the IDE running as not now.


dawlane(Posted 2009) [#22]
Pardon my ignorance, but I'm not sure what Xorg is.

This should explain what xorg or to be more precise x-server.
http://en.wikipedia.org/wiki/X_Window_System


Brucey(Posted 2009) [#23]
I'm seeing ~30% CPU for Xorg while MaxIDE is open... Same there?

I'm guessing this is caused by the "newish" internal clock in BlitzMax for Linux.

Previously it used to run a 1 millisec timer on SIGALRM, which was fine for general use but would devastate anything running on a VM.
The recent change now runs off events generated by the sytem, where FLTK is plugged into that via a callback. I imagine it is this which is showing high CPU.

... or something like that :-p


Angus(Posted 2009) [#24]
When I view all processes I see Xorg. It peaks at around 22 with the maxIDE open, but most of the time is still pretty low.

Like I say, though, the problem has all but gone since I switched to the most simple display.

Using "Normal" visual effects, and Xorg has higher peaks (36 or so) and higher when stable, around 16-20.


Angus(Posted 2009) [#25]
Actually, looking again, I dont know if the effects settings are making any difference to the Xorg CPU value, but it definitely makes the programs run more slowly.


Jim Teeuwen(Posted 2009) [#26]
The fancy desktop effects are done by a program called "compiz fusion". it uses OpenGL and hardware accelleration to do it all.

So enabling it and running a bmax app along side it, basically makes you run 2 apps which both need access to your graphics card and the opengl api. This is probably why your bmax apps slow down when the desktop effects are active.

This goes for other apps besides bmax as well. At least those that require graphics support from your GPU.


Angus(Posted 2009) [#27]
This is good to know.

Does this mean that I can safely take compiz fusion off the system? There's not much space in my eeepc.


Otus(Posted 2009) [#28]
I'm guessing this is caused by the "newish" internal clock in BlitzMax for Linux.

Previously it used to run a 1 millisec timer on SIGALRM, which was fine for general use but would devastate anything running on a VM.
The recent change now runs off events generated by the sytem, where FLTK is plugged into that via a callback. I imagine it is this which is showing high CPU.

... or something like that :-p


So this is a change in BlitzMax proper? Or (FLTK) MaxGUI? Either way the problem will probably also be visible with Blitz-made apps... Any idea when this change was made so I can run some tests?


Jim Teeuwen(Posted 2009) [#29]
Does this mean that I can safely take compiz fusion off the system? There's not much space in my eeepc.


Yes. I have it removed from my eeepc install as well. I use eeebuntu on my eeepc. They supply a minimalistic version that has all this extra bloat trimmed out. Including compiz.


Angus(Posted 2009) [#30]
I tried eeebuntu, and a couple of other eee-specific distros. Then I read about one that configured a standard ubuntu release to be eee-pc friendly.

I installed ubuntu in prep for configuration and realised that ubuntu itself seemed to be fine on the eeepc. In fact I'm sure that the basic ubuntu install took up less space than when I tried eeebuntu.

I've taken compiz off anyway, and the machine seems to be doing fine.

I'm keen to stick with ubuntu 9.10 now that I've got it, any tips about other packages that will be surplus to my requirements?


Otus(Posted 2009) [#31]
I'm keen to stick with ubuntu 9.10 now that I've got it, any tips about other packages that will be surplus to my requirements?


Although this is a bit off topic, it depends on your needs.

The most bloated thing on default Ubuntu is definitely OpenOffice. AbiWord - or better yet Google Docs - is enough for basic usage and frees some 200-300MB of disk space in comparison. Ubuntu includes Mono for just F-Spot and Tomboy; if you can find alternatives for (or don't need) those you can throw away the whole runtime (all the libmono* packages). For me GIMP is a must, but it's also a rather large package.

Most of the rest of the system is actually very small, but you could probably free some more space (tens of MB tops by my guess) removing all the smaller unnecessary things like Brasero (no CD drive on Eee).


Angus(Posted 2009) [#32]
Thanks Otus.

I'll just rid myself of those things, apart from openOffice. It may be big, but I quite like it.


Nigel Brown(Posted 2009) [#33]
Hi, I persisted and managed to install the necessary, thanks to all.

I am running blitz on an Intel Atom, 1.60 GHz, 500Mb RAM and Intel 945 Graphics.

The problem I am seeing now is a test program built and run under Windows gives 350 FPS, and the same program built and run under UBUNTU 9.10 only gives me 110FPS?

I had read that Intel graphics drivers had been sorted out under 9.10 but my tests don't agree.


Brucey(Posted 2009) [#34]
Remember to also take into account the different kernel architecture, and the different low-level "clock/tick" implementation on the Linux end of BlitzMax.

It might be a driver thing, but there are always other possibilities too.


Nigel Brown(Posted 2009) [#35]
Brucey, the low level stuff you mention could be a contributor, I would have no idea how to overcome things like this.
The test goes through a sequence that takes a lot longer to complete on Linux. Should I persist or just throw in the towel?


SebHoll(Posted 2009) [#36]
Thanks Otus!

(Internal note: FLTKMaxGUI GCC 4.4.1 tweaks committed as rev. 348.)


D4NM4N(Posted 2009) [#37]
i installed 9.10 the other day but bmax still seems to require so.5 (not in syn) of g++ why is that because my other dev stuff (mono/c++/irrlicht) which require it still seem to run no problem despite the upgrade from 5 to 6.


Artemis(Posted 2009) [#38]
Hi guys,

when trying this (64bit Karmic, BlitzMax 1.35) it works but gives me errors when trying to compile something without specifying a framework. All the errors concern the pub.glew package:

Do I need additional libraries (other than the ones mentioned)? What is pub.glew for? Maybe I can just remove it…




markcw(Posted 2009) [#39]
Looks like your missing a package, Artemis. Also, you can use [ codebox ] [ /codebox ] for large blocks of text/code.

Try running this script. Note that script files need executable permissions to work.
http://www.blitzbasic.com/Community/posts.php?topic=84073#997352


Artemis(Posted 2009) [#40]
I thought so too but sadly your script does not fix that either.

(btw: I used codebox-Codes but the Code seemed to be too long for it, so i shortened it…)


markcw(Posted 2009) [#41]
Ok, check to see if you have libglew-dev if not look for libglew1.5-dev


markcw(Posted 2009) [#42]
Oh interesting, this may be a 1.35 issue. Try reverting to 1.34 instead.
http://www.blitzbasic.com/Community/posts.php?topic=87972


Brucey(Posted 2009) [#43]
if not look for libglew1.5-dev

Wouldn't that be an issue with this? : __GLEW_VERSION_2_1


markcw(Posted 2009) [#44]
I don't know, I was just checking if he had it but now I see libglew-dev is a virtual package so it's the same thing as libglew1.5-dev, see here.
http://packages.ubuntu.com/karmic/libglew-dev

It's not a missing package issue anyway since the same error happens on Mac.

Edit: btw I don't have libglew1.5-dev installed here.


Artemis(Posted 2009) [#45]
Hey, I just rebuild the pub.glew module and now everything works fine. What a shame I didn't get this idea a day earlier ;-|.


SebHoll(Posted 2009) [#46]
Hey Guys,

Just to let people know that I have uploaded a new build of MaxGUI v1.34 for Linux users (available from the 'Product Updates') page, which has the GCC fixes Otus gives in his top post, pre-applied. I.e. if you download the latest MaxGUI tarball, you will not need to apply the tweaks above.


Jim Teeuwen(Posted 2010) [#47]
I installed Karmic a few days ago (64 bit). I used my install script to get all of blitz's dependencies, This did /not/ include the ia32-libs and compatibility stuff. It works fine without all that. I can build/run bmax apps as well as all the modules without any problems.

The packages being installed for the 64 bit OS are: gcc-multilib g++-multilib libxxf86vm-dev libglu1-mesa-dev x11proto-core-dev x11proto-gl-dev x11proto-kb-dev libasound2-dev libidn11-dev libxft-dev x11proto-xext-dev libxpm-dev

For those who are curious, the script is in it's own thread now: http://www.blitzbasic.com/Community/posts.php?topic=88613


Otus(Posted 2010) [#48]
I installed Karmic a few days ago (64 bit). I used my install script to get all of blitz's dependencies, This did /not/ include the ia32-libs and compatibility stuff. It works fine without all that. I can build/run bmax apps as well as all the modules without any problems.

I tried removing ia32-libs, but Blitz stopped working. Maybe you had it installed already due to Flash Player depending on it?

(Also, your line has some things I haven't needed, but I suppose they may be needed on other versions of Ubuntu/Debian.)


Otus(Posted 2010) [#49]
I just tried this on Lucid (10.04) beta (64-bit) and the same apt-get lines work fine.