How to: Blitzmax 1.30 (dev) on Ubuntu 8.10

Archives Forums/Linux Discussion/How to: Blitzmax 1.30 (dev) on Ubuntu 8.10

Jim Teeuwen(Posted 2008) [#1]
I'm running Ubuntu 8.10 with the standard packages.
I got the dev trunk from SVN and it appears the modules all compile just fine with gcc/g++ 4.3.2

Note: This guide is for a 32 bit system. I cannot guarantee it will work on a 64-bit system. Please refer to this thread for information regarding installation on a 64-bit system.

Here's a quick rundown of all the steps involved in getting blitz working on Ubuntu 8.10. Open up a terminal and do the following:


foo@bar:~$ sudo apt-get install subversion libstdc++5 gcc g++ libxxf86vm-dev libglu1-mesa-dev x11proto-core-dev x11proto-gl-dev x11proto-kb-dev libxxf86vm-dev libasound2-dev build-essential libidn11-dev libxft-dev



Once you got this setup, create a new directory to download blitz into.


foo@bar:~$ mkdir bmx
foo@bar:~$ cd bmx



Now for the SVN business:
replace <username> and <password> with your blitz account details.


foo@bar:~/bmx$ svn checkout "http://www.blitzbasic.com:81/svn/blitzmax/dev/main" . --username <username> --password <password>

foo@bar:~/bmx$ svn checkout "http://www.blitzbasic.com:81/svn/blitzmax/dev/linux_x86/bin" ./bin --username <username> --password <password>

foo@bar:~/bmx$ svn checkout "http://www.blitzbasic.com:81/svn/blitzmax/dev/linux_x86/lib" ./lib --username <username> --password <password>



And if you also have MaxGUI:


foo@bar:~/bmx$ svn checkout "http://www.blitzbasic.com:81/svn/maxgui/dev/maxgui.mod" ./mod/maxgui.mod --username <username> --password <password>



Once you got everything, we can start building it:


foo@bar:~/bmx$ bin/bmk makemods
foo@bar:~/bmx$ bin/bmk makemods -h
foo@bar:~/bmx$ bin/docmods
foo@bar:~/bmx$ bin/makedocs



note: 'bmk makemods -h' may cough up some errors when compiling pub.threads module. There is a fix for this here: http://www.blitzbasic.com/Community/posts.php?topic=82195


All we need now is the IDE. If you don't already have a nice IDE, you can download the Community Edition of the standard MaxIDE from here: http://sourceforge.net/project/showfiles.php?group_id=154065
Click the Download link and then click the 'maxide2-linux-fltk-2.00b4.tar.gz' link.
Go to the directory where the file has been downloaded to, right-click the file and select 'Extract Here'. It will unpack the maxIDE binary. Copy/Paste the file to the directory where you downloaded the svn files earlier (~/bmx/).

You can now run MaxIDE and start using blitz.


ragtag(Posted 2008) [#2]
Thanks for the how-to...

I had a couple of problems following it though.

libstdc++5 needs to be installed, bmk won't run without it. I have a pretty clean install of Ubuntu 8.10 and it's not included by default. This is a simple:

sudo apt-get install libstdc++5


xlibs-dev and xlibmesa-glu-dev are no longer in the repository for 8.10, so won't work with apt-get. Without them pub.mod/glew.mod won't build. The following command I found in another thread fixes that.

sudo apt-get install libglu1-mesa-dev x11proto-core-dev x11proto-gl-dev x11proto-kb-dev libxxf86vm-dev libasound2-dev build-essential libidn11-dev


That did the trick. Now I'm able to run the IDE and comiple stuff. :)

Thanks.


Jim Teeuwen(Posted 2008) [#3]
mm I had no problem getting xlibs-dev and xlibmesa-glu-dev from aptitude.
Apparently I also already installed libstdc++5 during some other installation.

Original post updated to include ragtag's suggestions.


Otus(Posted 2008) [#4]
Your maxgui URL is wrong. The correct URL is .../svn/maxgui/dev...

Otherwise worked fine on Xubuntu 8.04


Jim Teeuwen(Posted 2008) [#5]
Thanks. I don't have maxGUI myself and got that url from GFK. I fixed it in the original post.


William Drescher(Posted 2008) [#6]
I've done everything in this thread but every time I try to compile and run something, the output gives me this when I build modules:

sh: gcc-3.3: not found
Build Error: failed to compile /home/william/BlitzMax/mod/brl.mod/blitz.mod/blitz_app.c


And this when compiling programs:

sh: g++-3.3: not found
Build Error: Failed to link /home/william/program/program.debug


And g++-3.3 doesn't exist anymore according to my computer.


dawlane(Posted 2008) [#7]
You must be using BlitzMax 1.30.
But if you have installed the SVN correctly this shouldn't be a problem. Make sure that the SVN is in a separate folder and change directory to that folder then run.....

bin/bmk makemods
bin/bmk makemods -h
bin/docmods
bin/makedocs


William Drescher(Posted 2008) [#8]
Okay, I think I have found the issue, but I didn't test if it was the actual problem. The gcc package was corrupted during transfer somehow and after an hour of looking through my system I reinstalled all of the required packages, reinstalled BlitzMax through SVN and ran the commands and I have successfully compiled a program! Hurray for the Linux newbie! (I decided to try out Linux since I know so much about Windows it isn't a challenge anymore)


*(Posted 2009) [#9]
On another note sometimes you get X11 errors and you will need to install

ia32-lib-sdl
ia32-libs
lib32asound2



I think its ia32-libs that is installed this contains the required files, I had terrible trouble getting it to work and in the end just did a websearch for the files and it runs

When compiling I get the following:

Building untitled1
Compiling:untitled1.bmx
flat assembler version 1.67.28 (32768 kilobytes memory)
3 passes, 3024 bytes.
Linking:untitled1.debug
/usr/bin/ld: skipping incompatible /usr/lib/libGL.so when searching for -lGL
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../libGL.so when searching for -lGL
/usr/bin/ld: skipping incompatible /usr/lib/libGL.so when searching for -lGL
/usr/bin/ld: cannot find -lGL
collect2: ld returned 1 exit status
Build Error: Failed to link /home/edzup/Desktop/bmx/tmp/untitled1.debug
Process complete



im using the latest drivers for the ATI HD2600, I have the libGL files installed fine, anyone have any ideas.


Brucey(Posted 2009) [#10]
/usr/bin/ld: skipping incompatible ....

Isn't this because BMK is not telling the linker where to search for libGL?

See link in the first post above for details about running on 64bit :-)


*(Posted 2009) [#11]
nope that didnt fix it as the latest svn has those 'adjustments' already


*(Posted 2009) [#12]
in the end I thought sod it and install 8.10 (32bit) version so now it works :D


*(Posted 2009) [#13]
makemods fails to compile maxgui mods I dont know if its something to do with eeebuntu but I followed the instructions.


Brucey(Posted 2009) [#14]
what's the error?


*(Posted 2009) [#15]
Compiling:fl_set_fonts.cxx
In file included from /home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts.cxx:39:
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:28:25: error: X11/Xft/Xft.h: No such file or directory
In file included from /home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts.cxx:39:
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx: In static member function ‘static Fl_Font Fl::set_fonts(const char*)’:
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:212: error: ‘FcFontSet’ was not declared in this scope
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:212: error: ‘fnt_set’ was not declared in this scope
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:213: error: ‘FcPattern’ was not declared in this scope
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:213: error: ‘fnt_pattern’ was not declared in this scope
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:214: error: ‘FcObjectSet’ was not declared in this scope
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:214: error: ‘fnt_obj_set’ was not declared in this scope
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:227: error: ‘FcInit’ was not declared in this scope
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:238: error: ‘FcPatternCreate’ was not declared in this scope
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:239: error: ‘FC_FAMILY’ was not declared in this scope
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:239: error: ‘FC_STYLE’ was not declared in this scope
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:239: error: ‘FcObjectSetBuild’ was not declared in this scope
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:242: error: ‘FcFontList’ was not declared in this scope
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:245: error: ‘FcPatternDestroy’ was not declared in this scope
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:263: error: ‘FcChar8’ was not declared in this scope
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:263: error: ‘font’ was not declared in this scope
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:267: error: ‘FcNameUnparse’ was not declared in this scope
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:311: error: ‘FcFontSetDestroy’ was not declared in this scope
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx: In static member function ‘static int Fl::get_font_sizes(Fl_Font, int*&)’:
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:358: error: ‘XftFontSet’ was not declared in this scope
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:358: error: ‘fs’ was not declared in this scope
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:359: error: ‘XFT_FAMILY’ was not declared in this scope
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:359: error: ‘XftTypeString’ was not declared in this scope
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:361: error: ‘XFT_PIXEL_SIZE’ was not declared in this scope
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:362: error: ‘XftListFonts’ was not declared in this scope
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:372: error: ‘XftPatternGetDouble’ was not declared in this scope
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:372: error: ‘XftResultMatch’ was not declared in this scope
/home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_xft.cxx:377: error: ‘XftFontSetDestroy’ was not declared in this scope
Build Error: failed to compile /home/edzup/bmx/mod/maxgui.mod/fltkmaxgui.mod/src


it fails completely to do maxgui it seems, I tried to compile a minib3d program (birddemo.bmx) and that fails on the ld line as it cant find appstub or something.


Brucey(Posted 2009) [#16]
error: X11/Xft/Xft.h: No such file or directory

You are missing a package...

possibly, libxft-dev
(at least, doing a search in Synaptic package manager for Xft.h returned that package).


Brucey(Posted 2009) [#17]
Oh, and for FcFontSet and friends, you will probably need FontConfig dev package too :-)


*(Posted 2009) [#18]
thanks Brucey seems to have sorted it, wouldnt have thought about that. Just tried to follow the instructions and see what happens :)


*(Posted 2009) [#19]
Now im back to getting 'segmentation fault' when compiling BirdDemo.bmx :s

[EDIT]: when compiling most apps apart from the minib3d maxgui demo i get (in a message box)
COMMAND::/home/edzup/bmx/bin/bmk makeapp -x -r -t gui -a /home/edzup/bmx/minib3d/examples/bones.bmx^M Segmentation fault


[EDIT2]: Even dragging the app into terminal chucks segmentation fault so I cant work out where it dies :(


SLotman(Posted 2009) [#20]
I'm trying to get Blitzmax 1.32 to work on Ubunto 8.10, but I have the following problem:

root@ubuntu:/home# sudo apt-get install libstdc++5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Couldn't find package libstdc++5


I'm a complete Linux newbie, so please bear with me.
What can/should I do - besides extracting bmax to the home dir, to get it running (and able to compile modules?)

Edit: I got it to compile the modules (just forgot about libstdc++5 and downloaded the rest), but when trying to run the breakout sample, now I get another error... going to make a thread about it, so I wont hijack this topic.