git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* recent patch breaks the build ?
@ 2005-11-16 17:17 Andrew Wozniak
  2005-11-16 19:15 ` Junio C Hamano
  2005-11-17 12:00 ` Johannes Schindelin
  0 siblings, 2 replies; 15+ messages in thread
From: Andrew Wozniak @ 2005-11-16 17:17 UTC (permalink / raw)
  To: git

Hello,

Have just started using git for u-boot related development. After 
downloading git-snapshot-20051116 tarball and attempting a build under 
RH7.2, I get the following failure:

gcc -o http-fetch.o -c -g -O2 -Wall -DSHA1_HEADER='<openssl/sha.h>' 
http-fetch.c
http-fetch.c: In function `fetch_alternates':
http-fetch.c:911: warning: implicit declaration of function 
`curl_multi_perform'
http-fetch.c:911: `curlm' undeclared (first use in this function)
<snip>

It appears that a recent patch "Fix for multiple alternates requests in 
http" references curlm without the necessary #ifdef USE_CURL_MULTI

I'm not that familiar with the git architecture and codebase, so any 
suggestions for a workaround are much appreciated.

Thank you

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: recent patch breaks the build ?
  2005-11-16 17:17 recent patch breaks the build ? Andrew Wozniak
@ 2005-11-16 19:15 ` Junio C Hamano
  2005-11-16 19:47   ` Andrew Wozniak
  2005-11-17 12:00 ` Johannes Schindelin
  1 sibling, 1 reply; 15+ messages in thread
From: Junio C Hamano @ 2005-11-16 19:15 UTC (permalink / raw)
  To: Andrew Wozniak; +Cc: git, Nick Hengeveld

Andrew Wozniak <awozniak@mc.com> writes:

> Have just started using git for u-boot related development. After 
> downloading git-snapshot-20051116 tarball and attempting a build under 
> RH7.2, I get the following failure:

Would this help?

-- >8 --

diff --git a/http-fetch.c b/http-fetch.c
index 21cc1b9..45e97f9 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -902,16 +902,18 @@ static void fetch_alternates(char *base)
 	char *data;
 	struct active_request_slot *slot;
 	static struct alt_request alt_req;
-	int num_transfers;
 
+#ifdef USE_CURL_MULTI
 	/* If another request has already started fetching alternates,
 	   wait for them to arrive and return to processing this request's
 	   curl message */
 	while (got_alternates == 0) {
+		int num_transfers;
 		curl_multi_perform(curlm, &num_transfers);
 		process_curl_messages();
 		process_request_queue();
 	}
+#endif
 
 	/* Nothing to do if they've already been fetched */
 	if (got_alternates == 1)

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: recent patch breaks the build ?
  2005-11-16 19:15 ` Junio C Hamano
@ 2005-11-16 19:47   ` Andrew Wozniak
  2005-11-16 20:18     ` Andreas Ericsson
                       ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Andrew Wozniak @ 2005-11-16 19:47 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Nick Hengeveld

Yes, that suggestion worked - it is similar to other code fragments and 
ifdefs within the same file.

Unfortunately, now there are other failures:

gcc -o http-push.o -c -g -O2 -Wall -DSHA1_HEADER='<openssl/sha.h>' 
http-push.c
http-push.c: In function `start_mkcol':
http-push.c:479: `CURLOPT_HTTPGET' undeclared (first use in this function)
http-push.c:479: (Each undeclared identifier is reported only once
http-push.c:479: for each function it appears in.)
http-push.c: In function `start_move':
http-push.c:581: `CURLOPT_HTTPGET' undeclared (first use in this function)
http-push.c: In function `refresh_lock':
http-push.c:615: `CURLOPT_HTTPGET' undeclared (first use in this function)
http-push.c: In function `fetch_index':
http-push.c:890: `CURLOPT_HTTPGET' undeclared (first use in this function)
http-push.c: In function `lock_remote':
http-push.c:1215: `CURLOPT_HTTPGET' undeclared (first use in this function)
http-push.c: In function `main':

