bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Space separator missing in gnulib when building wget2


From: Dagobert Michelsen
Subject: Space separator missing in gnulib when building wget2
Date: Thu, 28 Nov 2019 14:41:30 +0100

Hi,

building of wget2 fails on Solaris 10 x86 with the error

gmake[2]: Entering directory '/home/dam/work/wget2/libwget'
/bin/bash ../libtool  --tag=CC   --mode=link gcc     -DBUILDING_LIBWGET 
-I/opt/csw/include   -I/opt/csw/include   -I/opt/csw/include   
-I/opt/csw/include   -I/opt/csw/include   -I/opt/csw/include -I/opt/csw/include 
  -I/opt/csw/include   -I/opt/csw/include -I/opt/csw/include/p11-kit-1   
-DNDEBUG  -no-undefined -version-info 0:0:0  -o libwget.la -rpath 
/usr/local/lib libwget_la-atom_url.lo libwget_la-bar.lo libwget_la-bitmap.lo 
libwget_la-buffer.lo libwget_la-buffer_printf.lo libwget_la-base64.lo 
libwget_la-console.lo libwget_la-cookie.lo libwget_la-cookie_parse.lo 
libwget_la-css.lo libwget_la-css_url.lo libwget_la-decompressor.lo 
libwget_la-dns_cache.lo libwget_la-encoding.lo libwget_la-hash_printf.lo 
libwget_la-hashfile.lo libwget_la-hashmap.lo libwget_la-io.lo 
libwget_la-hsts.lo libwget_la-hpkp.lo libwget_la-hpkp_db.lo 
libwget_la-html_url.lo libwget_la-http.lo libwget_la-http_parse.lo 
libwget_la-init.lo libwget_la-ip.lo libwget_la-iri.lo libwget_la-list.lo 
libwget_la-log.lo libwget_la-logger.lo libwget_la-mem.lo libwget_la-metalink.lo 
libwget_la-net.lo libwget_la-netrc.lo libwget_la-ocsp.lo libwget_la-pipe.lo 
libwget_la-plugin.lo libwget_la-printf.lo libwget_la-random.lo 
libwget_la-robots.lo libwget_la-rss_url.lo libwget_la-sitemap_url.lo 
libwget_la-stringmap.lo libwget_la-strlcpy.lo libwget_la-strscpy.lo 
libwget_la-thread.lo libwget_la-tls_session.lo libwget_la-utils.lo 
libwget_la-vector.lo libwget_la-xalloc.lo libwget_la-xml.lo 
libwget_la-http_highlevel.lo libwget_la-error.lo libwget_la-dns.lo 
libwget_la-ssl_gnutls.lo     libcsstokenizer.la -lsocket -lnsl -lnsl -lnsl 
-lnsl -lsocket -lrt   -lrt -lsocket   -lsocket -liconv -lintl -lpthread  
-lsocket -L/opt/csw/lib -lpcre   -L/opt/csw/lib -lidn2   -L/opt/csw/lib 
-lbrotlidec   -L/opt/csw/lib -llzma   -L/opt/csw/lib -lz   -L/opt/csw/lib 
-lgpgme -lassuan -lsocket -lgpg-error -lbz2 -L/opt/csw/lib -lnghttp2   
-L/opt/csw/lib -lpsl   -L/opt/csw/lib -lgnutls    -llz  ../lib/libgnu.la  
-L/opt/csw/lib -lpcre   -L/opt/csw/lib -lidn2   -L/opt/csw/lib -lbrotlidec   
-L/opt/csw/lib -llzma   -L/opt/csw/lib -lz   -L/opt/csw/lib -lgpgme -lassuan 
-lsocket -lgpg-error -lbz2 -L/opt/csw/lib -lnghttp2   -L/opt/csw/lib -lpsl   
-L/opt/csw/lib -lgnutls    -llz 
libtool: link: gcc -shared  -fPIC -DPIC -Wl,-z -Wl,text -Wl,-h -Wl,libwget.so.0 
-o .libs/libwget.so.0.0.0  .libs/libwget_la-atom_url.o .libs/libwget_la-bar.o 
.libs/libwget_la-bitmap.o .libs/libwget_la-buffer.o 
.libs/libwget_la-buffer_printf.o .libs/libwget_la-base64.o 
.libs/libwget_la-console.o .libs/libwget_la-cookie.o 
.libs/libwget_la-cookie_parse.o .libs/libwget_la-css.o 
.libs/libwget_la-css_url.o .libs/libwget_la-decompressor.o 
.libs/libwget_la-dns_cache.o .libs/libwget_la-encoding.o 
.libs/libwget_la-hash_printf.o .libs/libwget_la-hashfile.o 
.libs/libwget_la-hashmap.o .libs/libwget_la-io.o .libs/libwget_la-hsts.o 
.libs/libwget_la-hpkp.o .libs/libwget_la-hpkp_db.o .libs/libwget_la-html_url.o 
.libs/libwget_la-http.o .libs/libwget_la-http_parse.o .libs/libwget_la-init.o 
.libs/libwget_la-ip.o .libs/libwget_la-iri.o .libs/libwget_la-list.o 
.libs/libwget_la-log.o .libs/libwget_la-logger.o .libs/libwget_la-mem.o 
.libs/libwget_la-metalink.o .libs/libwget_la-net.o .libs/libwget_la-netrc.o 
.libs/libwget_la-ocsp.o .libs/libwget_la-pipe.o .libs/libwget_la-plugin.o 
.libs/libwget_la-printf.o .libs/libwget_la-random.o .libs/libwget_la-robots.o 
.libs/libwget_la-rss_url.o .libs/libwget_la-sitemap_url.o 
.libs/libwget_la-stringmap.o .libs/libwget_la-strlcpy.o 
.libs/libwget_la-strscpy.o .libs/libwget_la-thread.o 
.libs/libwget_la-tls_session.o .libs/libwget_la-utils.o 
.libs/libwget_la-vector.o .libs/libwget_la-xalloc.o .libs/libwget_la-xml.o 
.libs/libwget_la-http_highlevel.o .libs/libwget_la-error.o 
.libs/libwget_la-dns.o .libs/libwget_la-ssl_gnutls.o  -Wl,-z -Wl,allextract 
./.libs/libcsstokenizer.a ../lib/.libs/libgnu.a -Wl,-z -Wl,defaultextract  
-L/opt/csw/lib -lnsl-lintl -lnsl -lrt -liconv -lintl -lpthread -lpcre -lidn2 
-lbrotlidec -llzma -lz -lgpgme -lassuan -lsocket -lgpg-error -lbz2 -lnghttp2 
-lpsl -lgnutls -llz   
ld: fatal: library -lnsl-lintl: not found
ld: fatal: file processing errors. No output written to .libs/libwget.so.0.0.0
collect2: error: ld returned 1 exit status

