[PATCH] Add more instructions about how to install git.

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Add more instructions about how to install git.

Thiago Farina-2
Signed-off-by: Thiago Farina <[hidden email]>
---
 INSTALL |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/INSTALL b/INSTALL
index ae7f750..67abfc7 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,6 +1,15 @@
 
  Git installation
 
+To install git follow these 4 steps inside your git directory:
+$ autoconf      # Generates the configure file from configure.ac
+$ ./configure   # Configures everything needed to build git
+$ make all      # Compiles git based in the Makefile
+$ make install  # Installs git in your own ~/bin directory
+
+If you don't have autoconf installed, you can do this by:
+$ sudo apt-get install autoconf
+
 Normally you can just do "make" followed by "make install", and that
 will install the git programs in your own ~/bin/ directory.  If you want
 to do a global install, you can do
--
1.6.0.4

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Add more instructions about how to install git.

Alex Riesen
On Tue, Sep 8, 2009 at 07:11, Thiago Farina<[hidden email]> wrote:

> Signed-off-by: Thiago Farina <[hidden email]>
> ---
>  INSTALL |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/INSTALL b/INSTALL
> index ae7f750..67abfc7 100644
> --- a/INSTALL
> +++ b/INSTALL
> @@ -1,6 +1,15 @@
>
>                Git installation
>
> +To install git follow these 4 steps inside your git directory:
> +$ autoconf      # Generates the configure file from configure.ac
> +$ ./configure   # Configures everything needed to build git
> +$ make all      # Compiles git based in the Makefile
> +$ make install  # Installs git in your own ~/bin directory
> +
> +If you don't have autoconf installed, you can do this by:
> +$ sudo apt-get install autoconf

... if you're on a Debian-derived system. The other half of the
world, which is RedHat-derived, uses RPM. And there are
other package management tools. Maybe that was a reason
why the instructions weren't included before.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Add more instructions about how to install git.

Matthieu Moy-2
Alex Riesen <[hidden email]> writes:

> On Tue, Sep 8, 2009 at 07:11, Thiago Farina<[hidden email]> wrote:
>> Signed-off-by: Thiago Farina <[hidden email]>
>> ---
>>  INSTALL |    9 +++++++++
>>  1 files changed, 9 insertions(+), 0 deletions(-)
>>
>> diff --git a/INSTALL b/INSTALL
>> index ae7f750..67abfc7 100644
>> --- a/INSTALL
>> +++ b/INSTALL
>> @@ -1,6 +1,15 @@
>>
>>                Git installation
>>
>> +To install git follow these 4 steps inside your git directory:
>> +$ autoconf      # Generates the configure file from configure.ac
>> +$ ./configure   # Configures everything needed to build git
>> +$ make all      # Compiles git based in the Makefile
>> +$ make install  # Installs git in your own ~/bin directory

Your commit message doesn't say what's wrong with

| Alternatively you can use autoconf generated ./configure script to
| set up install paths (via config.mak.autogen), so you can write
| instead
|
|         $ make configure ;# as yourself
|         $ ./configure --prefix=/usr ;# as yourself
|         $ make all doc ;# as yourself
|         # make install install-doc install-html;# as root

which is already in INSTALL a few lines after what your patch adds.

>> +If you don't have autoconf installed, you can do this by:
>> +$ sudo apt-get install autoconf
>
> ... if you're on a Debian-derived system.

and if you have sudo configured.

BTW, apt-get is anyway somehow deprecaded, you should
s/apt-get/aptitude/.

--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Add more instructions about how to install git.

MichaelJGruber
Matthieu Moy venit, vidit, dixit 08.09.2009 08:20:

> Alex Riesen <[hidden email]> writes:
>
>> On Tue, Sep 8, 2009 at 07:11, Thiago Farina<[hidden email]> wrote:
>>> Signed-off-by: Thiago Farina <[hidden email]>
>>> ---
>>>  INSTALL |    9 +++++++++
>>>  1 files changed, 9 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/INSTALL b/INSTALL
>>> index ae7f750..67abfc7 100644
>>> --- a/INSTALL
>>> +++ b/INSTALL
>>> @@ -1,6 +1,15 @@
>>>
>>>                Git installation
>>>
>>> +To install git follow these 4 steps inside your git directory:
>>> +$ autoconf      # Generates the configure file from configure.ac
>>> +$ ./configure   # Configures everything needed to build git
>>> +$ make all      # Compiles git based in the Makefile
>>> +$ make install  # Installs git in your own ~/bin directory
>
> Your commit message doesn't say what's wrong with
>
> | Alternatively you can use autoconf generated ./configure script to
> | set up install paths (via config.mak.autogen), so you can write
> | instead
> |
> |         $ make configure ;# as yourself
> |         $ ./configure --prefix=/usr ;# as yourself
> |         $ make all doc ;# as yourself
> |         # make install install-doc install-html;# as root
>
> which is already in INSTALL a few lines after what your patch adds.

... especially since that really is a second class alternative these
days, with using the shipped Makefile being the preferred way - just as
the current documentation states.

>
>>> +If you don't have autoconf installed, you can do this by:
>>> +$ sudo apt-get install autoconf
>>
>> ... if you're on a Debian-derived system.
>
> and if you have sudo configured.
>
> BTW, apt-get is anyway somehow deprecaded, you should
> s/apt-get/aptitude/.
>

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Add more instructions about how to install git.

Thiago Farina-2
In reply to this post by Matthieu Moy-2
On Tue, Sep 8, 2009 at 3:20 AM, Matthieu
Moy<[hidden email]> wrote:

> Your commit message doesn't say what's wrong with
>
> | Alternatively you can use autoconf generated ./configure script to
> | set up install paths (via config.mak.autogen), so you can write
> | instead
> |
> |         $ make configure ;# as yourself
> |         $ ./configure --prefix=/usr ;# as yourself
> |         $ make all doc ;# as yourself
> |         # make install install-doc install-html;# as root
>
> which is already in INSTALL a few lines after what your patch adds.

I tried to being more explicit about what the new users has to do. The
first instruction that the text says is: "Normaly you can just do
"make"".
But the new user, cloning git won't have a configure file, so he can't
just do "make".

And then, the text says: "so you can write instead". This brings me to
one alternative (not what I really should do), when in fact it should
be (I guess) the first instructions that new users need to follow.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Add more instructions about how to install git.

Erik Faye-Lund
On Tue, Sep 8, 2009 at 4:24 PM, Thiago Farina<[hidden email]> wrote:
> I tried to being more explicit about what the new users has to do. The
> first instruction that the text says is: "Normaly you can just do
> "make"".
> But the new user, cloning git won't have a configure file, so he can't
> just do "make".

I think you are confused. There's a default Makefile there, so a
normal user CAN just call "make". What a new user can't do, is to call
"./configure" without generating the configure-script first. There are
already instructions on how to do this.

--
Erik "kusma" Faye-Lund
[hidden email]
(+47) 986 59 656
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Add more instructions about how to install git.

Johannes Sixt-2
In reply to this post by Thiago Farina-2
Thiago Farina schrieb:
> I tried to being more explicit about what the new users has to do. The
> first instruction that the text says is: "Normaly you can just do
> "make"".
> But the new user, cloning git won't have a configure file, so he can't
> just do "make".
>
> And then, the text says: "so you can write instead". This brings me to
> one alternative (not what I really should do), when in fact it should
> be (I guess) the first instructions that new users need to follow.

Then guessed wrong. You really only have to say "make". The use of
autoconf and ./configure is purely optional and not necessary.

-- Hannes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Add more instructions about how to install git.

Thiago Farina-2
On Tue, Sep 8, 2009 at 10:38 AM, Johannes Sixt<[hidden email]> wrote:

