# Problems building git with custom curl installation

4 messages from 2008-03-07 to 2008-03-07. Participants: Ian Hinder, Stephen Sinclair, Johannes Schindelin, Jakub Narebski.
Thread: https://gitlist.dev/t/12552

## Ian Hinder, 2008-03-07 00:39

Subject: Problems building git with custom curl installation
Message-ID: <47D08EA7.8000607@gravity.psu.edu>
URL: https://gitlist.dev/e/47D08EA7.8000607%40gravity.psu.edu

```
Hi,

I have had some problems building git on a machine which does not have
the distro development packages for Curl installed.  I have installed it
from source, but there are some issues.

>From a clean download of git-1.5.4, I do:

./configure --prefix=/home/ian/software/git-1.5.4
--with-curl=/home/ian/software/curl-7.18.0

I get

  checking for curl_global_init in -lcurl... no

even though curl has been installed in /home/ian/software/curl-7.18.0

I do "make", and get

  /bin/sh: curl-config: command not found

but the make proceeds anyway. When linking, I get warnings

  cc: unrecognized option
'-R/usr/center/atlas1/numrel/software/curl-7.18.0/lib'
and "ldd git" gives

        libcurl.so.4 => not found

If I do

  NO_R_TO_GCC_LINKER=yes make

then things seem to work perfectly, and the rpath to curl is set in
the git executable.  In the course of debugging this problem, I also
found that LDFLAGS were not being passed from the configure command
line to the makefile.

I suggest that the following are bugs:

1. Configure: Specifying the curl location leads to output that
indicates that curl was not correctly located, even though a
subsequent make finds it successfully and includes it in the build.

2. Make: an error appears indicating that curl-config is not found,
which suggests that curl will not be used successfully, even though it
works fine.  It must not be looking for curl-config in the right
place, and it doesn't even seem to be necessary.

3. The use of the makefile option NO_R_TO_GCC_LINKER is not
automatically determined - perhaps an autoconf test could be written
for it?  All the machines I have tried give an error if you try to
give gcc a -R option, and gcc is being used as the linker.

4. LDFLAGS is not passed from the configure command line to the
makefile.  Modifying config.mak.in to contain the line LDFLAGS =
@LDFLAGS@ might be the appropriate fix.

-- 
Ian Hinder
hinder@gravity.psu.edu
http://www.gravity.psu.edu/~hinder

```

## Stephen Sinclair, 2008-03-07 01:37

Subject: Re: Problems building git with custom curl installation
Message-ID: <9b3e2dc20803061737l1832fb82g6532808b58a12ab5@mail.gmail.com>
URL: https://gitlist.dev/e/9b3e2dc20803061737l1832fb82g6532808b58a12ab5%40mail.gmail.com
In-Reply-To: <47D08EA7.8000607@gravity.psu.edu>

```
On Thu, Mar 6, 2008 at 7:39 PM, Ian Hinder <hinder@gravity.psu.edu> wrote:
[snip]
>  1. Configure: Specifying the curl location leads to output that
>  indicates that curl was not correctly located, even though a
>  subsequent make finds it successfully and includes it in the build.

I'd just like to add that configure also doesn't detect and warn about
a missing gettext package, which became evident to me today when I
tried compiling it on a newly installed machine.  The configure is
successful, but the build fails.


Steve

```

## Johannes Schindelin, 2008-03-07 02:17

Subject: Re: Problems building git with custom curl installation
Message-ID: <alpine.LSU.1.00.0803070317010.19395@racer.site>
URL: https://gitlist.dev/e/alpine.LSU.1.00.0803070317010.19395%40racer.site
In-Reply-To: <9b3e2dc20803061737l1832fb82g6532808b58a12ab5@mail.gmail.com>

```
Hi,

On Thu, 6 Mar 2008, Stephen Sinclair wrote:

> On Thu, Mar 6, 2008 at 7:39 PM, Ian Hinder <hinder@gravity.psu.edu> wrote:
> [snip]
> >  1. Configure: Specifying the curl location leads to output that
> >  indicates that curl was not correctly located, even though a
> >  subsequent make finds it successfully and includes it in the build.
> 
> I'd just like to add that configure also doesn't detect and warn about
> a missing gettext package, which became evident to me today when I
> tried compiling it on a newly installed machine.  The configure is
> successful, but the build fails.

You probably forgot to include the relevant output.

But I guess I know it already: msgfmt ist not found.  Alas, there are 
patches underway to fix that already.

Hth,
Dscho


```

## Jakub Narebski, 2008-03-07 13:40

Subject: Re: Problems building git with custom curl installation
Message-ID: <m3ejamhctv.fsf@localhost.localdomain>
URL: https://gitlist.dev/e/m3ejamhctv.fsf%40localhost.localdomain
In-Reply-To: <47D08EA7.8000607@gravity.psu.edu>

```
Ian Hinder <hinder@Gravity.PSU.Edu> writes:

> I suggest that the following are bugs:

> 3. The use of the makefile option NO_R_TO_GCC_LINKER is not
> automatically determined - perhaps an autoconf test could be written
> for it?  All the machines I have tried give an error if you try to
> give gcc a -R option, and gcc is being used as the linker.

I try to contribute to configure script, but I simply don't know how
robustly and in standard way to test if linker (gcc) accepts '-R'
option. Additionalyy, I don't have system where this is needed (it
fails), so I don't have a way to test if it works correctly.
 
> 1. Configure: Specifying the curl location leads to output that
> indicates that curl was not correctly located, even though a
> subsequent make finds it successfully and includes it in the build.

I guess that this bug is result of 3.

-- 
Jakub Narebski
Poland
ShadeHawk on #git

```
