wget-dev
[Top][All Lists]
Advanced

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

wget2 | Unable to build from source on macOS Catalina 10.15.7 (#560)


From: Yihe Li (@Mick235711)
Subject: wget2 | Unable to build from source on macOS Catalina 10.15.7 (#560)
Date: Mon, 27 Sep 2021 09:00:23 +0000


Yihe Li created an issue: https://gitlab.com/gnuwget/wget2/-/issues/560



I tried building `wget2` from source using the instructions in README. The 
configure options I used is:
```
./configure --prefix=/usr/local/Cellar/wget2/2.0.0 --enable-dependency-tracking 
--disable-silent-rules --without-included-regex --without-libpcre 
--without-libpcre2 --without-libmicrohttpd --without-libhsts
```
and the final outputs of `configure` is:
```
  Version:            2.0.0
  Host OS:            darwin19.6.0
  Install prefix:     /usr/local/Cellar/wget2/2.0.0
  Compiler:           clang
  CFlags:             -I/usr/local/Cellar/libidn2/2.3.2/include  
-I/usr/local/opt/gpgme/include -I/usr/local/Cellar/libassuan/2.5.5/include 
-I/usr/local/opt/libgpg-error/include 
-I/usr/local/Cellar/nghttp2/1.45.1/include -DNDEBUG -g -O2
  LDFlags:
  Libs:               -L/usr/local/Cellar/libidn2/2.3.2/lib -lidn2 -lzstd 
-lbrotlidec -llzma -lz -L/usr/local/opt/gpgme/lib -lgpgme 
-L/usr/local/Cellar/libassuan/2.5.5/lib -lassuan 
-L/usr/local/opt/libgpg-error/lib -lgpg-error -lbz2 
-L/usr/local/Cellar/nghttp2/1.45.1/lib -lnghttp2 -lpsl -lgcrypt -lgnutls -lobjc 
-framework IOKit -framework CoreFoundation
  Library types:      shared=yes, static=yes
  Small libraries:    yes
  SSL/TLS support:    gnutls
  GZIP compression:   yes
  BZIP2 compression:  yes
  LZMA compression:   yes
  Brotli compression: yes
  Zstd compression:   yes
  Lzip compression:   no
  IDNA support:       IDNA 2008 (libidn2)
  PSL support:        yes
  HSTS support:       no
  HTTP/2.0 support:   yes
  Documentation:
  Wget2 docs:         yes (found: Pandoc)
  Libwget docs:       yes (found: Doxygen)
  PCRE support:       no
  Tests:              Valgrind testing not enabled
  Assertions:         no
  POSIX xattr:        yes
  Microhttpd support: no (CFLAGS: . LIBS: )
  Fuzzing build:      no,
  GPGME:              yes
```
However, `make` reported the following error:
```
Undefined symbols for architecture x86_64:
  "_CFGetTypeID", referenced from:
      _gl_locale_name_default in libgnu.a(localename.o)
  "_CFPreferencesCopyAppValue", referenced from:
      _gl_locale_name_default in libgnu.a(localename.o)
  "_CFStringGetCString", referenced from:
      _gl_locale_name_default in libgnu.a(localename.o)
  "_CFStringGetTypeID", referenced from:
      _gl_locale_name_default in libgnu.a(localename.o)
  "___CFConstantStringClassReference", referenced from:
      CFString in libgnu.a(localename.o)
  "_kCFPreferencesCurrentApplication", referenced from:
      _gl_locale_name_default in libgnu.a(localename.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```
After searching on the web, it seems that those linker error starts with `_CF` 
is the result of failure to link to `CoreFoundation.framework`. However, in the 
`LIBS` parameter, I have already set the `-framework CoreFoundation` part.

Even more weirdly, I tried the following (with those after `LIBS` exactly the 
same as the output of `configure`):
```
make LIBS+="-L/usr/local/Cellar/libidn2/2.3.2/lib -lidn2 -lzstd -lbrotlidec 
-llzma -lz -L/usr/local/opt/gpgme/lib -lgpgme 
-L/usr/local/Cellar/libassuan/2.5.5/lib -lassuan 
-L/usr/local/opt/libgpg-error/lib -lgpg-error -lbz2 
-L/usr/local/Cellar/nghttp2/1.45.1/lib -lnghttp2 -lpsl -lgcrypt -lgnutls -lobjc 
-framework IOKit -framework CoreFoundation"
```
and this successfully build the binary. Is it true that the `LIBS` setting are 
not correctly used by `make`?

-- 
Reply to this email directly or view it on GitLab: 
https://gitlab.com/gnuwget/wget2/-/issues/560
You're receiving this email because of your account on gitlab.com.




reply via email to

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