Building things without root access
Revision as of 15:22, 10 May 2005 by 161.253.9.181 (talk)
Here are a few notes on building C programs on a system you don't own and don't have root access to. Obviously, this has a few strange operational implications.
A pseudo-root
I'll be building things using a subdirectory of my home dir, /user/inst, as the basis of everything (basically replacing what would be /usr/local in normal installs).
./configure
If the autoconf variables are typical, things should run correctly by
./configure --prefix=/user/inst make make install
Run ./configure --help to find out if there are more variables to set.
Compiling based on non-global libs
Compiling a simple program based on Gnu MP normally looks like this:
gcc -o sample sample.c -lgmp
Add a couple things to make it work using your own version:
gcc -o sample sample.c -lgmp -I- -I/user/inst/include -L/user/inst/lib
Any normal -I switches should come before -I-.