Compiling in Fedora

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
Post Reply
charlieg
Elite Mercenary
Elite Mercenary
Posts: 1329
Joined: Thu Mar 27, 2003 11:51 pm
Location: Manchester, UK
Contact:

Compiling in Fedora

Post by charlieg »

First the dependencies:

(I had a lot of stuff already installed so this list may not be exhaustive)

Code: Select all

yum install ffmpeg-devel libvorbis-devel SDL-devel SDL-static openal-devel freeglut-devel gtk2-devel
After that, it should be possible for 'cmake .' to generate Makefiles.

Building, currently I hit this error:

Code: Select all

[ 56%] Building CXX object CMakeFiles/vegaserver.dir/src/gldrv/gl_vertex_list.o
In file included from /home/charles/Projects/Other/vegastrike/src/gldrv/gl_vertex_list.cpp:28:
/home/charles/Projects/Other/vegastrike/src/gldrv/gl_globals.h:235: error: ‘PFNGLCOMPRESSEDTEXIMAGE2DPROC’ does not name a type
make[2]: *** [CMakeFiles/vegaserver.dir/src/gldrv/gl_vertex_list.o] Error 1
make[1]: *** [CMakeFiles/vegaserver.dir/all] Error 2
make: *** [all] Error 2
Free Gamer - free software games compendium and commentary!
FreeGameDev forum - open source game development community
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: Compiling in Fedora

Post by safemode »

I'm not at my computer to see if maybe the last klauss patch for cubemaps borked vegaserver in some way, (incidentally i usually compile everything when checking stuff but yesterday i only did vegastrike), but it would be good to also check if you have the opengl dev pkg installed. Also, have you compiled on this system before and it worked and now it doesn't or is this a first attempt?
Ed Sweetman endorses this message.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Compiling in Fedora

Post by klauss »

I forgot to make all, sorry, but the errors I see there don't seem related to vegaserver or the cube map stuff in any way though.

It more looks like there's a very very old version of GL headers installed on your system, which in linux usually is fixed by installing the proper GPU drivers (which come with GL headers).
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: Compiling in Fedora

Post by safemode »

I only mentioned vegaserver because it was in the process of building vegaserver when it died, and without having the code in front of me, wasn't sure if the offending code was ifdef'd to some vegaserver only block and that's why i didn't see the error when compiling vegastrike yesterday, since the file is used in both yet apparently not linked to a shared lib (indicating that it likely has such ifdef'd blocks, or is mistakenly not in one of the shared libs.)

btw, was the reversal of those two lines in i committed yesterday related to your commit correct? I assume so since it was how they were prior to the additional cubemap code but i didn't spend a lot of time looking over things.
Ed Sweetman endorses this message.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Compiling in Fedora

Post by klauss »

safemode wrote:btw, was the reversal of those two lines in i committed yesterday related to your commit correct? I assume so since it was how they were prior to the additional cubemap code but i didn't spend a lot of time looking over things.
I didn't even see the change yet.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
charlieg
Elite Mercenary
Elite Mercenary
Posts: 1329
Joined: Thu Mar 27, 2003 11:51 pm
Location: Manchester, UK
Contact:

Re: Compiling in Fedora

Post by charlieg »

I have the latest nvidia drivers installed as well as the relevant -devel package.
Free Gamer - free software games compendium and commentary!
FreeGameDev forum - open source game development community
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: Compiling in Fedora

Post by safemode »

charlieg wrote:I have the latest nvidia drivers installed as well as the relevant -devel package.

apparently not. Did cmake spit out anything during it's configuration process about not finding anything ? If you were missing a header, you should get an error about that, so then we're left to assume either the header is incomplete/incorrect or relevant code is ifdef'd out for some reason.
Ed Sweetman endorses this message.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Compiling in Fedora

Post by klauss »

If you can, try autotools. I'm still using autotools and it works:

./bootstrap.sh && ./configure && make

Does anybody need anything simpler than that?

I'll have to learn (and adopt) cmake some day, but not yet.

Anyway, if you can build with autotools and not with cmake, then it's the cmake script that is missing something.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: Compiling in Fedora

Post by safemode »

if it builds in autotools but not cmake, I'd be very interested to know about it. The only _real_ isuses with cmake vs autotools right now besides not having the flags for building with cubemap support (since this is a temporary flag anyway i'm not too concerned about that as eventually cubemaps is to be default) but that I dont think (could be wrong though) that cmake supports specifying internal paths to boost or older versions (if you have multiple versions installed) of python easily. In cmake, all search paths can be supplied on the commandline, but i should implement a simple flag to enable to specify an internal version we pull via external svn repo vs system installed.

