PDA

View Full Version : ClanLib 0.8.0 fails to compile on Ubuntu



lixopmstp
01-21-2007, 10:22 PM
Hi,

I'm trying to compile ClanLib 0.8.0 on Ubuntu 6.10 (g++ version 4.1.2) and the compilation aborts with the following error:

display_mode.cpp:33:38: error: X11/extensions/xf86vmode.h: No such file or directory
display_mode.cpp: In static member function 'static std::vector<CL_DisplayMode, std::allocator<CL_DisplayMode> >& CL_DisplayMode::get_display_modes()':
display_mode.cpp:117: error: 'XF86VidModeQueryExtension' was not declared in this scope
display_mode.cpp:121: error: 'XF86VidModeModeInfo' was not declared in this scope
display_mode.cpp:121: error: 'vmodes' was not declared in this scope
display_mode.cpp:124: error: 'XF86VidModeGetAllModeLines' was not declared in this scope
make[2]: *** [display_mode.lo] Error 1

I run configure with the --enable-clanSDL=no option. Is there a patch for this in subversion? Does clanlib 0.9.0 work?

TIA!

lixopmstp
01-21-2007, 11:09 PM
Tried 0.9.0 (svn revision 169. Unfortunately, it dies at the very beginning when building the Sources/API:

make[2]: *** No rule to make target `Display/static_triangles_array.h', needed by `all-am'. Stop.

lixopmstp
01-25-2007, 10:22 PM
Version 0.8 builds properly on Mandriva 2007 with gcc 4.1.1. SO I'm not sure if this is a compiler bug in gcc or in the Ubuntu's include files.

mysterycoder
03-29-2007, 04:32 AM
It looks like you're missing some headers. I believe they are in the libxxf86vm-dev package.

glorified_ameba
03-29-2007, 01:51 PM
Hello,

I have just compiled and installed the 0.8 version on Ubuntu 6.10 yesterday without any major problems. I don't know if you solved the problem yet, but you might also need the libx11-dev package.

I can't tell you exactly what packages you need to install that are not included right off the bat in Ubuntu since I have done some OpenGL and X Window system programming on this machine already so I had all needed packages for ClanLib already installed. Make sure you also have all the necessary gl and glx packages (libgl1-mesa-dev and such). I don't know if they are needed, but I assume they are since ClanLib uses OGL.

After compiling and installing ClanLib using the scripts provided with the ClanLib source I was able to compile the programs without any problems, but when I tried to run them the executable said it could not locate the .so libraries. All I needed to do is copy the libclan* files from the usr/local/lib to usr/lib and now everything works fine. I am sure there is a better way to solve this than what I just did, but I am a Linux noob.

Hope that helps.


Rados

Anvilfolk
07-29-2007, 12:07 PM
Hi. It's a bit late, but since this is a good topic for anyone trying to compile ClanLib 8.0 in linux, I guess I'll post this here.

There's a configuration option which automatically puts the files in /usr/, or in whatever directory you want. I'm currently compiling having run

./configure --prefix=/usr/

I hope this works. I'll let you know!

glajan
09-01-2007, 10:19 AM
I had the same problem. This was what I needed to do to solve the X11/extensions/xf86vmode.h issue. That file is in package x11proto-xf86vidmode-dev. You also need libxxf86vm-dev. I hope that helps.

Before I built mine I a lreday had the 0.6.5 ClanLib ubuntu package installed (i removed that one). I only needed to install those two packages I mentioned and libsdl-gfx1.2, libsdl-gfx1.2-dev and libxi-dev.

Ok now it is built and installed. Time to play =)

glajan
09-04-2007, 05:50 AM
You can find more on building ClanLib for Ubuntu edgy here:
http://www.rtsoft.com/forums/showthread.php?t=1853