nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   Some GL library questions (http://www.nvnews.net/vbulletin/showthread.php?t=13191)

silenus 06-11-03 03:39 AM

Some GL library questions
 
I have recently switched to an nV card, and I have installed /NVIDIA-Linux-x86-1.0-4363. I run a Linux from Scratch system, so everything is compiled locally, including version on 4.3 of X, which I compiled/installed before installing the new card and the nV drivers.

I have some questions concerning the GL library :

(1) I noted from the Readme that I should copy nV's own gl.h and glx.h into /usr/include/GL/. I have done this, but should I also copy over the nV glxtokens.h?

(2) The nV installer automatically installed its own libGl.so files in /usr/lib. It did not, however, install them in /usr/X11R6/lib, which has its own versions. I discovered this yesterday when trying to compile the game foobillard, which has an option to use nV-extensions for bumpreflections. It would compile only when I temporarily replaced the standard libGL libraries in /usr/X11R6/lib with symlinks to the nV versions in /usr/lib. Should I make this change permanent?

(3) If I do need to make the change permanent, do I also need to recompile X against the nV GL libraries? How else, for example, will I get a correct libGL.a ?

Sorry for the long question.

Thanks,

Thunderbird 06-11-03 04:14 AM

1) Just copy all nvidia's headers over to /usr/include/GL. Note that to compile GL apps more headers are needed for example from Mesa since nvidia doesn't provide all headers.

2) Normally the GL libraries are installed to /usr/lib, are you sure the libraries in /usr/X11R6/lib are not the ones from xfree86? If not keep the symlinks or just move the files over.

3) There are two types of libraries on linux static (.a) and dynamic (.so). Most applications use dynamic libraries. When you build an app using static libraries the library gets builtin into the app. In such a case you can copy the app to another system and the library is not needed.
In general you don't need these static libs and likely nvidia can't provide them because of legal reasons. (linking a GPL'ed app with a static lib ..)
Really remove libGL.a if you have it left. If it doesn't exist apps will use the dynamic library.

silenus 06-11-03 04:34 AM

Thank-you very much for the swift reply.

(1) OK, I will just copy all of them over - I was just puzzled by the fact that the Readme does not mention glxtokens.h. I think I have all the other libraries (eg Mesa) I need- so long as I don't have to get versions which are in some way nV modified.

(2) I am sure that they *are* the ones from xfree 86. I wondered why the nV installer did not automatically overwrite them at the same time it was installing itw own stuff to /usr/lib - should it not have done so?

(3) I have a general understanding of the role of (.a) libs - I guess I was just being obsessive about having everything neat and tidy. Also, I did not realise that if I delete the (.a) libs then compilation via (.so) will be forced - I thought that some compilations would just fail if the code required a (.a) and it was missing.

Thanks again

bwkaz 06-11-03 08:02 PM

Quote:

Originally posted by silenus
I wondered why the nV installer did not automatically overwrite them at the same time it was installing itw own stuff to /usr/lib - shuld it not have done so?
I think so (when you give --extract-only to the .run file, the Makefile in the resulting directory does try to delete /usr/X11R6/lib/libGL.*), but maybe it either didn't or couldn't for some reason? In any case, just delete these files yourself -- no symlinks are needed (any compilations will find the right libs in /usr/lib).

silenus 06-12-03 10:30 AM

Thanks,

You are (of course), right about the Makefile.

Both the /usr/X11R6/lib directory and the libGL files were, as you would expect, root-owned and 755 permissioned. I guess there must have been some glitch with the removal. I generally run an uninstaller script at install-time which gives me a log of what happened during installations, but it won't work with the nV installer so I guess I will never know how the problem arose.


All times are GMT -5. The time now is 04:20 PM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.