I grep'd for these defines and they are nowhere to be found!  Is some 
other package needed to resolve these undefines on my RH7.2 build host?

I'm really surprised that the unmodified tarball source fails to build. 
Just curious, is the git project rebuilt on a "nightly" basis to verify 
recent patches?

Thanks again, Andrew

Junio C Hamano wrote:
> Andrew Wozniak <awozniak@mc.com> writes:
> 
>> Have just started using git for u-boot related development. After 
>> downloading git-snapshot-20051116 tarball and attempting a build under 
>> RH7.2, I get the following failure:
> 
> Would this help?
> 
> -- >8 --
> 
> diff --git a/http-fetch.c b/http-fetch.c
> index 21cc1b9..45e97f9 100644
> --- a/http-fetch.c
> +++ b/http-fetch.c
> @@ -902,16 +902,18 @@ static void fetch_alternates(char *base)
>  	char *data;
>  	struct active_request_slot *slot;
>  	static struct alt_request alt_req;
> -	int num_transfers;
>  
> +#ifdef USE_CURL_MULTI
>  	/* If another request has already started fetching alternates,
>  	   wait for them to arrive and return to processing this request's
>  	   curl message */
>  	while (got_alternates == 0) {
> +		int num_transfers;
>  		curl_multi_perform(curlm, &num_transfers);
>  		process_curl_messages();
>  		process_request_queue();
>  	}
> +#endif
>  
>  	/* Nothing to do if they've already been fetched */
>  	if (got_alternates == 1)
> 
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: recent patch breaks the build ?
  2005-11-16 19:47   ` Andrew Wozniak
@ 2005-11-16 20:18     ` Andreas Ericsson
  2005-11-16 20:25     ` Junio C Hamano
  2005-11-16 20:33     ` Nick Hengeveld
  2 siblings, 0 replies; 15+ messages in thread
From: Andreas Ericsson @ 2005-11-16 20:18 UTC (permalink / raw)
  To: Andrew Wozniak; +Cc: git

Andrew Wozniak wrote:
> Yes, that suggestion worked - it is similar to other code fragments and 
> ifdefs within the same file.
> 
> Unfortunately, now there are other failures:
> 
> gcc -o http-push.o -c -g -O2 -Wall -DSHA1_HEADER='<openssl/sha.h>' 
> http-push.c
> http-push.c: In function `start_mkcol':
> http-push.c:479: `CURLOPT_HTTPGET' undeclared (first use in this function)
> 

....

> I grep'd for these defines and they are nowhere to be found!  Is some 
> other package needed to resolve these undefines on my RH7.2 build host?
> 

curl and curl-devel. Or you can build with

	make NO_CURL=YesPlease

which just means you won't have http and https transports available. 
This shouldn't be much of a problem on a server though.

> I'm really surprised that the unmodified tarball source fails to build. 
> Just curious, is the git project rebuilt on a "nightly" basis to verify 
> recent patches?
> 

I have no idea, but since it's a developer tool in pre-1.0 I think the 
general consensus is that user-friendliness in the build-process comes 
somewhere between "not so important" and "what? users? oh, those living 
in the *other* land!"

Perhaps you should try the RPM's at 
http://www.kernel.org/pub/software/scm/git-core/ ?

If nothing else it will tell you what other packages you need.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: recent patch breaks the build ?
  2005-11-16 19:47   ` Andrew Wozniak
  2005-11-16 20:18     ` Andreas Ericsson
@ 2005-11-16 20:25     ` Junio C Hamano
  2005-11-16 20:33     ` Nick Hengeveld
  2 siblings, 0 replies; 15+ messages in thread
From: Junio C Hamano @ 2005-11-16 20:25 UTC (permalink / raw)
  To: git

Andrew Wozniak <awozniak@mc.com> writes:

> Unfortunately, now there are other failures:
> ...
> I grep'd for these defines and they are nowhere to be found!  Is some 
> other package needed to resolve these undefines on my RH7.2 build host?

