git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Error compiling git

From
ASAnupam Srivastava <srivasta@itt.uni-stuttgart.de>
Date
Aug 19, 2007, 21:18 UTC
Message-ID
<46C8B39B.6060603@itt.uni-stuttgart.de>
In-Reply-To
<46C8AAC6.4060101@itt.uni-stuttgart.de>
Anupam Srivastava wrote:
Show 31 quoted lines
> Hello all!
> 
> I am trying to compile git. The catch is that my zlib is installed in 
> non-standard directory, namely: /tmp/dont.delete/fakeroot
> 
> Here are my environment varialbes:
> LDFLAGS=-L/tmp/dont.delete/fakeroot/lib
> LD_RUN_PATH="/tmp/dont.delete/fakeroot/lib
> CC="ccache cc -o3"
> 
> but after running make, the compilation stops ate linking with this error:
> <snip>
>     AR xdiff/lib.a
>     LINK git-convert-objects
> /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: 
> skipping incompatible /usr/lib/libz.so when searching for -lz
> /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: 
> skipping incompatible /usr/lib/libz.a when searching for -lz
> /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: 
> cannot find -lz
> collect2: ld returned 1 exit status
> make: *** [git-convert-objects] Error 1
> </snip>
> Which to my understating means that it is not even trying to find zlib 
> in /tmp/dont.delete/fakeroot
> 
> My way of compiling is:
> make configure
> ./configure --cache-file=config.cache --prefix=/tmp/dont.delete/fakeroot
> make
> 

Solved. Removed/updated manually CFLAGS and LDFLAGS in Makefile

This is, I suppose, a bug in Makefile then.

The configure script created by Makefile should update Makefile with the arguments passed to it.

Anupam
Previous: Anupam SrivastavaNext: Anupam Srivastava
Message 2 of 3 in “Error compiling git”
  1. Anupam SrivastavaAug 19, 2007
  2. Anupam SrivastavaAug 19, 2007
  3. Anupam SrivastavaAug 19, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.