Howto: Mandriva Linux One 2008

Archives Forums/Linux Discussion/Howto: Mandriva Linux One 2008

markcw(Posted 2008) [#1]
Note: mandriva.com only distributes KDE so to get GNOME go to the mirrors on wiki.mandriva.com.

I would recommend that you first update Mandriva to the latest packages but for the purpose of this how-to I didn't. There is already a how-to for Mandriva here but I wanted a more verbose description.

For a quick install open Konsole enter 'su' first and then paste the following.
urpmi gcc3.3-c++ libx11_6-devel libmesaglu1-devel libalsa2-devel

Download BlitzMax130.tar.gz, right-click it and select 'Open with Ark'.
Extract the files to '/home/user' and then extract MaxGui130.tar.gz.

Now if you open MaxIDE and run something BlitzMax will say it needs the GNU C++ compiler.
sh: g++-3.3: command not found

Open Software Management (Install & Remove Software) and make sure the dropdown list has 'All' selected.
Browse to Development>C++ and check 'gcc3.3-c++' (you can type the letters rather than scroll down the list).
This will install the following dependencies (marked with a '+').

gcc3.3-c++ - C++ support for gcc
+ binutils - GNU Binary Utility Development Utilities
+ gcc3.3 - GNU Compiler Collection
+ gcc3.3-cpp - The C Preprocessor
+ glibc-devel - Header and object files for development using standard C libraries
+ kernel-headers - Linux kernel header files for userspace
+ libbinutils2 - Main library for binutils
+ libstdc++5-devel - Header files and libraries for C++ development

Open Konsole and type the following to tell BlitzMax to link to g++ v3.3.

whereis g++ [which should print: /usr/bin/g++]
su [to become root]
cd /usr/bin [to change directory]
ln -s g++ g++-3.3 [to symbolic link to g++-3.3]
ln -s gcc gcc-3.3 [to symbolic link to gcc-3.3]

Now if you run something in BlitzMax it will say it needs the X library.
/usr/bin/ld: cannot find -lX11

In Software Management browse to Development>X11 and check 'libx11_6-devel'.
This will install the following dependencies.

libx11_6-devel - X Library
+ libice6-devel - X Inter Client Exchange Library
+ libpthread-stubs - PThread Stubs for XCB
+ libsm6-devel - Development files for libsm
+ libxau6-devel - X authorization file management library
+ libxcb1-devel - Development files for libxcb
+ libxdmcp6-devel - Development files for libxdmcp
+ libxt6-devel - X Toolkit Library
+ x11-proto-devel - Xorg X11 protocol specification headers

Now if you run something in BlitzMax it will say it needs the OpenGL library.
/usr/bin/ld: cannot find -lGL

In Software Management browse to Development>C and check 'libmesaglu1-devel'.
This will install the following dependencies.

libmesaglu1-devel - Development files for GLU libs
+ libdrm-devel - Development files for libdrm
+ libmesagl1-devel - Development files for Mesa (OpenGL compatible 3D lib)
+ libmesaglu1 - Files for Mesa (GLU libs)
+ libmesaglut3 - Files for Mesa (glut libs)
+ libxdamage-devel - Development files for libxdamage
+ libxext6-devel - Development files for libxext
+ libxfixes3-devel - Development files for libxfixes
+ libxxf86vm-devel - Development files for libxxf86vm

You should now be able to run BlitzMax programs with sound.
However, you should install the ALSA library which replaces the old OSS api.
In Software Management browse to Development>C and check 'libalsa2-devel'.

libalsa2-devel - Development files for Advanced Linux Sound Architecture (ALSA)

Finally, X.Org is an open source implementation of the X Window System.
You probably won't need these extra packages but there's no harm in having them.
In Software Management browse to Development>X11 and check 'libxorg-x11-devel'.
This will install the following dependencies.

libxorg-x11-devel - Development tools and files for X11
+ libapplewm-devel
+ libapplewm7
+ libdmx-devel
+ libdmx1
+ libfontconfig-devel
+ libfontenc1-devel
+ libfreetype6-devel
+ libfs-devel
+ libfs6
+ liblbxutil-devel
+ liblbxutil1
+ libmesaglut3-devel
+ libmesaglw1
+ libmesaglw1-devel
+ liboldx6
+ liboldx6-devel
+ libpixman-1-devel
+ libwindowswm-devel
+ libwindowswm7
+ libxaw-devel
+ libxaw6
+ libxcomposite1-devel
+ libxcursor-devel
+ libxevie-devel
+ libxevie1
+ libxfont1-devel
+ libxfontcache1-devel
+ libxft-devel
+ libxi-devel
+ libxinerama1-devel
+ libxkbfile-devel
+ libxkbui-devel
+ libxml2-devel
+ libxmu6-devel
+ libxp-devel
+ libxpm-devel
+ libxrandr2-devel
+ libxrender1-devel
+ libxres1
+ libxres1-devel
+ libxscrnsaver1-devel
+ libxtrap-devel
+ libxtrap6
+ libxtst6-devel
+ libxv1-devel
+ libxvmc1-devel
+ libxxf86dga-devel
+ libxxf86misc-devel
+ x11-server-devel
+ x11-xtrans-devel
+ zlib1-devel


amonite(Posted 2008) [#2]
Thanks, using your how to i successfully managed to get blitzmax to work on Pendrive linux 2008 (which is based on Mandriva).
Now i can have fun at my working place :)

Here is what i did :
(dump from the console)

[root@localhost guest]# urpmi gcc3.3-c++ libx11_6-devel libmesaglu1-devel libalsa2-devel
One of the following packages is needed:
1- glibc-devel-2.4-8mdv2007.1.i586: Header and object files for development using standard C libraries (to install)
2- uClibc-devel-0.9.28.1-1mdv2007.1.i586: Development files for uClibc (to install)
What is your choice? (1-2) 1
One of the following packages is needed:
1- libstdc++6-devel-4.1.2-1mdv2007.1.i586: Header files and libraries for C++ development (to install)
2- libstdc++5-devel-3.3.6-3mdk.i586: Header files and libraries for C++ development (to install)
What is your choice? (1-2) 2
One of the following packages is needed:
1- gcc-4.1.2-1mdv2007.1.i586: GNU Compiler Collection (to install)
2- gcc3.3-3.3.6-3mdk.i586: GNU Compiler Collection (to install)
What is your choice? (1-2) 2
To satisfy dependencies, the following packages are going to be installed:
binutils-2.17.50.0.9-1mdv2007.1.i586
gcc3.3-3.3.6-3mdk.i586
gcc3.3-c++-3.3.6-3mdk.i586
gcc3.3-cpp-3.3.6-3mdk.i586
glibc-devel-2.4-8mdv2007.1.i586
libalsa2-devel-1.0.14-2.rc3.2mdv2007.1.i586
libbinutils2-2.17.50.0.9-1mdv2007.1.i586
libdrm2-devel-2.3.0-2mdv2007.1.i586
libice6-devel-1.0.3-1mdv2007.1.i586
libmesagl1-devel-6.5.2-7mdv2007.1.i586
libmesaglu1-devel-6.5.2-7mdv2007.1.i586
libsm6-devel-1.0.1-3mdv2007.1.i586
libstdc++5-devel-3.3.6-3mdk.i586
libx11_6-devel-1.1.1-2mdv2007.1.i586
libxau6-devel-1.0.3-1mdv2007.1.i586
libxdmcp6-devel-1.0.2-1mdv2007.1.i586
libxext6-devel-1.0.3-1mdv2007.1.i586
libxt6-devel-1.0.5-1mdv2007.1.i586
libxxf86vm1-devel-1.0.1-2mdv2007.0.i586
x11-proto-devel-1.2.0-11mdv2007.1.i586
Proceed with the installation of the 20 packages? (42 MB) (Y/n) Y

Then i just made the symbolic links for g++ and gcc.
I don't need maxgui and sound.
I don't know if i made everything right (linux noob here) but it seems to run just fine !

edit :
However when executing fireworks.debug from the sample directory the output warns me with :

/usr/bin/ld: warning: libstdc++.so.6, needed by /usr/lib/libGLU.so, may conflict with libstdc++.so.5
libGL warning: 3D driver claims to not support visual 0x5a


markcw(Posted 2008) [#3]
I can't find a list of packages for Pendrive Linux. The first error message is nothing to worry about. The second one may be because you have a few packages missing, probably libmesaglut3.

kernel-headers
libpthread-stubs
libxcb1-devel
libmesaglut3
libxdamage-devel
libxfixes3-devel

If you install libxorg-x11-devel that would probably add most of them.


amonite(Posted 2008) [#4]
Hi markcw,
could you help me again on this one ?

I had to reinstall blitzmax because i needed a larger loop file for pendrive linux.
when i urpmi gcc3.3-c++ libx11_6-devel libmesaglu1-devel libalsa2-devel
i couldn't connect to the server so i updated my urpmi.
Now it seems everything installed correctly but when i try to run a sample in blitzmax it compiles except i got the following output and an unresponding black window :

Building fireworks
Compiling:fireworks.bmx
flat assembler version 1.64
3 passes, 12776 bytes.
Linking:fireworks.debug
Executing:fireworks.debug
/usr/bin/ld: warning: libstdc++.so.6, needed by /usr/lib/libGLU.so, may conflict with libstdc++.so.5
X Error of failed request: BadRequest (invalid request code or no such operation)
Major opcode of failed request: 158 (DAMAGE)
Minor opcode of failed request: 4 ()
Serial number of failed request: 45
Current serial number in output stream: 50
Locking assertion failure. Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb79d5706]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_lock+0x2e) [0xb79d57ce]
#2 /usr/lib/libX11.so.6 [0xb7d63251]
#3 /usr/lib/libX11.so.6(XFlush+0x29) [0xb7d3ca09]
#4 /initrd/changes/home/guest/Blitzmax/BlitzMax/samples/simonh/fireworks/fireworks.debug [0x804c7e1]
#5 /initrd/changes/home/guest/Blitzmax/BlitzMax/samples/simonh/fireworks/fireworks.debug [0x811581b]
#6 /initrd/changes/home/guest/Blitzmax/BlitzMax/samples/simonh/fireworks/fireworks.debug [0x8114de8]
#7 /initrd/changes/home/guest/Blitzmax/BlitzMax/samples/simonh/fireworks/fireworks.debug [0x811383c]
#8 /initrd/changes/home/guest/Blitzmax/BlitzMax/samples/simonh/fireworks/fireworks.debug [0x8113402]
#9 /initrd/changes/home/guest/Blitzmax/BlitzMax/samples/simonh/fireworks/fireworks.debug [0x80fecbf]
#10 /lib/i686/libc.so.6(exit+0xe9) [0xb7b1d1f9]
#11 /usr/lib/libX11.so.6 [0xb7d5c214]
#12 [0x81f2170]
X Error of failed request: BadRequest (invalid request code or no such operation)
Major opcode of failed request: 158 (DAMAGE)
Minor opcode of failed request: 4 ()
Serial number of failed request: 48
Current serial number in output stream: 50
Locking assertion failure. Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb79d5706]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_lock+0x2e) [0xb79d57ce]
#2 /usr/lib/libX11.so.6 [0xb7d63251]
#3 /usr/lib/libGL.so.1 [0xb7eb9ab2]
#4 /usr/lib/libGL.so.1(glXMakeCurrentReadSGI+0x13b) [0xb7eb9ed6]
#5 /usr/lib/libGL.so.1(glXMakeCurrent+0x23) [0xb7eba136]
#6 /initrd/changes/home/guest/Blitzmax/BlitzMax/samples/simonh/fireworks/fireworks.debug [0x804c219]
#7 /initrd/changes/home/guest/Blitzmax/BlitzMax/samples/simonh/fireworks/fireworks.debug [0x804c2cb]
#8 /lib/i686/libc.so.6(exit+0xe9) [0xb7b1d1f9]
#9 /usr/lib/libX11.so.6 [0xb7d5c214]
#10 [0x81f2170]

Any suggestion ?


GaryV(Posted 2008) [#5]
I solved my BlitzMax and Linux problems by buying PureBasic.


Brucey(Posted 2008) [#6]
I solved my BlitzMax and Linux problems by buying PureBasic.

Can't imagine going backwards and trying to use a non OOP language for anything useful.
Also can't say I've had much in the way of Linux problems with BlitzMax. I guess it helps if you know what you are doing (for Linux generally).


GaryV(Posted 2008) [#7]
I guess it helps if you know what you are doing (for Linux generally).
Indeed ;)


amonite(Posted 2008) [#8]
Eureka !

Problem solved :)

I think i was messing something up with all the packages.

Blitzmax runs fine now and i'm happy again !

thank you everyone.