Probably.  Maybe you can look at INSTALL and report missing
dependencies?  Also the top of the Makefile (huge ugly comment
section).

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: recent patch breaks the build ?
  2005-11-16 19:47   ` Andrew Wozniak
  2005-11-16 20:18     ` Andreas Ericsson
  2005-11-16 20:25     ` Junio C Hamano
@ 2005-11-16 20:33     ` Nick Hengeveld
  2005-11-16 23:25       ` Johannes Schindelin
  2 siblings, 1 reply; 15+ messages in thread
From: Nick Hengeveld @ 2005-11-16 20:33 UTC (permalink / raw)
  To: Andrew Wozniak; +Cc: Junio C Hamano, git

On Wed, Nov 16, 2005 at 02:47:56PM -0500, Andrew Wozniak wrote:

> Unfortunately, now there are other failures:
> 
> gcc -o http-push.o -c -g -O2 -Wall -DSHA1_HEADER='<openssl/sha.h>'
> http-push.c
> http-push.c: In function `start_mkcol':
> http-push.c:479: `CURLOPT_HTTPGET' undeclared (first use in this
> function)

http-push requires a curl option that looks like it was added around
version 7.8.1.  If you have the option to upgrade your version of curl,
it should fix the problem.  You can also disable building http-push but
keep http-fetch by defining NO_EXPAT.

-- 
For a successful technology, reality must take precedence over public
relations, for nature cannot be fooled.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: recent patch breaks the build ?
  2005-11-16 20:33     ` Nick Hengeveld
@ 2005-11-16 23:25       ` Johannes Schindelin
  2005-11-17  0:46         ` Nick Hengeveld
  0 siblings, 1 reply; 15+ messages in thread
From: Johannes Schindelin @ 2005-11-16 23:25 UTC (permalink / raw)
  To: Nick Hengeveld; +Cc: Andrew Wozniak, Junio C Hamano, git

Hi,

On Wed, 16 Nov 2005, Nick Hengeveld wrote:

> On Wed, Nov 16, 2005 at 02:47:56PM -0500, Andrew Wozniak wrote:
> 
> > Unfortunately, now there are other failures:
> > 
> > gcc -o http-push.o -c -g -O2 -Wall -DSHA1_HEADER='<openssl/sha.h>'
> > http-push.c
> > http-push.c: In function `start_mkcol':
> > http-push.c:479: `CURLOPT_HTTPGET' undeclared (first use in this
> > function)
> 
> http-push requires a curl option that looks like it was added around
> version 7.8.1.  If you have the option to upgrade your version of curl,
> it should fix the problem.  You can also disable building http-push but
> keep http-fetch by defining NO_EXPAT.

It was 7.8.1. I checked. You might want to add this somewhere:

#if LIBCURL_VERSION_NUM < 0x070801
#error http-push needs curl >= 7.8.1 (because of CURLOPT_HTTPGET)
#endif

I tried quite a few things to work around it. Alas, I am now convinced 
that no set of option setting does exactly the same thing as 
CURLOPT_HTTPGET for a specific curl version < 7.8.1 (the one I tested 
with).

Ciao,
Dscho
 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: recent patch breaks the build ?
  2005-11-16 23:25       ` Johannes Schindelin
@ 2005-11-17  0:46         ` Nick Hengeveld
  2005-11-17  1:15           ` Junio C Hamano
  0 siblings, 1 reply; 15+ messages in thread
From: Nick Hengeveld @ 2005-11-17  0:46 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Andrew Wozniak, Junio C Hamano, git

On Thu, Nov 17, 2005 at 12:25:06AM +0100, Johannes Schindelin wrote:

> It was 7.8.1. I checked. You might want to add this somewhere:
> 
> #if LIBCURL_VERSION_NUM < 0x070801
> #error http-push needs curl >= 7.8.1 (because of CURLOPT_HTTPGET)
> #endif

Is it worth trying to figure this out in the Makefile instead, using eg.
curl-config --vernum?

-- 
For a successful technology, reality must take precedence over public
relations, for nature cannot be fooled.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: recent patch breaks the build ?
  2005-11-17  0:46         ` Nick Hengeveld
