# self contained executable

4 messages from 2009-09-16 to 2009-09-16. Participants: Joel Saltzman, Alex Riesen, Matthieu Moy.
Thread: https://gitlist.dev/t/20963

## Joel Saltzman, 2009-09-16 07:45

Subject: self contained executable
Message-ID: <ED42F58A-A814-467B-A37D-B485B2E267ED@gmail.com>
URL: https://gitlist.dev/e/ED42F58A-A814-467B-A37D-B485B2E267ED%40gmail.com

```
is it possible to compile git with all its dependencies so I can run  
it on a server that does not have root access?

```

## Alex Riesen, 2009-09-16 08:13

Subject: Re: self contained executable
Message-ID: <81b0412b0909160113t7edf9b4vdd7b79ca0dae762d@mail.gmail.com>
URL: https://gitlist.dev/e/81b0412b0909160113t7edf9b4vdd7b79ca0dae762d%40mail.gmail.com
In-Reply-To: <ED42F58A-A814-467B-A37D-B485B2E267ED@gmail.com>

```
On Wed, Sep 16, 2009 at 09:45, Joel Saltzman <saltzmanjoelh@gmail.com> wrote:
> is it possible to compile git with all its dependencies so I can run it on a
> server that does not have root access?

This is kind of default configuration (the install prefix is $HOME/,
and everthing gets
installed into ~/bin, ~/share, etc). But if you don't have some of the
libraries (libcurl
for http, eventually openssl and iconv) you can always provide them locally and
set the appropriate compile and linking flags in config.mak (but see
the Makefile
for the variables to set).

```

## Alex Riesen, 2009-09-16 16:44

Subject: Re: self contained executable
Message-ID: <81b0412b0909160944xe2ae0b4u988e8ced7416e5f6@mail.gmail.com>
URL: https://gitlist.dev/e/81b0412b0909160944xe2ae0b4u988e8ced7416e5f6%40mail.gmail.com
In-Reply-To: <C3C630B6-7B54-42BE-9312-20BC20B7F051@gmail.com>

```
On Wed, Sep 16, 2009 at 18:36, Joel Saltzman <saltzmanjoelh@gmail.com> wrote:
> The last part is what I am trying to figure out. How do I set those linking
> flags?

Below, I assume you're a familiar with compilation.

Open Makefile and find the line "Platform specific tweaks".
That should be an example(s) for variables to set. Don't
mind the ifeq's.
Open config.mak and put there all the -I$$HOME/... and
-L$$HOME/... you need to reach the missing headers and
libraries. Your configuration will override the preset values.

That's almost it: you have to find out what exactly you're
missing on your own (for example, you may actually have
curl and openssl).

```

## Matthieu Moy, 2009-09-16 16:51

Subject: Re: self contained executable
Message-ID: <vpqy6oedea2.fsf@bauges.imag.fr>
URL: https://gitlist.dev/e/vpqy6oedea2.fsf%40bauges.imag.fr
In-Reply-To: <ED42F58A-A814-467B-A37D-B485B2E267ED@gmail.com>

```
Joel Saltzman <saltzmanjoelh@gmail.com> writes:

> is it possible to compile git with all its dependencies so I can run
> it on a server that does not have root access?

Compiling with LDFLAGS='-static' is a first step, I'm not sure it's
sufficient.

But as Alex already pointed out, you don't have to be root to install
Git anyway (I'm using a git that I compiled myself, without being root
on my machine).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

```
