Chicken/egg problem building from a 'git clone'

7 messages, 4 authors, 2016-06-15 · open the first message on its own page

Chicken/egg problem building from a 'git clone'

From: Joi Ellis <hidden>
Date: 2016-06-15 22:46:06

I have an elderly laptop.  I can build and install git using a tarball.  I 
original installed git 1.6.0.  This evening I noticed 1.6.1 was availble, and I 
decided to try building from the git repository using 'git clone' as described 
in the git home page.   And to jump ahead of myself, I want to point out that 
1.6.1 will build from the tarball.  However...

The workspace I get using 'git clone' does not provide a configure file.  And 
because my laptop isn't running a bleeding edge distribution, my build tools 
are older than you'd expect, so...

"make all" fails becuase my libaries are old:

    LINK git-fast-import
fast-import.o: In function `store_object':
/usr/local/src/git/git/fast-import.c:1086: undefined reference to `deflateBound'
/usr/local/src/git/git/fast-import.c:1109: undefined reference to `deflateBound'

"make configure" fails because my autoconf is too old.

    GEN configure
Usage: autoconf [-h] [--help] [-m dir] [--macrodir=dir]
       [-l dir] [--localdir=dir] [--version] [template-file]
make: *** [configure] Error 1

This found an issue with the Makefile, because my autoconf is sooo old, it's 
puking on the configure target build command, in part:

  autoconf -o $@ $<+ && \

because this old autoconf doesn't have a -o parameter.  If I change the
Makefile to:

  autoconf $<+ >$@ && \

Then the error becomes
    GEN configure
FATAL ERROR: Autoconf version 2.59 or higher is required for this script
make: *** [configure] Error 2

which is closer to what you intended.  I'm not sure what difference it makes 
between specifying -o and simply letting it default.

Anyway, would it break anything to have a 'configure' script provided as part 
of the clone pull?  It's provided in the tarball, and if I copy the 1.6.1 
configure script into my git workspace and run it, it seems to build.  I'm just 
not sure I trust it to be up-to-date with the configure script you folks can 
generate with your modern build tools using 'make configure'.

I realize the configure script is technically a build target but not having it 
does cause this chicken-egg issue on older platforms.

Re: Chicken/egg problem building from a 'git clone'

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:46:06

Hi,

On Fri, 6 Feb 2009, Joi Ellis wrote:
"make all" fails becuase my libaries are old:

    LINK git-fast-import
fast-import.o: In function `store_object':
/usr/local/src/git/git/fast-import.c:1086: undefined reference to `deflateBound'
/usr/local/src/git/git/fast-import.c:1109: undefined reference to `deflateBound'
You need to install a newer libz.  (And this is not a chicken & egg 
problem.)

Ciao,
Dscho

Re: Chicken/egg problem building from a 'git clone'

From: Björn Steinbrink <hidden>
Date: 2016-06-15 22:46:06

On 2009.02.06 04:09:24 +0000, Joi Ellis wrote:
"make all" fails becuase my libaries are old:

    LINK git-fast-import
fast-import.o: In function `store_object':
/usr/local/src/git/git/fast-import.c:1086: undefined reference to `deflateBound'
/usr/local/src/git/git/fast-import.c:1109: undefined reference to `deflateBound'
You can define NO_DEFLATE_BOUND. That and a bunch of other things you
can control are documented within the Makefile. No need for configure.

Björn

Re: Chicken/egg problem building from a 'git clone'

From: Joi Ellis <hidden>
Date: 2016-06-15 22:46:06

On Fri, 6 Feb 2009, Johannes Schindelin wrote:
Hi,

On Fri, 6 Feb 2009, Joi Ellis wrote:
quoted
"make all" fails becuase my libaries are old:

    LINK git-fast-import
fast-import.o: In function `store_object':
/usr/local/src/git/git/fast-import.c:1086: undefined reference to `deflateBound'
/usr/local/src/git/git/fast-import.c:1109: undefined reference to `deflateBound'
You need to install a newer libz.  (And this is not a chicken & egg 
problem.)
Yes, this *is* a chicken & egg problem.  As I said in my original post,
git will build on this machine if I have a configure script to run
first.  The configure script explicitly checks for the version of libz
and sets a DEFINE appropriately.  Because there is no configure script
provided, and because my autoconf is considered too old, I simply can't
start the build process because I can't generate the missing configure
script.

