How-To: Ubuntu/Kubuntu 5.04

Archives Forums/Linux Discussion/How-To: Ubuntu/Kubuntu 5.04

Craig Watson(Posted 2005) [#1]
I've recently installed a bog standard Ubuntu 5.04/Hoary Hedgehog and got BlitzMax running. This How-To should work for Kubuntu equally well, as it's the same base as Ubuntu.

First step obviously is to install Ubuntu or Kubuntu. Once you're in the desktop, go to System->Administration->Synaptic Package Manager or under Kubuntu, System->Administration->Package Manager (Kynaptic).

Enter your user password you set up in the installation.

Click on the Mark All Upgrades and select either Smart Upgrade or Default Upgrade. Click Apply to start downloading the upgrades. This should ensure you have the latest releases.

Download BlitzMax 1.09 and the 1.10 update. Extract 1.09 to somewhere in your home folder, and then Extract 1.10 over the top of it.

To get BlitzMax to compile and run you'll need the following packages:

gcc
g++
xlibs-dev
xlibmesa-gl-dev
xlibmesa-glu-dev
libxxf86vm-dev

You can locate them through Synaptic or the more experienced among you can "sudo apt-get install" them. There will be several other packages installed with these as dependencies. This is good.

Once these packages are installed you can run BlitzMax and Build Modules/Rebuild All Modules. They should all build perfectly. You will be able to compile and run the demos, albeit slowly. To run things at real speeds, you'll need to download proper graphics drivers. Fortunately you can easily download these again through Synaptic/Kynaptic, or apt-get.

For NVidia users:

nvidia-glx
nvidia-glx-dev
nvidia-settings (optional)

For ATI users:

xorg-driver-fglrx
xorg-driver-fglrx-dev
fglrx-control (optional)

If you're an NVidia user, you'll also need to open a terminal after the packages have installed, and type the following:

sudo nvidia-glx-config enable

From here you should be able restart from KDE or Gnome, and once the system reloads, the new drivers will be running, and OpenGL will be accelerated.

(For the lazy amongst you, log out, hit ctrl-alt-backspace, and the X-Server will reload with the new drivers without you needing to reboot.)

Someone running Kubuntu could you please confirm the specifics for finding Kynaptic, etc.


WendellM(Posted 2005) [#2]
Thanks, Craig; I look forward to trying those out with a fresh install - they're slightly different from the sets that I tried earlier. Right now, though, the cable modem is out due to Hurricane Katrina and I'm on dial-up, so it'll probably be a day or two before I can.


Filax(Posted 2005) [#3]
Many thanks craig


JazzieB(Posted 2005) [#4]
This is all very good, but it's a shame I can't get a single copy of Ubuntu to install on my machine. The ISO's give me CRC errors (even when burnt at 1x!), so I had the CD's sent me and they fail when they have to start loading the relevant components. I really want to try Ubuntu as well, as I've heard it's quite easy to get my ATI card to work in 3D compared to other distros. I'm now in the position where I either give up or decide which distro to try (and fail on me) next :(


Craig Watson(Posted 2005) [#5]
You can check here. Some links there don't seem to work yet, but you don't have to rely on CDs to get the thing installed at least. Some of those links seem to be for Warty, but you should be able to substitute Hoary instead, or apt-get dist-upgrade once Warty is installed to get Hoary.

I also did have some trouble getting Ubuntu to install on one of my PCs - it had a LiteOn CD-R drive that seemed to passionately hate all the discs I put in there. The solution was to switch out the drive for another for the install. After install everything seemed to work fine on the drive.


Kev(Posted 2005) [#6]
linux noob question.

anyone know how to install the above packages with out net access under Ubuntu? my modem's not supported in Ubuntu :( the package manager wont let me when ive downloaded them under windows.

any help, i love the look and feel of Ubuntu, compared to other distro's.

kev


Craig Watson(Posted 2005) [#7]
You could try the DVD version if you can get it from somewhere. AFAIK it has all of the available Ubuntu packages on it.

Otherwise you can add a local disk repository from your Windows drive. You'll need more packages than listed above, as they actually come with several dependencies. I copied them all down somewhere if you want it.


computercoder(Posted 2005) [#8]
That prolly wouldn't be a bad thing to post Craig. Could help someone figure out what to look for anyway...


Craig Watson(Posted 2005) [#9]
gcc
   gcc-3.3
g++
   g++-3.3
   libstdc++5-3.3-dev
xlibs-dev
   libice-dev
   libsm-dev
   libx11-dev
   libxau-dev
   libxext-dev
   libxi-dev
   libxkbfile-dev
   libxmu-dev
   libxmuu-dev
   libxp-dev
   libxpm-dev
   libxrandr-dev
   libxrender-dev
   libxt-dev
   libxtrap-dev
   libxtst-dev
   libxv-dev
   pm-dev
   render-dev
   x-dev
   xlibs-static-dev
   zliblg-dev
xlibmesa-gl-dev
xlibmesa-glu-dev
libxxf86vm-dev

Many of the ones that come with xlibs-dev are not required, however I suggested xlibs-dev because it includes several of the packages you do require in just one selection. The other reason of course is that this guide should still work after new versions of GCC and X become standard. You'll most likely need at least xlibs-static-dev and libx11-dev. You may also need x-dev and libxext-dev.


WendellM(Posted 2005) [#10]
Following your instructions has Ubuntu running BlitzMax the best that it has so far, Craig - thanks! It still doesn't have hardware acceleration on my ATI Radeon 9600 Pro. Digesteroids (which I've been using as a test in various Linux installs) runs better with these video drivers: the explosion when the ship is destroyed is still much jerkier than in Windows with acceleration, but is smoother than previous Linux attempts. It also lacks sound, though Ubuntu itself has it.

BlitzMax gives me 'Xlib: extension "XFree86-DRI" missing on display ":0.0".' in the console (glxinfo confirms this and also has "direct rendering: No." Synaptic doesn't include "XFree86-DRI." One thing that I read somewhere in my previous questing for hardware accel is that "ATI" and "Radeon" might be considered two different things, where "ATI" = ancient ATI cards while "Radeon" = 8500-ish and later.

Any ideas? This is where I've run into trouble before, installing a driver from the ATI website ( https://support.ati.com/ics/support/KBAnswer.asp?questionID=1176 ) or elsewhere (and then editing .conf files), with the result either being that Blitz stops working or Gnome gives errors about mis-configured files or conflicts, or plain refuses to start in graphical mode.

Does Ubuntu have anything like XP's system restore capability, so that you can save a snapshot of your working system which can be restored if you install something that breaks it? That would be a handy thing to have while messing around with all this.


Craig Watson(Posted 2005) [#11]
I had a 9600XT, it used the fglrx drivers. I think only 8500 era and older hardware supports open (ie. free as in speech) 3D acceleration. The ATI drivers are the default, 2D-only x.org drivers. Radeon I think are the accelerated drivers for older ATI hardware - it won't work for you.

The fglrx drivers from distributions never worked properly for me - the only thing that did was downloading the installer from ATI. I've never had any problems with the ATI installer, so I don't know how much help I can be on the subject. You may want to make sure you have the "linux-restricted-modules" package installed for your kernel - on my install it was already there.

Generally you should try "dmesg" and check the result for error messages from fglrx.

Theoretically you should be OK if you make a copy of /etc/X11/xorg.conf before you run the fglrx install. If the install doesn't work right you should just be able to copy the file back.

There's some info here on setting up the xorg.conf file for the ATI Installer. Read it carefully.


Kev(Posted 2005) [#12]
thanks craig, i see if i can get hold of the dvd version.

kev


Koekelas(Posted 2005) [#13]
I'm on Ubuntu 5.10 Preview Colony 5 for AMD64. I followed your how to. I couldn't find xlibs-dev (installed xlibs instead), xlibmesa-gl-dev and xlibmesa-glu-dev. If I want to rebuild the modules BlitzMax hives me: "Compile Error 2:". If I want to build Digestroids (or any other game, debug or not) BlitzMax stops on linking. What sould I do?


Thanks, Nicolas.


Mark Tiffany(Posted 2005) [#14]
It sounds from the Ubuntu site that 5.10 now uses GCC4, and Blitz is based around GCC3 (which I'm presuming was used in 5.04?). Therefore you'll need to ensure that "legacy" libraries are also installed. I'm afraid I don't use (K)Ubuntu so can't point you at any specifics, although I did go through the same process to get Blitz running on Fedora Core 4.


Koekelas(Posted 2005) [#15]
I installed GCC3.3-Base (that was the only thing I found on Synaptic when I searched for GCC). If I want to rebuild the modules BlitzMax now hives me:

Building Modules
Compiling:blitz_app.c
gcc: no inputfiles

Process completed

If I want to build Digesteroids Blitzmax now hives me:

Building digesteroids
Linking: digesteroids
sh: -c: line 0: unexpected EOF while looking for matching '''
sh: -c: line 1: syntax error: unexpected end of file

Process completed


Thanks, Nicolas.


Mark Tiffany(Posted 2005) [#16]
Try "synchronize modules" and then "rebuild all modules" within the IDE?


Kev(Posted 2005) [#17]
ive installed ubuntu from the dvd version 5.04 blitzmax now works but slow.

Ive got an ATI radeon 9550 and have installed using the downloaded gfx drivers.

sudo dpkg -i filename.deb

xorg-driver-fglrx
xorg-driver-fglrx-dev
fglrx-control (optional)

but my blitzmax is still slow?

any idea's why

kev


The Caffeine Kid(Posted 2005) [#18]
I get an error that GLX is missing even though I've installed everything. :(

Is it becuase I'm on vmware rather than having it installed to the physical drive?


Craig Watson(Posted 2005) [#19]
Make sure you have "linux-restricted-modules" installed for your kernel.

I personally had the best luck with a Radeon card on anti distro of Linux by using the installer provided on ATI's website.


Kev(Posted 2005) [#20]
hi craig.

i downloaded restricted fglrx, and fglrx-dev drivers from here, http://packages.ubuntu.com/hoary/misc/

these installed fine using sudo.

kev


Craig Watson(Posted 2005) [#21]
You can run "glxinfo" or "glxgears" to see if you're getting accelerated graphics or not.

It may be that the Ubuntu packages do everything but update your xorg.conf file too.

The specific packages (assuming a standard kernel system) you'll need are:

linux-restricted-modules-2.6.10-5-386 (2.6.10.4-1) [restricted]
xorg-driver-fglrx (6.8.0-8.8.25-0ubuntu10) [restricted]
xorg-driver-fglrx-dev (6.8.0-8.8.25-0ubuntu10) [restricted]

Linux restricted modules contains the kernel module fglrx needs in addition to the XOrg driver.

Check out your xorg.conf file:
sudo gedit /etc/X11/xorg.conf

Under Section "Device", look for a saying something like: Driver "ati" and change "ati" to "fglrx". You may also need to add
Option "UseInternalAGPGART" "no"
before the EndSection for Section "Device". It should look something like this:
Section "Device"
Identifier "ATI Technologies, Inc. Radeon Mobility 9600/9700 M10/M11 (RV350 NP)"
Driver "fglrx"
BusID "PCI:1:0:0"
Option "UseInternalAGPGART" "no"
EndSection
Reboot or log out and kill X and you should be using accelerated ATI drivers.


Kev(Posted 2005) [#22]
thanks craig, it seems that it was the xorg.conf file that needed editing. blitzmax works fast and smooth :)

thanks for the help getting max working under linux

kev


Craig Watson(Posted 2005) [#23]
No problems. It should be useful to other ATI users too.

Someone advised me of the following: Easy Ubuntu which makes a lot of the common install tasks a lot easier. I haven't tried it out so I can't vouch for it myself, but it may be worth a try.

Don't forget about the Ubuntu Guide or the extremely popular Ubuntu Forums either.


Kev(Posted 2005) [#24]
thanks for the link's craig there gona come in useful. now i need to figure out how to access my ntfs file system from within ubuntu, knoppix was done auto when i installed onto harddrive.

kev


Craig Watson(Posted 2005) [#25]
http://www.ubuntuguide.org/#automountntfs

"sudo fdisk -l" to find out where your NTFS partition is in /dev


ghislain(Posted 2005) [#26]
Ubuntu is quite good! I installed it yesterday on my laptop and i find it amazing how it recognizes all the hardware. I've got a centrino and Ubuntu even recognized my ipw2100 [wireless networkcard] during the initial install. Sound is working. The battery-indicator, etc...

Took a bit of surfing the different linux posts to get BlitzMax working. In most distributions you can select entire area's of interest to be installed [like office, development] but i found Ubuntu works with single packages using Synaptic.

Because 5.10 is again a bit different from 5.04 I'll explain what i did..

My steps:

1. after installation of Ubuntu updated the system by the icon in the upper-right corner. Which updated several libs including some libgl-mesa.. But in total it only required about 15 MB and was finished in 2 minutes.

2. to get the Blitz-IDE up I installed: xorg-driver-fglrx [autoselection: gcc-base, libstd..]

3. Now when you try to compile something Blitz produces an error: g++ command not found. So I installed g++ [autoselection: gcc..]

4. The next error: crt1.o no such file. This is one of the opengl-files, i believe. Installed: libgl1-mesa-dev [autosel: x11proto, libx11]

5. Next error: cannot find -lGLU. Another opengl-file. Installed: libglu-mesa-dev.

6. Final error: cannot find -lxxf86vm. Installed: libxxf86vm-dev.

7. Now when i try to compile it tells me a bunch more errors. But after i synchronize the modules Blitz completes the compilation with: Done!

8. Finally to get the hardware acceleration going i had to change 'ati' into 'fglrx' in /etc/X11/xorg.conf as mentioned somewhere above...

Hope it is of any use..
ghislain


ragtag(Posted 2005) [#27]
Got a good way with this, but am a bit stuck. Running 5.10, and I think I've installed everything. BlitzMax IDE runs fine, but I can't compile. Tried Syncronizing Modules and got a username and password not found. Then tried building the ones I had, and it worked for a wihle till I got the following error.

Compile Error
warning: pointer targets in passing argument 1 og bbStringFromShort differ in signed....
in blitz_string.c

Any ideas?

Ragnar


Mark Tiffany(Posted 2005) [#28]
Warnings generally are just that - compilation would normally continue. Is there another proper error later on, or is that all you get?


ghislain(Posted 2005) [#29]
I believe I got the same error too when I had to rebuild the modules due to the 100%-cpu-bug. But Blitz still works fine.

The syncronizing-server seems to be down for some time now. So you might want to wait until it is back online...

ghislain


ragtag(Posted 2005) [#30]
I figured it was down or there was something wrong with my account, since yesterday I got the same error when syncronizing on Windows. :(

I'll probably be re-installing Ubuntu, since the first install was kind of a crash test and I think I did a lot of stuff wrong. :) I've still had no luck with my sound card, even though there actually came a Linux driver for it with the machine. It's an Azalia CODEC ALC861, and from what I've found on the net a lot of people are having problems with linux and the Azalia cards. I'm new to linux, so messing with driver compilation and kernel modifications, which it seems is what it takes, is a bit much for me. Though I must say that I really like the feel of ubuntu, makes me feel nice and comfy. :) (maybe it's just the color scheme)

Ragnar


ghislain(Posted 2005) [#31]
BlitzMax v1.12 seems to be dependant on some different libraries.

while compiling: "error can not find ... -lasound"
installing 'libasound2-dev' solved the problem.

[also during installation it didn't complain about g++ anymore but instead about g++-3.3].

i only get a warning each time when compiling:
/usr/bin/ld: warning: libstdc++.so.6 needed by /usr/lib/libGLU.so, may conflict with libstdc++.so.5

still programs do work!

ghislain


regaa(Posted 2005) [#32]
What does "appstub.linux signal handler 11" mean? This error appears if i try to F5 the code.

Building test
Compiling:test.bmx
flat assembler version 1.64
3 passes, 2794 bytes.
Linking:test.debug
appstub.linux signal handler 11
Process complete


Craig Watson(Posted 2005) [#33]
Signal 11 is a segmentation fault. It means the program tried to access memory in an unassigned location.

If your hardware is fine, I can't really hazard a guess what might be causing it otherwise.


Tricky(Posted 2005) [#34]
I've tried to install Ubuntu (on an old Windows PC), but without any luck.

During the start-up it freezes completely.

i see a lot of start-up messages coming through the screen.
The last that appears before the system crashes is:

[4294679,246000]: CPU0 (Power status: C1[C1],C2[C2])

I tried that at 11am and now it about 7pm at it's still not moving...
What does it mean?


bregors(Posted 2005) [#35]
.


Liquid(Posted 2006) [#36]
Well, I have hardware acceleration in my ubuntu box with an ATI 9200 card and the speed of BMAX is slow as hell.

What to do?


Update:
It seems that my system isn't accelerated after all. Don't know what happened because I'm sure that i had the system well configured. Arghhh... here I go again!!!!


tin(Posted 2008) [#37]
BlitzMax in Ubuntu-gustby
keep saying can not find IGLU

when i install dependency packages.
xlibs-dev is not in the synaptic, so i installed xlibs-static-dev

BlitzMax run OK! no problem. when compiling the game, giving error about IGLU.

pls help
thanks


tin(Posted 2008) [#38]
sorry, it's working now.
i followed the following instructions

http://blitzmax.com/Community/posts.php?topic=54592


Mark Tiffany(Posted 2008) [#39]
If you wish to use Brucey's gtk module - for example to build the CE IDE - note that you'll also need to install libgtk2.0.0-dev


Mark Tiffany(Posted 2008) [#40]
And also do this to use the mozilla for the htmlview.

sudo ldconfig /usr/lib/firefox

enter your password and you'll be able to run the GTK IDE with no problems, even after logging out and back in again.

In some other distros you may need to change the path in the line above to ldconfig /usr/lib/mozilla-firefox or to wherever the libgtkembedmoz.so file can be found on your system. Also you may need to use the root user account if your distro isn't configured to use sudo.