> Thiago Farina schrieb:
>> I tried to being more explicit about what the new users has to do. The
>> first instruction that the text says is: "Normaly you can just do
>> "make"".
>> But the new user, cloning git won't have a configure file, so he can't
>> just do "make".
>>
>> And then, the text says: "so you can write instead". This brings me to
>> one alternative (not what I really should do), when in fact it should
>> be (I guess) the first instructions that new users need to follow.
>
> Then guessed wrong. You really only have to say "make". The use of
> autoconf and ./configure is purely optional and not necessary.
I don't think so.
Running only "make".
$ make
GIT_VERSION = 1.6.5.rc0
    * new build flags or prefix
    CC fast-import.o
In file included from builtin.h:4,
                 from fast-import.c:143:
git-compat-util.h:129:25: error: openssl/ssl.h: No such file or directory
git-compat-util.h:130:25: error: openssl/err.h: No such file or directory
In file included from builtin.h:6,
                 from fast-import.c:143:
cache.h:8:21: error: openssl/sha.h: No such file or directory
In file included from fast-import.c:152:
csum-file.h:10: error: expected specifier-qualifier-list before ‘SHA_CTX’
fast-import.c: In function ‘create_index’:
fast-import.c:850: error: ‘SHA_CTX’ undeclared (first use in this function)
fast-import.c:850: error: (Each undeclared identifier is reported only once
fast-import.c:850: error: for each function it appears in.)
fast-import.c:850: error: expected ‘;’ before ‘ctx’
fast-import.c:886: warning: implicit declaration of function ‘SHA1_Init’
fast-import.c:886: error: ‘ctx’ undeclared (first use in this function)
fast-import.c:891: warning: implicit declaration of function ‘SHA1_Update’
fast-import.c:896: warning: implicit declaration of function ‘SHA1_Final’
fast-import.c: In function ‘store_object’:
fast-import.c:1035: error: ‘SHA_CTX’ undeclared (first use in this function)
fast-import.c:1035: error: expected ‘;’ before ‘c’
fast-import.c:1040: error: ‘c’ undeclared (first use in this function)
fast-import.c: In function ‘validate_raw_date’:
fast-import.c:1750: warning: ignoring return value of ‘strtoul’,
declared with attribute warn_unused_result
fast-import.c:1758: warning: ignoring return value of ‘strtoul’,
declared with attribute warn_unused_result
make: *** [fast-import.o] Error 1

Running configure and then make
$ make configure
GIT_VERSION = 1.6.5.rc0.dirty
    GEN configure
$ make
    CC fast-import.o
In file included from builtin.h:4,
                 from fast-import.c:143:
git-compat-util.h:129:25: error: openssl/ssl.h: No such file or directory
git-compat-util.h:130:25: error: openssl/err.h: No such file or directory
In file included from builtin.h:6,
                 from fast-import.c:143:
cache.h:8:21: error: openssl/sha.h: No such file or directory
In file included from fast-import.c:152:
csum-file.h:10: error: expected specifier-qualifier-list before ‘SHA_CTX’
fast-import.c: In function ‘create_index’:
fast-import.c:850: error: ‘SHA_CTX’ undeclared (first use in this function)
fast-import.c:850: error: (Each undeclared identifier is reported only once
fast-import.c:850: error: for each function it appears in.)
fast-import.c:850: error: expected ‘;’ before ‘ctx’
fast-import.c:886: warning: implicit declaration of function ‘SHA1_Init’
fast-import.c:886: error: ‘ctx’ undeclared (first use in this function)
fast-import.c:891: warning: implicit declaration of function ‘SHA1_Update’
fast-import.c:896: warning: implicit declaration of function ‘SHA1_Final’
fast-import.c: In function ‘store_object’:
fast-import.c:1035: error: ‘SHA_CTX’ undeclared (first use in this function)
fast-import.c:1035: error: expected ‘;’ before ‘c’
fast-import.c:1040: error: ‘c’ undeclared (first use in this function)
fast-import.c: In function ‘validate_raw_date’:
fast-import.c:1750: warning: ignoring return value of ‘strtoul’,
declared with attribute warn_unused_result
fast-import.c:1758: warning: ignoring return value of ‘strtoul’,
declared with attribute warn_unused_result
make: *** [fast-import.o] Error 1