In any case, building in cmake is easier than autotools.

cmake path_to_source; make;

done.

Plus, since you are building outside of the source tree, you dont pollute your source tree with build files. This means cleanup is as simple as rm -rf builddir. And svn doesn't have to bother with warning you about all kinds of build files in your working dir. It's really worth jumping into. maintaining it is so braindeadingly simple compared to autotools that you aren't going to look back.
Ed Sweetman endorses this message.
athomic1
Bounty Hunter
Bounty Hunter
Posts: 137
Joined: Wed Apr 08, 2009 6:07 am

Re: Compiling in Fedora

Post by athomic1 »

I'm having trouble with that 'PFNGLCOMPRESSEDTEXIMAGE2DPROC' definition, too, with both the cmake and automake tools. I'm building on Fedora 11, and just added the xorg-x11-drv-nvidia-devel package, which puts a bunch of includes under /usr/include/nvidia. According to grep , the file /usr/include/nvidia/GL/glext.h contains this line:

Code: Select all

typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
I'm guessing this thing would build if I could get the make/cmake tools to pick up these files, but what's the best way to do that? Neither cmake nor the automake tools seem to know about it.

Incidentally, I also noticed that cmake doesn't seem to pick up on ffmpeg, although I have that and a bunch of supporting packages installed. Anyone?
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: Compiling in Fedora

Post by safemode »

athomic1 wrote:I'm having trouble with that 'PFNGLCOMPRESSEDTEXIMAGE2DPROC' definition, too, with both the cmake and automake tools. I'm building on Fedora 11, and just added the xorg-x11-drv-nvidia-devel package, which puts a bunch of includes under /usr/include/nvidia. According to grep , the file /usr/include/nvidia/GL/glext.h contains this line:

Code: Select all

typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
I'm guessing this thing would build if I could get the make/cmake tools to pick up these files, but what's the best way to do that? Neither cmake nor the automake tools seem to know about it.

Incidentally, I also noticed that cmake doesn't seem to pick up on ffmpeg, although I have that and a bunch of supporting packages installed. Anyone?
/usr/include/nvidia is a nonstandard fedora only directory. I have no idea why those idiots would do something like that.

we can add a search path specifically for fedora users to search that path if the regular one doesn't exist.

ffmpeg probably suffers a similar problem. I can only guess that fedora package managers hate their users and everyone else and really dont want anyone to use their dist.
Ed Sweetman endorses this message.
JsnMtth
Bounty Hunter
Bounty Hunter
Posts: 174
Joined: Wed May 27, 2009 6:38 am
Location: Fresno, California - United States of America
Contact:

Re: Compiling in Fedora

Post by JsnMtth »

/usr/include/nvidia is a nonstandard fedora only directory. I have no idea why those idiots would do something like that.

we can add a search path specifically for fedora users to search that path if the regular one doesn't exist.

ffmpeg probably suffers a similar problem. I can only guess that fedora package managers hate their users and everyone else and really dont want anyone to use their dist.

I'm guessing you really don't like Fedora. BTW - I'm running Fedora 11 with the nvidia-proprietary driver and I don't have that directory. I'll try out a build and see what happens.
JsnMtth
Bounty Hunter
Bounty Hunter
Posts: 174
Joined: Wed May 27, 2009 6:38 am
Location: Fresno, California - United States of America
Contact:

Re: Compiling in Fedora

Post by JsnMtth »

It built on my system with cmake... trying autotools now.
JsnMtth
Bounty Hunter
Bounty Hunter
Posts: 174
Joined: Wed May 27, 2009 6:38 am
Location: Fresno, California - United States of America
Contact:

Re: Compiling in Fedora

Post by JsnMtth »

What graphics driver is installed in your system charlieg?

EDIT: Ohh yeah, what card do you have?
athomic1
Bounty Hunter
Bounty Hunter
Posts: 137
Joined: Wed Apr 08, 2009 6:07 am

Re: Compiling in Fedora

Post by athomic1 »

