Daniel Stenberg | 1 Aug 2012 23:45
Picon
Favicon
Gravatar

Bug in metalink build (fwd)

FYI

-- 

  / daniel.haxx.se

---------- Forwarded message ----------
Date: Wed, 1 Aug 2012 13:23:53
From: Daniel Johnson <daniel.johnson31 <at> gmail.com>
Reply-To: libcurl development <curl-library <at> cool.haxx.se>
To: libcurl development <curl-library <at> cool.haxx.se>
Subject: Bug in metalink build

When building curl 7.27.0 on Mac OS X and metalink enabled, linking the curl tool failed with unresolved
symbol errors. When using metalink, curl needs to link to a crypto library to access the hash functions but
doesn't when linking. As a quick hack, I added -lcrypto (I'm using OpenSSL) to LIBMETALINK_LIBS in
src/Makefile and it now builds. The real fix is to add the appropriate crypto lib to LIBMETALINK_LIBS in configure.

Daniel

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Tatsuhiro Tsujikawa | 2 Aug 2012 14:00
Picon
Gravatar

Re: Bug in metalink build (fwd)

On Thu, Aug 2, 2012 at 6:45 AM, Daniel Stenberg <daniel <at> haxx.se> wrote:
> FYI
>
> --
>
>  / daniel.haxx.se
>
>
> ---------- Forwarded message ----------
> Date: Wed, 1 Aug 2012 13:23:53
> From: Daniel Johnson <daniel.johnson31 <at> gmail.com>
> Reply-To: libcurl development <curl-library <at> cool.haxx.se>
> To: libcurl development <curl-library <at> cool.haxx.se>
> Subject: Bug in metalink build
>
> When building curl 7.27.0 on Mac OS X and metalink enabled, linking the curl
> tool failed with unresolved symbol errors. When using metalink, curl needs
> to link to a crypto library to access the hash functions but doesn't when
> linking. As a quick hack, I added -lcrypto (I'm using OpenSSL) to
> LIBMETALINK_LIBS in src/Makefile and it now builds. The real fix is to add
> the appropriate crypto lib to LIBMETALINK_LIBS in configure.
>

This may be related:
http://curl.haxx.se/mail/archive-2012-08/0002.html

What is the link command-line when you got unresolved symbol errors?

Best regards,

(Continue reading)

Daniel Stenberg | 7 Aug 2012 15:22
Picon
Favicon
Gravatar

Re: Bug in metalink build (fwd)

On Thu, 2 Aug 2012, Tatsuhiro Tsujikawa wrote:

>> When building curl 7.27.0 on Mac OS X and metalink enabled, linking the curl
>> tool failed with unresolved symbol errors. When using metalink, curl needs
>> to link to a crypto library to access the hash functions but doesn't when
>> linking. As a quick hack, I added -lcrypto
>
> This may be related: http://curl.haxx.se/mail/archive-2012-08/0002.html
>
> What is the link command-line when you got unresolved symbol errors?

I don't think it is related. The problem is rather that the metalink code in 
curl now wrongly assumes OpenSSL or gcrypt to be present in the build and if 
neither is there the build will fail.

I'm not sure what the best fix for this is...

--

-- 

  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Tatsuhiro Tsujikawa | 11 Aug 2012 15:40
Picon
Gravatar

Re: Bug in metalink build (fwd)

On Tue, Aug 7, 2012 at 10:22 PM, Daniel Stenberg <daniel <at> haxx.se> wrote:
> On Thu, 2 Aug 2012, Tatsuhiro Tsujikawa wrote:
>
>>> When building curl 7.27.0 on Mac OS X and metalink enabled, linking the
>>> curl
>>> tool failed with unresolved symbol errors. When using metalink, curl
>>> needs
>>> to link to a crypto library to access the hash functions but doesn't when
>>> linking. As a quick hack, I added -lcrypto
>>
>>
>> This may be related: http://curl.haxx.se/mail/archive-2012-08/0002.html
>>
>> What is the link command-line when you got unresolved symbol errors?
>
>
> I don't think it is related. The problem is rather that the metalink code in
> curl now wrongly assumes OpenSSL or gcrypt to be present in the build and if
> neither is there the build will fail.
>

You are right.

> I'm not sure what the best fix for this is...
>

The one possible fix is that provide default hash check functions for
non-OpenSSL/GNUTLS/darwin-ssl using SHA1/256 implementations Guenter
described in
[1]. If you agree with this solution, I'll write a patch.
(Continue reading)

Daniel Stenberg | 21 Aug 2012 14:20
Picon
Favicon
Gravatar

Re: Bug in metalink build (fwd)

On Sat, 11 Aug 2012, Tatsuhiro Tsujikawa wrote:

> The one possible fix is that provide default hash check functions for
> non-OpenSSL/GNUTLS/darwin-ssl using SHA1/256 implementations Guenter
> described in
> [1]. If you agree with this solution, I'll write a patch.
>
> [1] http://curl.haxx.se/mail/lib-2012-07/0290.html

No. As you might've seen in the list I didn't approve.

libcurl only implements code to make sure the API is functional, and clearly 
in that case libcurl can manage without having those crypto functions around 
so we should not add them to libcurl.

In that case, it is strictly speaking libmetalink or possibly curl itself that 
should provide the necessary functions.

--

-- 

  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Tatsuhiro Tsujikawa | 21 Aug 2012 15:11
Picon
Gravatar

Re: Bug in metalink build (fwd)

Hi,

On Tue, Aug 21, 2012 at 9:20 PM, Daniel Stenberg <daniel <at> haxx.se> wrote:
> On Sat, 11 Aug 2012, Tatsuhiro Tsujikawa wrote:
>
>> The one possible fix is that provide default hash check functions for
>> non-OpenSSL/GNUTLS/darwin-ssl using SHA1/256 implementations Guenter
>> described in
>> [1]. If you agree with this solution, I'll write a patch.
>>
>> [1] http://curl.haxx.se/mail/lib-2012-07/0290.html
>
>
> No. As you might've seen in the list I didn't approve.
>
> libcurl only implements code to make sure the API is functional, and clearly
> in that case libcurl can manage without having those crypto functions around
> so we should not add them to libcurl.
>
> In that case, it is strictly speaking libmetalink or possibly curl itself
> that should provide the necessary functions.
>

It seems my words were a little bit short, my proposal is adding
default SHA1/256 implementation to *curl tool*, not to libcurl.
I understand your point and agree with that.
I'm sorry for the confusion.

Best regards,

(Continue reading)


Gmane