Now autconf, ./configure, make.
$ autoconf
$ ./configure
configure: Setting lib to 'lib' (the default)
configure: Will try -pthread then -lpthread to enable POSIX Threads.
configure: CHECKS for site configuration
configure: CHECKS for programs
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking if linker supports -R... no
checking if linker supports -Wl,-rpath,... yes
checking for gar... no
checking for ar... ar
checking for gtar... no
checking for tar... tar
checking for asciidoc... asciidoc
checking for asciidoc version... asciidoc 8.2.7 > 7
configure: CHECKS for libraries
checking for SHA1_Init in -lcrypto... no
checking for SHA1_Init in -lssl... no
checking for curl_global_init in -lcurl... yes
checking for XML_ParserCreate in -lexpat... yes
checking for iconv in -lc... yes
checking for deflateBound in -lz... yes
checking for socket in -lc... yes
checking for hstrerror in -lc... yes
checking for basename in -lc... yes
configure: CHECKS for header files
checking how to run the C preprocessor... cc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for old iconv()... no
configure: CHECKS for typedefs, structures, and compiler characteristics
checking for struct dirent.d_ino... yes
checking for struct dirent.d_type... yes
checking for struct sockaddr_storage... yes
checking for struct addrinfo... yes
checking for getaddrinfo... yes
checking for library containing getaddrinfo... none required
checking whether formatted IO functions support C99 size specifiers... yes
checking whether system succeeds to read fopen'ed directory... no
checking whether snprintf() and/or vsnprintf() return bogus value... no
configure: CHECKS for library functions
checking libgen.h usability... yes
checking libgen.h presence... yes
checking for libgen.h... yes
checking for strcasestr... yes
checking for library containing strcasestr... none required
checking for memmem... yes
checking for library containing memmem... none required
checking for strlcpy... no
checking for uintmax_t... yes
checking for strtoumax... yes
checking for library containing strtoumax... none required
checking for setenv... yes
checking for library containing setenv... none required
checking for unsetenv... yes
checking for library containing unsetenv... none required
checking for mkdtemp... yes
checking for library containing mkdtemp... none required
checking for mkstemps... no
checking Checking for POSIX Threads with '-pthread'... yes
configure: creating ./config.status
config.status: error: cannot find input file: config.mak.in
$ make

Now it compiles everything.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Add more instructions about how to install git.

Mikael Magnusson
2009/9/8 Thiago Farina <[hidden email]>:

> On Tue, Sep 8, 2009 at 10:38 AM, Johannes Sixt<[hidden email]> wrote:
>> Thiago Farina schrieb:
>>> I tried to being more explicit about what the new users has to do. The
>>> first instruction that the text says is: "Normaly you can just do
>>> "make"".
>>> But the new user, cloning git won't have a configure file, so he can't
>>> just do "make".
>>>
>>> And then, the text says: "so you can write instead". This brings me to
>>> one alternative (not what I really should do), when in fact it should
>>> be (I guess) the first instructions that new users need to follow.
>>
>> Then guessed wrong. You really only have to say "make". The use of
>> autoconf and ./configure is purely optional and not necessary.
> I don't think so.
> Running only "make".
> $ make
> GIT_VERSION = 1.6.5.rc0
>    * new build flags or prefix
>    CC fast-import.o
> In file included from builtin.h:4,
>                 from fast-import.c:143:
> git-compat-util.h:129:25: error: openssl/ssl.h: No such file or directory
> git-compat-util.h:130:25: error: openssl/err.h: No such file or directory
[snip]

You need to edit the Makefile if your system needs tweaks, there are tons
of comments.

> Running configure and then make
> $ make configure
> GIT_VERSION = 1.6.5.rc0.dirty
>    GEN configure
> $ make
>    CC fast-import.o
> In file included from builtin.h:4,
>                 from fast-import.c:143:
> git-compat-util.h:129:25: error: openssl/ssl.h: No such file or directory
> git-compat-util.h:130:25: error: openssl/err.h: No such file or directory

You forgot to run configure.

