Skip to content

curl 7.71.1 make check libtest libstubgss build failed under Cygwin #5819

@BrianInglis

Description

@BrianInglis

I did this

Making all in libtest
make[2]: Entering directory '/home/bwi/src/cygwin/curl/curl-7.71.1-2.x86_64/build/tests/libtest'
CCLD libstubgss.la
libtool: error: can't build x86_64-pc-cygwin shared library unless -no-undefined is specified

I expected the following

libstubgss built without error

curl/libcurl version

$ curl-7.71.1-2.x86_64/inst/usr/bin/curl -V
curl 7.71.1 (x86_64-pc-cygwin) libcurl/7.71.1 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.0.4) libssh/0.8.7/openssl/zlib nghttp2/1.37.0
Release-Date: 2020-07-01
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS brotli Debug GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP TrackMemory UnixSockets

operating system

$ uname -srvmo
CYGWIN_NT-10.0 3.1.7(0.340/5/3) 2020-08-03 21:06 x86_64 Cygwin

suggested fix

Following suggestions from Ken Brown, copied approach for libhostname and applied that to libstubgss: can provide as PR if desired?

$ cat 7.71.1-2-libstubgss-no-undefined.patch
--- origsrc/curl-7.71.1/tests/libtest/Makefile.am       2020-06-27 16:03:53.000000000 -0600
+++ src/curl-7.71.1/tests/libtest/Makefile.am   2020-08-15 00:39:56.780920500 -0600
@@ -91,8 +91,11 @@ libhostname_la_CPPFLAGS_EXTRA =
 libhostname_la_LDFLAGS_EXTRA = -module -avoid-version -rpath /nowhere
 libhostname_la_CFLAGS_EXTRA =

+libstubgss_la_LDFLAGS_EXTRA =
+
 if CURL_LT_SHLIB_USE_NO_UNDEFINED
 libhostname_la_LDFLAGS_EXTRA += -no-undefined
+libstubgss_la_LDFLAGS_EXTRA += -no-undefined
 endif

 if CURL_LT_SHLIB_USE_MIMPURE_TEXT
@@ -118,7 +121,7 @@ if BUILD_STUB_GSS
 noinst_LTLIBRARIES += libstubgss.la

 libstubgss_la_CPPFLAGS = $(AM_CPPFLAGS)
-libstubgss_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version -rpath /nowhere
+libstubgss_la_LDFLAGS = $(AM_LDFLAGS) $(libstubgss_la_LDFLAGS_EXTRA) -avoid-version -rpath /nowhere
 libstubgss_la_CFLAGS = $(AM_CFLAGS) -g

 libstubgss_la_SOURCES = stub_gssapi.c stub_gssapi.h

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions