public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Subject: Re: [ANNOUNCEMENT] Updated: curl 7.71.1-1
Date: Mon, 10 Aug 2020 19:27:52 -0600	[thread overview]
Message-ID: <71031f78-b1be-aec2-4e54-72ff49e07543@SystematicSw.ab.ca> (raw)
In-Reply-To: <d66364d2-06c4-3f8e-4989-2426ec9fde9d@cornell.edu>

[-- Attachment #1: Type: text/plain, Size: 5281 bytes --]

On 2020-08-10 13:14, Ken Brown via Cygwin wrote:
> On 8/10/2020 1:33 PM, Brian Inglis wrote:
>> On 2020-08-10 08:52, Ken Brown via Cygwin wrote:
>>> On 8/9/2020 5:48 PM, Brian Inglis wrote:
>>>> On 2020-08-09 12:28, Adam Dinwoodie wrote:
>>>>> On Fri, 24 Jul 2020 at 13:56, Adam Dinwoodie wrote:
>>>>>> In the failing case, the `/configure` stage includes the following
>>>>>> text: `configure: Setting CURL_LDFLAGS to '-lcurl -lnghttp2 -lidn2
>>>>>> -lssh -lpsl -lssl -lcrypto -lldap -llber -lbrotlidec -lbrotlidec
>>>>>> -lz'`; in the working case using -7.66.0-1, the corresponding line is
>>>>>> just `configure: Setting CURL_LDFLAGS to '-lcurl'`.
>>> [...]
>>>> Meanwhile, that info likely comes from:
>>>>
>>>> $ tail -vn15 /lib/pkgconfig/libcurl.pc
>>>> ==> /lib/pkgconfig/libcurl.pc <==
>>>> #
>>>> prefix=/usr
>>>> exec_prefix=/usr
>>>> libdir=${exec_prefix}/lib
>>>> includedir=${prefix}/include
>>>> supported_protocols="DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS LDAP LDAPS
>>>> POP3 POP3S RTSP SCP SFTP SMB SMBS SMTP SMTPS TELNET TFTP"
>>>> supported_features="SSL IPv6 UnixSockets libz brotli AsynchDNS IDN PSL NTLM
>>>> NTLM_WB TLS-SRP HTTP2 HTTPS-proxy"
>>>>
>>>> Name: libcurl
>>>> URL: https://curl.haxx.se/
>>>> Description: Library to transfer files with ftp, http, etc.
>>>> Version: 7.71.1
>>>> Libs: -L${libdir} -lcurl
>>>> Libs.private: -lnghttp2 -lidn2 -lssh -lpsl -lssl -lcrypto -lldap -llber
>>>> -lbrotlidec -lbrotlidec -lz
>>>> Cflags: -I${includedir}
>>>>
>>>> it looks like your git build should be using Libs for dynamic builds and adding
>>>> Libs.private for static builds
>>
>>> If you look at configure.ac in the git sources, you'll see that it uses
>>> curl-config, not pkg-config.  The former reports:
>>>
>>> $ curl-config --libs
>>> -lcurl -lnghttp2 -lidn2 -lssh -lpsl -lssl -lcrypto -lldap -llber -lbrotlidec
>>> -lbrotlidec -lz
>>>
>>> Yaakov's build of earlier versions of curl used a patch 7.33.0-libdeps.patch to
>>> prevent the unnecessary libs from being listed.  He even had a comment at the
>>> beginning of the patch, explaining the reason for it: "These are needed only for
>>> static linking, but we build with --disable-static".
>>
>> I try to avoid looking at autotools plumbing if I can possibly avoid it! ;^>
>> Someone cleaned up the approach used, as the patch did not apply and was dropped.
> 
> My point is that the patch shouldn't have been dropped.  It should have been
> modified to apply to the updated sources.  (I've done this.  See the attached.)
> As Yaakov wrote, the patch is needed to prevent 'curl-config --libs' from
> including libs that are only needed for static linking.
> 
> With the modified patch applied, curl-config gives the expected result:
> 
> $ curl-config --libs
> -lcurl
> 
>> If you look at my later post, cygport git build and tests worked for me with no
>> problems other than at first missing some package build dependencies
> 
> Those were not really build dependencies.  They only appeared to be needed
> because 'curl-config --libs' erroneously included libs that are only needed for
> static linking.

Your patch seems to reproduce exactly what is currently distributed in the
libcurl-devel package:

$ tail -n7 /lib/pkgconfig/libcurl.pc
Name: libcurl
URL: https://curl.haxx.se/
Description: Library to transfer files with ftp, http, etc.
Version: 7.71.1
Libs: -L${libdir} -lcurl
Libs.private: -lnghttp2 -lidn2 -lssh -lpsl -lssl -lcrypto -lldap -llber
-lbrotlidec -lbrotlidec -lz
Cflags: -I${includedir}

and from what I can see, picked up and used in my vanilla cygport git build from
the vanilla distributed src package:

$ for exe in *.exe */*.exe; do ldd $exe | fgrep -q cygcurl && cygcheck ./$exe &&
echo; done > ~/git-curl.log

[see attached]

Perhaps I am misunderstanding: I was addressing the OP build issue; are you
perhaps concerned solely with the correct operation of curl-config?

In that case, it looks to me as if the generated curl-config --libs statements:

        if test "Xyes" = "Xno" -o "Xyes" = "Xyes"; then
          echo ${CURLLIBDIR}-lcurl -lnghttp2 -lidn2 -lssh -lpsl -lssl -lcrypto
-lldap -llber -lbrotlidec -lbrotlidec -lz

based on curl-config.in:

        if test "X@ENABLE_SHARED@" = "Xno" -o "X@REQUIRE_LIB_DEPS@" = "Xyes"; then
          echo ${CURLLIBDIR}-lcurl @LIBCURL_LIBS@

REQUIRE_LIB_DEPS should be no, derived from configure.ac:

if test "X$enable_shared" = "Xyes" -a "X$link_all_deplibs" = "Xno"
then
    REQUIRE_LIB_DEPS=no
else
    REQUIRE_LIB_DEPS=yes
fi
AC_SUBST(REQUIRE_LIB_DEPS)
AM_CONDITIONAL(USE_EXPLICIT_LIB_DEPS, test x$REQUIRE_LIB_DEPS = xyes)

but for Cygwin link_all_deplibs remains defaulted to unknown, so either that
variable should be set in configure, or that condition should perhaps be changed
to:

if test "X$enable_shared" = "Xyes" -a "X$link_all_deplibs" != "Xyes"

with appropriate bug reports and changes to be made upstream if possible.

If you can provide any more insight on the autotools generation of curl-config,
I can add that to the upstream bug report.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in IEC units and prefixes, physical quantities in SI.]

[-- Attachment #2: git-curl.log --]
[-- Type: text/plain, Size: 8553 bytes --]

$HOME\src\cygwin\git\git-2.28.0-1.x86_64\inst\usr\libexec\git-core\git-http-fetch.exe
  C:\...\cygwin64\bin\cygcurl-4.dll
    C:\...\cygwin64\bin\cygbrotlidec-1.dll
      C:\...\cygwin64\bin\cygwin1.dll
        C:\Windows\system32\KERNEL32.dll
          C:\Windows\system32\ntdll.dll
          C:\Windows\system32\KERNELBASE.dll
      C:\...\cygwin64\bin\cygbrotlicommon-1.dll
    C:\...\cygwin64\bin\cygcrypto-1.1.dll
      C:\...\cygwin64\bin\cygz.dll
    C:\...\cygwin64\bin\cygidn2-0.dll
      C:\...\cygwin64\bin\cygiconv-2.dll
      C:\...\cygwin64\bin\cygintl-8.dll
      C:\...\cygwin64\bin\cygunistring-2.dll
    C:\...\cygwin64\bin\cyglber-2-4-2.dll
    C:\...\cygwin64\bin\cygldap-2-4-2.dll
      C:\...\cygwin64\bin\cygsasl2-3.dll
      C:\...\cygwin64\bin\cygssl-1.1.dll
    C:\...\cygwin64\bin\cygnghttp2-14.dll
    C:\...\cygwin64\bin\cygpsl-5.dll
    C:\...\cygwin64\bin\cygssh-4.dll
      C:\...\cygwin64\bin\cyggcc_s-seh-1.dll
      C:\...\cygwin64\bin\cyggssapi_krb5-2.dll
        C:\...\cygwin64\bin\cygk5crypto-3.dll
          C:\...\cygwin64\bin\cygkrb5support-0.dll
        C:\...\cygwin64\bin\cygkrb5-3.dll
          C:\...\cygwin64\bin\cygcom_err-2.dll
  C:\...\cygwin64\bin\cygpcre2-8-0.dll

$HOME\src\cygwin\git\git-2.28.0-1.x86_64\inst\usr\libexec\git-core\git-http-push.exe
  C:\...\cygwin64\bin\cygcurl-4.dll
    C:\...\cygwin64\bin\cygbrotlidec-1.dll
      C:\...\cygwin64\bin\cygwin1.dll
        C:\Windows\system32\KERNEL32.dll
          C:\Windows\system32\ntdll.dll
          C:\Windows\system32\KERNELBASE.dll
      C:\...\cygwin64\bin\cygbrotlicommon-1.dll
    C:\...\cygwin64\bin\cygcrypto-1.1.dll
      C:\...\cygwin64\bin\cygz.dll
    C:\...\cygwin64\bin\cygidn2-0.dll
      C:\...\cygwin64\bin\cygiconv-2.dll
      C:\...\cygwin64\bin\cygintl-8.dll
      C:\...\cygwin64\bin\cygunistring-2.dll
    C:\...\cygwin64\bin\cyglber-2-4-2.dll
    C:\...\cygwin64\bin\cygldap-2-4-2.dll
      C:\...\cygwin64\bin\cygsasl2-3.dll
      C:\...\cygwin64\bin\cygssl-1.1.dll
    C:\...\cygwin64\bin\cygnghttp2-14.dll
    C:\...\cygwin64\bin\cygpsl-5.dll
    C:\...\cygwin64\bin\cygssh-4.dll
      C:\...\cygwin64\bin\cyggcc_s-seh-1.dll
      C:\...\cygwin64\bin\cyggssapi_krb5-2.dll
        C:\...\cygwin64\bin\cygk5crypto-3.dll
          C:\...\cygwin64\bin\cygkrb5support-0.dll
        C:\...\cygwin64\bin\cygkrb5-3.dll
          C:\...\cygwin64\bin\cygcom_err-2.dll
  C:\...\cygwin64\bin\cygexpat-1.dll
  C:\...\cygwin64\bin\cygpcre2-8-0.dll

$HOME\src\cygwin\git\git-2.28.0-1.x86_64\inst\usr\libexec\git-core\git-imap-send.exe
  C:\...\cygwin64\bin\cygcrypto-1.1.dll
    C:\...\cygwin64\bin\cygwin1.dll
      C:\Windows\system32\KERNEL32.dll
        C:\Windows\system32\ntdll.dll
        C:\Windows\system32\KERNELBASE.dll
    C:\...\cygwin64\bin\cygz.dll
  C:\...\cygwin64\bin\cygcurl-4.dll
    C:\...\cygwin64\bin\cygbrotlidec-1.dll
      C:\...\cygwin64\bin\cygbrotlicommon-1.dll
    C:\...\cygwin64\bin\cygidn2-0.dll
      C:\...\cygwin64\bin\cygiconv-2.dll
      C:\...\cygwin64\bin\cygintl-8.dll
      C:\...\cygwin64\bin\cygunistring-2.dll
    C:\...\cygwin64\bin\cyglber-2-4-2.dll
    C:\...\cygwin64\bin\cygldap-2-4-2.dll
      C:\...\cygwin64\bin\cygsasl2-3.dll
      C:\...\cygwin64\bin\cygssl-1.1.dll
    C:\...\cygwin64\bin\cygnghttp2-14.dll
    C:\...\cygwin64\bin\cygpsl-5.dll
    C:\...\cygwin64\bin\cygssh-4.dll
      C:\...\cygwin64\bin\cyggcc_s-seh-1.dll
      C:\...\cygwin64\bin\cyggssapi_krb5-2.dll
        C:\...\cygwin64\bin\cygk5crypto-3.dll
          C:\...\cygwin64\bin\cygkrb5support-0.dll
        C:\...\cygwin64\bin\cygkrb5-3.dll
          C:\...\cygwin64\bin\cygcom_err-2.dll
  C:\...\cygwin64\bin\cygpcre2-8-0.dll

$HOME\src\cygwin\git\git-2.28.0-1.x86_64\inst\usr\libexec\git-core\git-remote-ftp.exe
  C:\...\cygwin64\bin\cygcurl-4.dll
    C:\...\cygwin64\bin\cygbrotlidec-1.dll
      C:\...\cygwin64\bin\cygwin1.dll
        C:\Windows\system32\KERNEL32.dll
          C:\Windows\system32\ntdll.dll
          C:\Windows\system32\KERNELBASE.dll
      C:\...\cygwin64\bin\cygbrotlicommon-1.dll
    C:\...\cygwin64\bin\cygcrypto-1.1.dll
      C:\...\cygwin64\bin\cygz.dll
    C:\...\cygwin64\bin\cygidn2-0.dll
      C:\...\cygwin64\bin\cygiconv-2.dll
      C:\...\cygwin64\bin\cygintl-8.dll
      C:\...\cygwin64\bin\cygunistring-2.dll
    C:\...\cygwin64\bin\cyglber-2-4-2.dll
    C:\...\cygwin64\bin\cygldap-2-4-2.dll
      C:\...\cygwin64\bin\cygsasl2-3.dll
      C:\...\cygwin64\bin\cygssl-1.1.dll
    C:\...\cygwin64\bin\cygnghttp2-14.dll
    C:\...\cygwin64\bin\cygpsl-5.dll
    C:\...\cygwin64\bin\cygssh-4.dll
      C:\...\cygwin64\bin\cyggcc_s-seh-1.dll
      C:\...\cygwin64\bin\cyggssapi_krb5-2.dll
        C:\...\cygwin64\bin\cygk5crypto-3.dll
          C:\...\cygwin64\bin\cygkrb5support-0.dll
        C:\...\cygwin64\bin\cygkrb5-3.dll
          C:\...\cygwin64\bin\cygcom_err-2.dll
  C:\...\cygwin64\bin\cygpcre2-8-0.dll

$HOME\src\cygwin\git\git-2.28.0-1.x86_64\inst\usr\libexec\git-core\git-remote-ftps.exe
  C:\...\cygwin64\bin\cygcurl-4.dll
    C:\...\cygwin64\bin\cygbrotlidec-1.dll
      C:\...\cygwin64\bin\cygwin1.dll
        C:\Windows\system32\KERNEL32.dll
          C:\Windows\system32\ntdll.dll
          C:\Windows\system32\KERNELBASE.dll
      C:\...\cygwin64\bin\cygbrotlicommon-1.dll
    C:\...\cygwin64\bin\cygcrypto-1.1.dll
      C:\...\cygwin64\bin\cygz.dll
    C:\...\cygwin64\bin\cygidn2-0.dll
      C:\...\cygwin64\bin\cygiconv-2.dll
      C:\...\cygwin64\bin\cygintl-8.dll
      C:\...\cygwin64\bin\cygunistring-2.dll
    C:\...\cygwin64\bin\cyglber-2-4-2.dll
    C:\...\cygwin64\bin\cygldap-2-4-2.dll
      C:\...\cygwin64\bin\cygsasl2-3.dll
      C:\...\cygwin64\bin\cygssl-1.1.dll
    C:\...\cygwin64\bin\cygnghttp2-14.dll
    C:\...\cygwin64\bin\cygpsl-5.dll
    C:\...\cygwin64\bin\cygssh-4.dll
      C:\...\cygwin64\bin\cyggcc_s-seh-1.dll
      C:\...\cygwin64\bin\cyggssapi_krb5-2.dll
        C:\...\cygwin64\bin\cygk5crypto-3.dll
          C:\...\cygwin64\bin\cygkrb5support-0.dll
        C:\...\cygwin64\bin\cygkrb5-3.dll
          C:\...\cygwin64\bin\cygcom_err-2.dll
  C:\...\cygwin64\bin\cygpcre2-8-0.dll

$HOME\src\cygwin\git\git-2.28.0-1.x86_64\inst\usr\libexec\git-core\git-remote-http.exe
  C:\...\cygwin64\bin\cygcurl-4.dll
    C:\...\cygwin64\bin\cygbrotlidec-1.dll
      C:\...\cygwin64\bin\cygwin1.dll
        C:\Windows\system32\KERNEL32.dll
          C:\Windows\system32\ntdll.dll
          C:\Windows\system32\KERNELBASE.dll
      C:\...\cygwin64\bin\cygbrotlicommon-1.dll
    C:\...\cygwin64\bin\cygcrypto-1.1.dll
      C:\...\cygwin64\bin\cygz.dll
    C:\...\cygwin64\bin\cygidn2-0.dll
      C:\...\cygwin64\bin\cygiconv-2.dll
      C:\...\cygwin64\bin\cygintl-8.dll
      C:\...\cygwin64\bin\cygunistring-2.dll
    C:\...\cygwin64\bin\cyglber-2-4-2.dll
    C:\...\cygwin64\bin\cygldap-2-4-2.dll
      C:\...\cygwin64\bin\cygsasl2-3.dll
      C:\...\cygwin64\bin\cygssl-1.1.dll
    C:\...\cygwin64\bin\cygnghttp2-14.dll
    C:\...\cygwin64\bin\cygpsl-5.dll
    C:\...\cygwin64\bin\cygssh-4.dll
      C:\...\cygwin64\bin\cyggcc_s-seh-1.dll
      C:\...\cygwin64\bin\cyggssapi_krb5-2.dll
        C:\...\cygwin64\bin\cygk5crypto-3.dll
          C:\...\cygwin64\bin\cygkrb5support-0.dll
        C:\...\cygwin64\bin\cygkrb5-3.dll
          C:\...\cygwin64\bin\cygcom_err-2.dll
  C:\...\cygwin64\bin\cygpcre2-8-0.dll

$HOME\src\cygwin\git\git-2.28.0-1.x86_64\inst\usr\libexec\git-core\git-remote-https.exe
  C:\...\cygwin64\bin\cygcurl-4.dll
    C:\...\cygwin64\bin\cygbrotlidec-1.dll
      C:\...\cygwin64\bin\cygwin1.dll
        C:\Windows\system32\KERNEL32.dll
          C:\Windows\system32\ntdll.dll
          C:\Windows\system32\KERNELBASE.dll
      C:\...\cygwin64\bin\cygbrotlicommon-1.dll
    C:\...\cygwin64\bin\cygcrypto-1.1.dll
      C:\...\cygwin64\bin\cygz.dll
    C:\...\cygwin64\bin\cygidn2-0.dll
      C:\...\cygwin64\bin\cygiconv-2.dll
      C:\...\cygwin64\bin\cygintl-8.dll
      C:\...\cygwin64\bin\cygunistring-2.dll
    C:\...\cygwin64\bin\cyglber-2-4-2.dll
    C:\...\cygwin64\bin\cygldap-2-4-2.dll
      C:\...\cygwin64\bin\cygsasl2-3.dll
      C:\...\cygwin64\bin\cygssl-1.1.dll
    C:\...\cygwin64\bin\cygnghttp2-14.dll
    C:\...\cygwin64\bin\cygpsl-5.dll
    C:\...\cygwin64\bin\cygssh-4.dll
      C:\...\cygwin64\bin\cyggcc_s-seh-1.dll
      C:\...\cygwin64\bin\cyggssapi_krb5-2.dll
        C:\...\cygwin64\bin\cygk5crypto-3.dll
          C:\...\cygwin64\bin\cygkrb5support-0.dll
        C:\...\cygwin64\bin\cygkrb5-3.dll
          C:\...\cygwin64\bin\cygcom_err-2.dll
  C:\...\cygwin64\bin\cygpcre2-8-0.dll


  parent reply	other threads:[~2020-08-11  1:27 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20  2:34 Brian Inglis
2020-07-20 17:58 ` ASSI
2020-08-10 18:16   ` Brian Inglis
2020-08-10 20:11     ` Marco Atzeri
     [not found] ` <CA+kUOa=-AJxr_2TaZoNerOquMGR8FCzi7hg3DyuvntuQqpAVOg@mail.gmail.com>
2020-08-09 18:28   ` Adam Dinwoodie
2020-08-09 21:48     ` Brian Inglis
2020-08-10  3:32       ` Brian Inglis
2020-08-10 14:52       ` Ken Brown
2020-08-10 17:33         ` Brian Inglis
2020-08-10 19:14           ` Ken Brown
2020-08-10 20:52             ` Adam Dinwoodie
2020-08-11  1:27             ` Brian Inglis [this message]
2020-08-11 11:13               ` Ken Brown
2020-08-11 11:27                 ` Adam Dinwoodie
2020-08-11 22:00                   ` Brian Inglis
2020-08-14 18:19                     ` Brian Inglis
2020-08-15 22:44                     ` [ANNOUNCEMENT] Updated: curl 7.71.1-2 Brian Inglis
2020-08-16 19:28                       ` Adam Dinwoodie
2020-08-11  5:15       ` [ANNOUNCEMENT] Updated: curl 7.71.1-1 ASSI
2020-08-11  5:55         ` Brian Inglis
2020-08-11 15:03           ` ASSI
2020-08-11 22:00             ` Brian Inglis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=71031f78-b1be-aec2-4e54-72ff49e07543@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).