> Now autconf, ./configure, make.
> $ autoconf
> $ ./configure
> configure: Setting lib to 'lib' (the default)
> configure: Will try -pthread then -lpthread to enable POSIX Threads.
> configure: CHECKS for site configuration
> configure: CHECKS for programs
[...]
> checking for mkstemps... no
> checking Checking for POSIX Threads with '-pthread'... yes
> configure: creating ./config.status
> config.status: error: cannot find input file: config.mak.in
> $ make
>
> Now it compiles everything.

--
Mikael Magnusson
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Add more instructions about how to install git.

Brian Gernhardt-2
In reply to this post by Thiago Farina-2

On Sep 8, 2009, at 10:52 AM, Thiago Farina wrote:

> On Tue, Sep 8, 2009 at 10:38 AM, Johannes Sixt<[hidden email]>  
> wrote:
>> Then guessed wrong. You really only have to say "make". The use of
>> autoconf and ./configure is purely optional and not necessary.
> I don't think so.
> Running only "make".
> $ make
> GIT_VERSION = 1.6.5.rc0
>    * new build flags or prefix
>    CC fast-import.o
> In file included from builtin.h:4,
>                 from fast-import.c:143:
> git-compat-util.h:129:25: error: openssl/ssl.h: No such file or  
> directory
> git-compat-util.h:130:25: error: openssl/err.h: No such file or  
> directory

You don't have OpenSSL, a perquisite mentioned in the INSTALL file at  
line 55.  You can do the following:

make NO_OPENSSL=Yes

or save the option so you don't have to retype it each time:

echo "NO_OPENSSL=Yes" > config.mak
make

Or install OpenSSL or run the autoconf.

The Makefile tries it's best to be as smart as possible without being  
a configure script of it's own (see ll. 656-925), and it's highly  
commented at the beginning so that only a minimal knowledge of make is  
required (ll. 4-198).  I suppose we could  note that the defines  
should be put in a config.mak file.

> Running configure and then make
> $ make configure
> GIT_VERSION = 1.6.5.rc0.dirty
>    GEN configure

  $ ./configure
[lots of output]
> $ make
>    CC fast-import.o

As pointed out before, you forgot to run the generated configure  
script (as already documented at Makefile:20).

However, it's generally considered preferable to hand-create a  
config.mak for the few options you need on a regular basis and let the  
Makefile do it's work.  The autoconf files occasionally lag behind the  
rest of development as they're not widely used by git developers  
(AFAICT).

I'd personally argue that we should point out in INSTALL that git can  
be configured via a hand-written config.mak using the defines  
described at the top of the Makefile before we talk about using  
autoconf.  (Perhaps with quick notes about the most commonly used  
defines.)

For example, my config.mak contains:

prefix=/usr/local
ASCIIDOC8=Yes
MAN_BOLD_LITERAL=Yes
BLK_SHA1=Yes

The rest of the configuration for my OS (OS X/Darwin, specifically)  
are handled by the Makefile.

~~ Brian
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Add more instructions about how to install git.

Matthieu Moy-2
In reply to this post by Thiago Farina-2
Thiago Farina <[hidden email]> writes:

> Running only "make".
> $ make

[...]

> Running configure and then make
> $ make configure
> GIT_VERSION = 1.6.5.rc0.dirty
>     GEN configure
> $ make

[...]

What about trying to do what the INSTALL file suggests, then?

| Alternatively you can use autoconf generated ./configure script to
| set up install paths (via config.mak.autogen), so you can write
| instead
|
|         $ make configure ;# as yourself
|         $ ./configure --prefix=/usr ;# as yourself
|         $ make all doc ;# as yourself
|         # make install install-doc install-html;# as root

You did the first line, but the three next one give you instructions
that you didn't follow. These instructions start line 16 of the
INSTALL file, that is, in the first screen when viewing the file with
a reasonable window size.

I tend to disagree with the mainainer that the configure should be the
"alternate" and plain make the recommanded way, but the configure
script is there, it works, it's documented early enough in the INSTALL
file, so what's the problem?

--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html