Error running/configuring git 1.7.1

From: Michael Cox <hidden>
Date: 2016-06-15 22:49:01

I downloaded the latest tarball (git-1.7.1) and tried to install it on
Redhat Linux Server release 5.3 (Tikanga) using:

./configure --prefix=$HOME/tool-1.1 --with-curl -with-expat -with-openssl
make
make install

When I try to run

git clone http://www.kernel.org/pub/scm/git/git.git

I get the error message:

fatal: Unable to find remote helper for 'http'

I looked at the config.log file and found the following anomaly:

configure:3165: checking for curl_global_init in -lcurl
configure:3195: cc -o conftest -g -O2   conftest.c -lcurl   >&5
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../libcurl.so: undefined reference to
 `tld_strerror'
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../libcurl.so: undefined reference to
 `idna_strerror'
collect2: ld returned 1 exit status
configure:3201: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME "git"
| #define PACKAGE_TARNAME "git"
| #define PACKAGE_VERSION "1.7.1"
| #define PACKAGE_STRING "git 1.7.1"
| #define PACKAGE_BUGREPORT "git@vger.kernel.org"
| /* end confdefs.h.  */
|
| /* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char curl_global_init ();
| int
| main ()
| {
| curl_global_init ();
|   ;
|   return 0;
| }
configure:3227: result: no

Googling for  tld_strerror and idna_strerror, I found that a library,
libidna contains idna_strerror.  When I run

curl-config --libs

I get

-L/usr/kerberos/lib -lcurl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err
-lresolv -ldl -lidn -lssl -lcrypto -lz

So it looks like the configure test should (at least) add -lidna.

I did a "make clean" and re-ran the build using:

LDFLAGS="-lidn -lssl -lcrypto -lz" ./configure --prefix=$HOME/tool-1.1
--with-curl -with-expat -with-openssl
make
make install

Running "git clone http://www.kernel.org/pub/scm/git/git.git" works now.


Michael

P.S.  The same problem occurs on 1.7.0.6.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help