JsnMtth wrote:I'm running Fedora 11 with the nvidia-proprietary driver and I don't have that directory.
That directory (and its contents, natch) come with the package I mentioned earlier: xorg-x11-drv-nvidia-devel. Here's a list of the files and directories it provides, as reported by rpmquery -l xorg-x11-drv-nvidia-devel
  • /usr/include/nvidia
  • /usr/include/nvidia/GL
  • /usr/include/nvidia/GL/gl.h
  • /usr/include/nvidia/GL/glext.h
  • /usr/include/nvidia/GL/glx.h
  • /usr/include/nvidia/GL/glxext.h
  • /usr/include/nvidia/cuda
  • /usr/include/nvidia/cuda/cuda.h
  • /usr/include/nvidia/cuda/cudaGL.h
  • /usr/lib64/nvidia/libGL.so
  • /usr/lib64/nvidia/libXvMCNVIDIA.so
I'm curious whether your "nvidia-proprietary driver" is the same package I get from the repositories? These are the nvidia-related packages installed on my system, according to rpmquery -a | grep nvidia
  • kmod-nvidia-190.42-1.fc11.4.x86_64
  • xorg-x11-drv-nvidia-devel-190.42-1.fc11.x86_64
  • kmod-nvidia-2.6.30.9-102.fc11.x86_64-190.42-1.fc11.3.x86_64
  • xorg-x11-drv-nvidia-libs-190.42-1.fc11.i586
  • kmod-nvidia-2.6.30.10-105.fc11.x86_64-190.42-1.fc11.4.x86_64
  • kmod-nvidia-2.6.30.9-96.fc11.x86_64-190.42-1.fc11.1.x86_64
  • xorg-x11-drv-nvidia-libs-190.42-1.fc11.x86_64
  • xorg-x11-drv-nvidia-190.42-1.fc11.x86_64
Do the names on your packages match any of these?
JsnMtth
Bounty Hunter
Bounty Hunter
Posts: 174
Joined: Wed May 27, 2009 6:38 am
Location: Fresno, California - United States of America
Contact:

Re: Compiling in Fedora

Post by JsnMtth »

Well... it builds and runs with autotools. I enabled cubemaps, there were seams in the starfield int the Crucible system. Also my ship had some horrible yellow shading. Also the mining base domes where milky instead of clean with an environment-map on them.
JsnMtth
Bounty Hunter
Bounty Hunter
Posts: 174
Joined: Wed May 27, 2009 6:38 am
Location: Fresno, California - United States of America
Contact:

Re: Compiling in Fedora

Post by JsnMtth »

athomic1 wrote:
JsnMtth wrote:I'm running Fedora 11 with the nvidia-proprietary driver and I don't have that directory.
That directory (and its contents, natch) come with the package I mentioned earlier: xorg-x11-drv-nvidia-devel. Here's a list of the files and directories it provides, as reported by rpmquery -l xorg-x11-drv-nvidia-devel
  • /usr/include/nvidia
  • /usr/include/nvidia/GL
  • /usr/include/nvidia/GL/gl.h
  • /usr/include/nvidia/GL/glext.h
  • /usr/include/nvidia/GL/glx.h
  • /usr/include/nvidia/GL/glxext.h
  • /usr/include/nvidia/cuda
  • /usr/include/nvidia/cuda/cuda.h
  • /usr/include/nvidia/cuda/cudaGL.h
  • /usr/lib64/nvidia/libGL.so
  • /usr/lib64/nvidia/libXvMCNVIDIA.so
I'm curious whether your "nvidia-proprietary driver" is the same package I get from the repositories? These are the nvidia-related packages installed on my system, according to rpmquery -a | grep nvidia
  • kmod-nvidia-190.42-1.fc11.4.x86_64
  • xorg-x11-drv-nvidia-devel-190.42-1.fc11.x86_64
  • kmod-nvidia-2.6.30.9-102.fc11.x86_64-190.42-1.fc11.3.x86_64
  • xorg-x11-drv-nvidia-libs-190.42-1.fc11.i586
  • kmod-nvidia-2.6.30.10-105.fc11.x86_64-190.42-1.fc11.4.x86_64
  • kmod-nvidia-2.6.30.9-96.fc11.x86_64-190.42-1.fc11.1.x86_64
  • xorg-x11-drv-nvidia-libs-190.42-1.fc11.x86_64
  • xorg-x11-drv-nvidia-190.42-1.fc11.x86_64
Do the names on your packages match any of these?
Ohh I see. I usually install from the package that nvidia provides. I've read instances of people claiming that you one from nvidia is better, but I've also read many complaints about how it overides files on your system.

In the terminal your compiling from run:
export CXXFLAGS='-I/usr/include/nvidia'
export LDFLAGS='-L/usr/lib64/nvidia'


Then try compiling again. I'm not sure if CMAKE recognizes those environment variables, but we'll find out.