@ 2005-11-17  1:15           ` Junio C Hamano
  2005-11-17  2:10             ` Nick Hengeveld
  0 siblings, 1 reply; 15+ messages in thread
From: Junio C Hamano @ 2005-11-17  1:15 UTC (permalink / raw)
  To: Nick Hengeveld; +Cc: git

Nick Hengeveld <nickh@reactrix.com> writes:

> On Thu, Nov 17, 2005 at 12:25:06AM +0100, Johannes Schindelin wrote:
>
>> #if LIBCURL_VERSION_NUM < 0x070801
>> #error http-push needs curl >= 7.8.1 (because of CURLOPT_HTTPGET)
>> #endif
>
> Is it worth trying to figure this out in the Makefile instead, using eg.
> curl-config --vernum?

If we can do that reliably, that would be very nice for the
users.  Might be worth a try.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: recent patch breaks the build ?
  2005-11-17  1:15           ` Junio C Hamano
@ 2005-11-17  2:10             ` Nick Hengeveld
  2005-11-17 10:33               ` Junio C Hamano
  0 siblings, 1 reply; 15+ messages in thread
From: Nick Hengeveld @ 2005-11-17  2:10 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Wed, Nov 16, 2005 at 05:15:40PM -0800, Junio C Hamano wrote:

> > Is it worth trying to figure this out in the Makefile instead, using eg.
> > curl-config --vernum?
> 
> If we can do that reliably, that would be very nice for the
> users.  Might be worth a try.

Well, it looks as though the --vernum option was added prior to 7.8.1,
so if it doesn't work it's safe to assume that curl is too old - more
than ~4.5 years old in this case.

Assuming --vernum does work, is there a reasonable/portable way to
compare two hex values like 070801?

-- 
For a successful technology, reality must take precedence over public
relations, for nature cannot be fooled.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: recent patch breaks the build ?
  2005-11-17  2:10             ` Nick Hengeveld
@ 2005-11-17 10:33               ` Junio C Hamano
  2005-11-17 11:15                 ` Johannes Schindelin
  0 siblings, 1 reply; 15+ messages in thread
From: Junio C Hamano @ 2005-11-17 10:33 UTC (permalink / raw)
  To: Nick Hengeveld; +Cc: git

Nick Hengeveld <nickh@reactrix.com> writes:

> Assuming --vernum does work, is there a reasonable/portable way to
> compare two hex values like 070801?

I would assume that it is always 6 lowercase hexdigits %06x when
supported, or showing nothing to stdout for ancient ones.

A horrible but probably portable way would be:

	case `(echo 070801; curl-config --vernum) 2>/dev/null |
        	sort -r | sed -ne 2p` in
	070801)
        	echo Happy ;;
        *)
        	echo Sad ;;
	esac

The obvious one is unfortunately not very portable:

	if test 070801 \< `curl-config --vernum`
        then
        	echo "Happy"
	else
        	echo "Sad"
	fi

This would work if your test is bash/dash-builtin.  The
following do not seem to know about '<' '>' string comparison:

	GNU /usr/bin/test from coreutils (version 5.2.1)
        OpenBSD shell builtin
        Solaris /usr/bin/test

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: recent patch breaks the build ?
  2005-11-17 10:33               ` Junio C Hamano
@ 2005-11-17 11:15                 ` Johannes Schindelin
  0 siblings, 0 replies; 15+ messages in thread
From: Johannes Schindelin @ 2005-11-17 11:15 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Nick Hengeveld, git

Hi,

On Thu, 17 Nov 2005, Junio C Hamano wrote:

> Nick Hengeveld <nickh@reactrix.com> writes:
> 
> > Assuming --vernum does work, is there a reasonable/portable way to
> > compare two hex values like 070801?
> 
> I would assume that it is always 6 lowercase hexdigits %06x when
> supported, or showing nothing to stdout for ancient ones.
> 
> A horrible but probably portable way would be:
> 
> 	case `(echo 070801; curl-config --vernum) 2>/dev/null |
>         	sort -r | sed -ne 2p` in
> 	070801)
>         	echo Happy ;;
>         *)
>         	echo Sad ;;
> 	esac

