wget-dev
[Top][All Lists]
Advanced

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

wget2 | `./configure --with-openssl=yes` fails with linker error (#595)


From: Avinash Sonawane (@rootkea)
Subject: wget2 | `./configure --with-openssl=yes` fails with linker error (#595)
Date: Sat, 23 Apr 2022 09:10:36 +0000


Avinash Sonawane created an issue: https://gitlab.com/gnuwget/wget2/-/issues/595



Hello!

`./confgiure --help` documents `--with-openssl` so dev might use that option.

But the build fails with linker error:
```
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-md5.o): in function `md5_init_ctx':
md5.c:(.text+0x0): multiple definition of `md5_init_ctx'; 
../lib/.libs/libgnu.a(libgnu_la-md5-stream.o):md5-stream.c:(.text+0x0): first 
defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-md5.o): in function 
`md5_process_bytes':
md5.c:(.text+0x20): multiple definition of `md5_process_bytes'; 
../lib/.libs/libgnu.a(libgnu_la-md5-stream.o):md5-stream.c:(.text+0x20): first 
defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-md5.o): in function 
`md5_process_block':
md5.c:(.text+0x50): multiple definition of `md5_process_block'; 
../lib/.libs/libgnu.a(libgnu_la-md5-stream.o):md5-stream.c:(.text+0x50): first 
defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-md5.o): in function 
`md5_finish_ctx':
md5.c:(.text+0x80): multiple definition of `md5_finish_ctx'; 
../lib/.libs/libgnu.a(libgnu_la-md5-stream.o):md5-stream.c:(.text+0x80): first 
defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-md5.o): in function `md5_buffer':
md5.c:(.text+0xb0): multiple definition of `md5_buffer'; 
../lib/.libs/libgnu.a(libgnu_la-md5-stream.o):md5-stream.c:(.text+0xb0): first 
defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-md5.o): in function `md5_read_ctx':
md5.c:(.text+0xe0): multiple definition of `md5_read_ctx'; 
../lib/.libs/libgnu.a(libgnu_la-md5-stream.o):md5-stream.c:(.text+0xe0): first 
defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha1.o): in function 
`sha1_init_ctx':
sha1.c:(.text+0x0): multiple definition of `sha1_init_ctx'; 
../lib/.libs/libgnu.a(libgnu_la-sha1-stream.o):sha1-stream.c:(.text+0x0): first 
defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha1.o): in function 
`sha1_process_bytes':
sha1.c:(.text+0x20): multiple definition of `sha1_process_bytes'; 
../lib/.libs/libgnu.a(libgnu_la-sha1-stream.o):sha1-stream.c:(.text+0x20): 
first defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha1.o): in function 
`sha1_process_block':
sha1.c:(.text+0x50): multiple definition of `sha1_process_block'; 
../lib/.libs/libgnu.a(libgnu_la-sha1-stream.o):sha1-stream.c:(.text+0x50): 
first defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha1.o): in function 
`sha1_finish_ctx':
sha1.c:(.text+0x80): multiple definition of `sha1_finish_ctx'; 
../lib/.libs/libgnu.a(libgnu_la-sha1-stream.o):sha1-stream.c:(.text+0x80): 
first defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha1.o): in function `sha1_buffer':
sha1.c:(.text+0xb0): multiple definition of `sha1_buffer'; 
../lib/.libs/libgnu.a(libgnu_la-sha1-stream.o):sha1-stream.c:(.text+0xb0): 
first defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha1.o): in function 
`sha1_read_ctx':
sha1.c:(.text+0xe0): multiple definition of `sha1_read_ctx'; 
../lib/.libs/libgnu.a(libgnu_la-sha1-stream.o):sha1-stream.c:(.text+0xe0): 
first defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha256.o): in function 
`sha224_init_ctx':
sha256.c:(.text+0x0): multiple definition of `sha224_init_ctx'; 
../lib/.libs/libgnu.a(libgnu_la-sha256-stream.o):sha256-stream.c:(.text+0x0): 
first defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha256.o): in function 
`sha224_finish_ctx':
sha256.c:(.text+0x20): multiple definition of `sha224_finish_ctx'; 
../lib/.libs/libgnu.a(libgnu_la-sha256-stream.o):sha256-stream.c:(.text+0x20): 
first defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha256.o): in function 
`sha224_buffer':
sha256.c:(.text+0x50): multiple definition of `sha224_buffer'; 
../lib/.libs/libgnu.a(libgnu_la-sha256-stream.o):sha256-stream.c:(.text+0x50): 
first defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha256.o): in function 
`sha224_read_ctx':
sha256.c:(.text+0x80): multiple definition of `sha224_read_ctx'; 
../lib/.libs/libgnu.a(libgnu_la-sha256-stream.o):sha256-stream.c:(.text+0x80): 
first defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha256.o): in function 
`sha256_init_ctx':
sha256.c:(.text+0xc0): multiple definition of `sha256_init_ctx'; 
../lib/.libs/libgnu.a(libgnu_la-sha256-stream.o):sha256-stream.c:(.text+0xc0): 
first defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha256.o): in function 
`sha256_process_bytes':
sha256.c:(.text+0xe0): multiple definition of `sha256_process_bytes'; 
../lib/.libs/libgnu.a(libgnu_la-sha256-stream.o):sha256-stream.c:(.text+0xe0): 
first defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha256.o): in function 
`sha256_process_block':
sha256.c:(.text+0x110): multiple definition of `sha256_process_block'; 
../lib/.libs/libgnu.a(libgnu_la-sha256-stream.o):sha256-stream.c:(.text+0x110): 
first defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha256.o): in function 
`sha256_finish_ctx':
sha256.c:(.text+0x140): multiple definition of `sha256_finish_ctx'; 
../lib/.libs/libgnu.a(libgnu_la-sha256-stream.o):sha256-stream.c:(.text+0x140): 
first defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha256.o): in function 
`sha256_buffer':
sha256.c:(.text+0x170): multiple definition of `sha256_buffer'; 
../lib/.libs/libgnu.a(libgnu_la-sha256-stream.o):sha256-stream.c:(.text+0x170): 
first defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha256.o): in function 
`sha256_read_ctx':
sha256.c:(.text+0x1a0): multiple definition of `sha256_read_ctx'; 
../lib/.libs/libgnu.a(libgnu_la-sha256-stream.o):sha256-stream.c:(.text+0x1a0): 
first defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha512.o): in function 
`sha384_init_ctx':
sha512.c:(.text+0x0): multiple definition of `sha384_init_ctx'; 
../lib/.libs/libgnu.a(libgnu_la-sha512-stream.o):sha512-stream.c:(.text+0x0): 
first defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha512.o): in function 
`sha384_finish_ctx':
sha512.c:(.text+0x20): multiple definition of `sha384_finish_ctx'; 
../lib/.libs/libgnu.a(libgnu_la-sha512-stream.o):sha512-stream.c:(.text+0x20): 
first defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha512.o): in function 
`sha384_buffer':
sha512.c:(.text+0x50): multiple definition of `sha384_buffer'; 
../lib/.libs/libgnu.a(libgnu_la-sha512-stream.o):sha512-stream.c:(.text+0x50): 
first defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha512.o): in function 
`sha384_read_ctx':
sha512.c:(.text+0x80): multiple definition of `sha384_read_ctx'; 
../lib/.libs/libgnu.a(libgnu_la-sha512-stream.o):sha512-stream.c:(.text+0x80): 
first defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha512.o): in function 
`sha512_init_ctx':
sha512.c:(.text+0xd0): multiple definition of `sha512_init_ctx'; 
../lib/.libs/libgnu.a(libgnu_la-sha512-stream.o):sha512-stream.c:(.text+0xd0): 
first defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha512.o): in function 
`sha512_process_bytes':
sha512.c:(.text+0xf0): multiple definition of `sha512_process_bytes'; 
../lib/.libs/libgnu.a(libgnu_la-sha512-stream.o):sha512-stream.c:(.text+0xf0): 
first defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha512.o): in function 
`sha512_process_block':
sha512.c:(.text+0x120): multiple definition of `sha512_process_block'; 
../lib/.libs/libgnu.a(libgnu_la-sha512-stream.o):sha512-stream.c:(.text+0x120): 
first defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha512.o): in function 
`sha512_finish_ctx':
sha512.c:(.text+0x150): multiple definition of `sha512_finish_ctx'; 
../lib/.libs/libgnu.a(libgnu_la-sha512-stream.o):sha512-stream.c:(.text+0x150): 
first defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha512.o): in function 
`sha512_buffer':
sha512.c:(.text+0x180): multiple definition of `sha512_buffer'; 
../lib/.libs/libgnu.a(libgnu_la-sha512-stream.o):sha512-stream.c:(.text+0x180): 
first defined here
/usr/bin/ld: ../lib/.libs/libgnu.a(libgnu_la-sha512.o): in function 
`sha512_read_ctx':
sha512.c:(.text+0x1b0): multiple definition of `sha512_read_ctx'; 
../lib/.libs/libgnu.a(libgnu_la-sha512-stream.o):sha512-stream.c:(.text+0x1b0): 
first defined here
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [Makefile:2826: libwget.la] Error 1
make[2]: Leaving directory '/home/rootmonk/Downloads/todo/hacking/wget2/libwget'
make[1]: *** [Makefile:1860: all-recursive] Error 1
make[1]: Leaving directory '/home/rootmonk/Downloads/todo/hacking/wget2'
make: *** [Makefile:1768: all] Error 2
$
```

Initially, I thought it was because `--with-openssl=yes` was clashing with 
`--with-ssl` (default `gnutls`) so I made this change in `configure.ac` but 
still see the linker errors. May be the clash is now between `gnulib` and 
openssl (`-lcrypto`)?
```
@@ -485,6 +485,11 @@ PKG_PROG_PKG_CONFIG
 
 AC_ARG_WITH(ssl, AS_HELP_STRING([--with-ssl], [Use SSL/TLS with specified 
library. Options: 'gnutls' (default), 'openssl', 'wolfssl' or 'none']), 
with_ssl=$withval, with_ssl="yes")
 
+# if openssl is already set via --with-openssl
+if test "x$LIB_CRYPTO" != x; then
+  with_ssl="openssl"
+fi
+
 AS_IF([test "$with_ssl" = "gnutls" || test "$with_ssl" = "yes"], [
   PKG_CHECK_MODULES([GNUTLS], [gnutls], [
     with_gnutls=yes
```

FWIW, `./configure --with-ssl=openssl` gets completed successfully without any 
issue.

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




reply via email to

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