Other projects put the configure script into source control to avoid
exactly this issue.

-- 
Joi Ellis                    
gyles19@visi.com

No matter what we think of Linux versus FreeBSD, etc., the one thing I
really like about Linux is that it has Microsoft worried.  Anything
that kicks a monopoly in the pants has got to be good for something.
           - Chris Johnson

Re: Chicken/egg problem building from a 'git clone'

From: Björn Steinbrink <hidden>
Date: 2016-06-15 22:46:06

On 2009.02.05 22:45:13 -0600, Joi Ellis wrote:
On Fri, 6 Feb 2009, Johannes Schindelin wrote:
quoted
Hi,

On Fri, 6 Feb 2009, Joi Ellis wrote:
quoted
"make all" fails becuase my libaries are old:

    LINK git-fast-import
fast-import.o: In function `store_object':
/usr/local/src/git/git/fast-import.c:1086: undefined reference to `deflateBound'
/usr/local/src/git/git/fast-import.c:1109: undefined reference to `deflateBound'
You need to install a newer libz.  (And this is not a chicken & egg 
problem.)
Yes, this *is* a chicken & egg problem.
No, it's not. It would be one if you needed git to update your zlib or
autoconf. But you don't, so you could simply update zlib or autoconf.
There's no circular dependency. You can even just do "make
NO_DEFLATE_BOUND=1" and be done with it...

Björn

Re: Chicken/egg problem building from a 'git clone'

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:46:06

Hi,

On Thu, 5 Feb 2009, Joi Ellis wrote:
On Fri, 6 Feb 2009, Johannes Schindelin wrote:
quoted
On Fri, 6 Feb 2009, Joi Ellis wrote:
quoted
"make all" fails becuase my libaries are old:

    LINK git-fast-import
fast-import.o: In function `store_object':
/usr/local/src/git/git/fast-import.c:1086: undefined reference to `deflateBound'
/usr/local/src/git/git/fast-import.c:1109: undefined reference to `deflateBound'
You need to install a newer libz.  (And this is not a chicken & egg 
problem.)
Yes, this *is* a chicken & egg problem.
No it is _not_.

A chicken and egg problem would be if your problem would go away if Git 
compiled cleanly.  But it does not.
As I said in my original post, git will build on this machine if I have 
a configure script to run first.  The configure script explicitly checks 
for the version of libz and sets a DEFINE appropriately.
So why don't you DEFINE the thing explicitely?  From reading the Makefile, 
it appears as if

	$ make NO_DEFLATE_BOUND=YesPlease

should make it compile.  Of course, the documentation in the first part of 
the Makefile could be better, maybe you have suggestions?

Hth,
Dscho

Re: Chicken/egg problem building from a 'git clone'

From: Daniel Barkalow <hidden>
Date: 2016-06-15 22:46:07

On Fri, 6 Feb 2009, Joi Ellis wrote:
I have an elderly laptop.  I can build and install git using a tarball.  I 
original installed git 1.6.0.  This evening I noticed 1.6.1 was availble, and I 
decided to try building from the git repository using 'git clone' as described 
in the git home page.   And to jump ahead of myself, I want to point out that 
1.6.1 will build from the tarball.  However...

The workspace I get using 'git clone' does not provide a configure file.  And 
because my laptop isn't running a bleeding edge distribution, my build tools 
are older than you'd expect, so...

"make all" fails becuase my libaries are old:

    LINK git-fast-import
fast-import.o: In function `store_object':
/usr/local/src/git/git/fast-import.c:1086: undefined reference to `deflateBound'
/usr/local/src/git/git/fast-import.c:1109: undefined reference to `deflateBound'
What zlib version do you have? If your libraries are old enough, git's 
cache.h header file should effectively enable NO_DEFLATE_BOUND. Maybe you 
have skew between your header files and the libraries the linker finds by 
default? Or maybe we should consider any zlib without a version in the 
header file old enough not to have deflateBound()?

	-Daniel
*This .sig left intentionally blank*
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help