Horrible to read, but actually portable (and can be produced by a small 
script):

case "$NUMBER" in
07080[1-9] | \
0708[1-9]? | \
0709?? | \
07[1-9]??? | \
0[8-9]???? | \
[1-9]?????) echo "Yes";;
*) echo "No";;
esac

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: recent patch breaks the build ?
  2005-11-16 17:17 recent patch breaks the build ? Andrew Wozniak
  2005-11-16 19:15 ` Junio C Hamano
@ 2005-11-17 12:00 ` Johannes Schindelin
  2005-11-17 15:57   ` Nick Hengeveld
  1 sibling, 1 reply; 15+ messages in thread
From: Johannes Schindelin @ 2005-11-17 12:00 UTC (permalink / raw)
  To: Andrew Wozniak; +Cc: git

Hi,

On Wed, 16 Nov 2005, Andrew Wozniak wrote:

> It appears that a recent patch "Fix for multiple alternates requests in 
> http" references curlm without the necessary #ifdef USE_CURL_MULTI

Note that I had no success making http-fetch work without USE_CURL_MULTI. 
So maybe you can compile it, but maybe you experience the same problems as 
I had.

Hth,
Dscho

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: recent patch breaks the build ?
  2005-11-17 12:00 ` Johannes Schindelin
@ 2005-11-17 15:57   ` Nick Hengeveld
  2005-11-17 16:22     ` Johannes Schindelin
  0 siblings, 1 reply; 15+ messages in thread
From: Nick Hengeveld @ 2005-11-17 15:57 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Andrew Wozniak, git

On Thu, Nov 17, 2005 at 01:00:19PM +0100, Johannes Schindelin wrote:

> Note that I had no success making http-fetch work without USE_CURL_MULTI. 
> So maybe you can compile it, but maybe you experience the same problems as 
> I had.

http-fetch or http-push?

-- 
For a successful technology, reality must take precedence over public
relations, for nature cannot be fooled.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: recent patch breaks the build ?
  2005-11-17 15:57   ` Nick Hengeveld
@ 2005-11-17 16:22     ` Johannes Schindelin
  0 siblings, 0 replies; 15+ messages in thread
From: Johannes Schindelin @ 2005-11-17 16:22 UTC (permalink / raw)
  To: Nick Hengeveld; +Cc: Andrew Wozniak, git

Hi,

On Thu, 17 Nov 2005, Nick Hengeveld wrote:

> On Thu, Nov 17, 2005 at 01:00:19PM +0100, Johannes Schindelin wrote:
> 
> > Note that I had no success making http-fetch work without USE_CURL_MULTI. 
> > So maybe you can compile it, but maybe you experience the same problems as 
> > I had.
> 
> http-fetch or http-push?

Oops. IIRC it was when I was playing with http-push.

Sorry,
Dscho

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2005-11-17 16:22 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-16 17:17 recent patch breaks the build ? Andrew Wozniak
2005-11-16 19:15 ` Junio C Hamano
2005-11-16 19:47   ` Andrew Wozniak
2005-11-16 20:18     ` Andreas Ericsson
2005-11-16 20:25     ` Junio C Hamano
2005-11-16 20:33     ` Nick Hengeveld
2005-11-16 23:25       ` Johannes Schindelin
2005-11-17  0:46         ` Nick Hengeveld
2005-11-17  1:15           ` Junio C Hamano
2005-11-17  2:10             ` Nick Hengeveld
2005-11-17 10:33               ` Junio C Hamano
2005-11-17 11:15                 ` Johannes Schindelin
2005-11-17 12:00 ` Johannes Schindelin
2005-11-17 15:57   ` Nick Hengeveld
2005-11-17 16:22     ` Johannes Schindelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).