[PLUG] Resolved: Compiling Varkon

Richard C. Steffens rsteff.l at comcast.net
Tue Apr 26 23:15:32 UTC 2005


On Saturday 23 April 2005 9:57 pm, Elliott Mitchell wrote:
> Depending upon which OpenGL operations Varkon is using and your hardware
> you may see a major gain with the commercial X drivers from ATi and
> nVIDIA. The modern hardware covers a lot of the operations.

I've got old enough hardware that I don't think that will be an issue.

> > From past
> > discussions, I've come to believe that one should compile programs as a
> > normal user, and not as root. So, that is what I've attempted to set up,
> > here.
>
> Yup, that is recommended practice. Having built a number of programs
> there are two tricks that work in 99% of cases.
>
> In pretty well all Makefiles, all of those generated by automake there is
> the variable DESTDIR. During `make install` $DESTDIR is prefixed to
> target directories.

There isn't any 'make install' with Varkon, just plain make. (I tried, and 
make told me so.)

> The fallback trick would be to create a zero-length file "/bin/mbsc" as
> root and chown that to yourself. One varient of this is to make that as a
> symbolic link somewhere in a directory you own. This is ugly, but does
> allow you to control the damage done by the program. Also you may
> potentially need to make a *lot* of files for this to work.

I tried this. I ended up creating 7 or 8 files, but then started getting other 
errors and decided this was not productive. This wasn't a total waste of 
time, however, as it taught me about the concept of creating a zero-length 
files using touch.

> The first is much cleaner and nearly always works (though you almost
> always have to edit the Makefile by hand), while the second will *always*
> work all the time.

Today, I finally have some free time to fiddle with this. I went back to the 
third party tutorial someone found for me:

http://www.marcdatabase.com/~lemur/vk-varkon-tutorial.html

and took my time reading all his instructions. He, too, recommends compiling 
to a user directory instead of to a system one, and identifies several 
environment variables that need to be created in the .bashrc file. While I've 
been aware of these, it's actually the first time I've had a reason to edit 
my .bashrc file.

To make a long story short, I followed the tutorial's instructions with only 
one exception: instead of creating /usr/local/varkon_nnn, I 
created /usr/varkon as root, and then changed the ownership to rsteff:users. 
tar -xzvf created the appropriate varkon_nnn directory. After I unpacked the 
source in /usr/varkon, I had to change the ownership of some of the files and 
directories with chown -R rsteff:users * (probably because I did some of this 
before remembering to drop back to a normal user!)  

This time, make ran to completion with no errors, and varkon & starts the 
program as expected. 

Thanks to all for the pointers.

-- 
Regards,

Dick Steffens



More information about the PLUG mailing list