EDIT: The reason I'm not having that issue is because we each get the driver from a different group. The two groups don't install them in the same way. I'm not sure what the lattest driver is, but I don't see that your driver has any issues, other than being in a strange place.
athomic1
Bounty Hunter
Bounty Hunter
Posts: 137
Joined: Wed Apr 08, 2009 6:07 am

Re: Compiling in Fedora

Post by athomic1 »

JsnMtth wrote:In the terminal your compiling from run:
export CXXFLAGS='-I/usr/include/nvidia'
export LDFLAGS='-L/usr/lib64/nvidia'

Then try compiling again. I'm not sure if CMAKE recognizes those environment variables, but we'll find out.
Okay, that seems to have fixed the problem I was having, but now I'm running into another error:

Code: Select all

g++  -I/usr/include/nvidia -pipe  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -pthread  -L/usr/lib64/nvidia -o asteroidgen objconv/asteroidgen.o  -L/usr/lib64/nvidia   -lvorbisfile -lvorbis -logg   -lSDL -lpthread  -lGL  -lGLU -lXmu -lXi  -lglut  -lexpat  -lpng  -ljpeg  -lopenal  -lvorbisfile -lvorbis -logg  -L/usr/lib64 -lpython2.6 -Xlinker -export-dynamic -pthread
make[1]: *** No rule to make target `objconv/mesher/Converter.cpp', needed by `objconv/mesher/mesher-Converter.o'.  Stop.
make[1]: Leaving directory `/opt/localhome/iris/build/svn/vegastrike/trunk/vegastrike'
make: *** [all] Error 2
Apparently, there's a rule missing, or something, to make the file, Converter.cpp. This error came up during the traditional make sequence. When I tried cmake, I got this interesting message:

Code: Select all

CMake Error in objconv/CMakeLists.txt:
  Cannot find source file "Converter.cpp".  Tried extensions .c .C .c++ .cc
  .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx
So it looks like maybe we're missing a file, here?

I don't know, maybe I don't have the whole tree, or something? Hard to figure out how to keep a local copy of the SVN updated...

EDIT: Okay, just tried svn update, and got this:

Code: Select all

svn: Directory 'objconv/mesher/.svn' containing working copy admin area is missing
What the heck is going on, here?
charlieg
Elite Mercenary
Elite Mercenary
Posts: 1329
Joined: Thu Mar 27, 2003 11:51 pm
Location: Manchester, UK
Contact:

Re: Compiling in Fedora

Post by charlieg »

Looks like something (the .svn dir in objconv/mesher) got deleted:
http://www.devcha.com/2008/03/svn-direc ... rking.html
Free Gamer - free software games compendium and commentary!
FreeGameDev forum - open source game development community
JsnMtth
Bounty Hunter
Bounty Hunter
Posts: 174
Joined: Wed May 27, 2009 6:38 am
Location: Fresno, California - United States of America
Contact:

Re: Compiling in Fedora

Post by JsnMtth »

The post charlieg pointed out explains how to do this:

Code: Select all

cd objconv
rm -rf mesher
svn co https://vegastrike.svn.sourceforge.net/svnroot/vegastrike/trunk/vegastrike/objconv/mesher
cd ..
I'm not sure if you need to rebuild or not. You can try continuing the build, if it fails then do a make clean and them make again
athomic1
Bounty Hunter
Bounty Hunter
Posts: 137
Joined: Wed Apr 08, 2009 6:07 am

Re: Compiling in Fedora

Post by athomic1 »

That seems to have fixed it.

The build failed again on a 'no rule' for src/gui/general.cpp (I think), but another svn update apparently fixed that, and the automake build completed successfully. I didn't bother with cmake.

It would be nice if the build system could pick up the nvidia libraries and includes automatically, but I really don't know how to set that up in a portable way. In any case, I finally got the thing to build again, so I'm happy!

Thanks for all the help, guys!
JsnMtth
Bounty Hunter
Bounty Hunter
Posts: 174
Joined: Wed May 27, 2009 6:38 am
Location: Fresno, California - United States of America
Contact:

Re: Compiling in Fedora

Post by JsnMtth »

Your welcome.

export <VARIBLE>=<VALUE> is temporary to your current session, once you logout or close your virtual terminal they're gone and must be re-initialized. There are other ways to accomplish the same ends.

PS: If your interested in getting more familiar with with it, I recommend LFS "Linux from Scratch" it a set of instructions for building a small working linux distro from source. It's not exactly a good way to build and maintain your main system (gentoo is better suited if you want to build your own complete distro). But it is a good way to get familiar with building programs and how they work together on a Linux system.
Post Reply