It turns out the erranous snipped `-lnsl-lintl` is included from 
`lib/libgnu.la`:

dependency_libs=' -lnsl-lintl -lnsl -lrt -liconv -lintl -lpthread 
-L/opt/csw/lib -lpcre -lidn2 -lbrotlidec -llzma -lz -lgpgme -lassuan -lsocket 
-lgpg-error -lbz2 -lnghttp2 -lpsl -lgnutls -llz‘

So this issue looks like a gnulib issue.

In lib/gnulib.mk there is a suspicious addition to libgnu_la_LDFLAGS without 
space:

libgnu_la_LDFLAGS += $(GETADDRINFO_LIB)$(LTLIBINTL)
...
libgnu_la_LDFLAGS += $(LTLIBICONV)
libgnu_la_LDFLAGS += $(LTLIBINTL)
libgnu_la_LDFLAGS += $(LTLIBMULTITHREAD)
```

The file `lib/gnulib.mk` is generated during bootstrap. 

What is actually executed during bootstrap is

gnulib/gnulib-tool.py --no-changelog --aux-dir=build-aux --doc-base=doc 
--lib=libgnu --m4-base=m4/ --source-base=lib/ --tests-base=lib/tests 
--local-dir=gl --makefile-name=gnulib.mk --libtool --import accept access 
arpa_inet atoll bind c-strcase c-strcasestr c-ctype calloc-posix 
canonicalize-lgpl clock-time close closedir cond connect crypto/md2 crypto/md5 
crypto/sha1 crypto/sha256 crypto/sha512 dirname dup dup2 errno fclose fcntl 
fdopen fflush flock fnmatch-gnu fopen freopen fstat fsync ftruncate futimens 
getaddrinfo getpass getsockname gettext-h gettime gitlog-to-changelog glob 
iconv inet_pton inline inttypes ioctl isatty lib-symbol-visibility limits-h 
link listen lock maintainer-makefile malloc-posix memchr mkdir mkstemp 
msvc-nothrow nanosleep netdb netinet_in nl_langinfo open opendir pclose 
pipe-posix progname popen poll posix_spawn pwrite qsort_r random_r read readdir 
realloc-posix recv recvfrom regex rename safe-read safe-write select send 
sendto servent setlocale setsockopt socket sockets socklen spawn-pipe stdarg 
stdbool stddef stdint stat strcase strchrnul strdup-posix strerror strndup 
strpbrk strstr strtoll sys_file sys_socket sys_stat sys_time sys_types sys_uio 
thread time_r unistd unlink update-copyright warnings wcwidth write xgethostname

and this command reproduces the error in `lib/gnulib.mk`

This fixes the error, but I am not sure if this is correct in all cases:

diff --git a/pygnulib/GLModuleSystem.py b/pygnulib/GLModuleSystem.py
index f2f9df4..8283cab 100644
--- a/pygnulib/GLModuleSystem.py
+++ b/pygnulib/GLModuleSystem.py
@@ -808,7 +808,7 @@ Include:|Link:|License:|Maintainer:)'
                         break
                     parts += [line]
                 parts = [part.strip() for part in parts if part.strip()]
-                result = ''.join(parts)
+                result = ' '.join(parts)
             self.cache['link'] = result
         return(self.cache['link‘])


The bug is also tracked for wget2 at
  https://gitlab.com/gnuwget/wget2/issues/492


Best regards

  — Dago

-- 
"You don't become great by trying to be great, you become great by wanting to 
do something,
and then doing it so hard that you become great in the process." - xkcd #896




reply via email to

[Prev in Thread] Current Thread [Next in Thread]