public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* bash-4.4.12-3: Building package with gcc-10.2 fails due to duplicate symbols
@ 2020-12-16 16:58 Mattl Mario
  2020-12-16 17:12 ` Yasuhiro KIMURA
  0 siblings, 1 reply; 2+ messages in thread
From: Mattl Mario @ 2020-12-16 16:58 UTC (permalink / raw)
  To: cygwin

Hello everyone,

With the GCC-10.2 Compiler package it's not possible to build the bash-src package anymore.

I firstly recognized the same issue with a bash-4.3 package, which we are currently using in our toolchain.
So I decided to try building the Cygwin bash-src package (of course using the common cygport mechanism for applying all patches)

gcc -L./builtins -L./lib/readline -L./lib/readline -L./lib/glob -L./lib/tilde  -L./lib/sh -L./lib/termcap    -g -O2 -Wno-parentheses -Wno-format-security -o bash.exe shell.o eval.o y.tab.o general.o make_cmd.o print_cmd.o  dispose_cmd.o execute_cmd.o variables.o copy_cmd.o error.o expr.o flags.o jobs.o subst.o hashcmd.o hashlib.o mailcheck.o trap.o input.o unwind_prot.o pathexp.o sig.o test.o version.o alias.o array.o arrayfunc.o assoc.o braces.o bracecomp.o bashhist.o bashline.o  list.o stringlib.o locale.o findcmd.o redir.o pcomplete.o pcomplib.o syntax.o xmalloc.o  -lbuiltins -lglob -lsh -lreadline -lhistory ./lib/termcap/libtermcap.a -ltilde  lib/intl/libintl.a    -ldl
/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: ./lib/termcap/libtermcap.a(termcap.o):/usr/src/bash-4.4.12-3.src/bash-4.4.12-3.x86_64/src/bash-4.4/lib/termcap/termcap.c:295: multiple definition of `PC'; ./lib/readline/libreadline.a(terminal.o):terminal.c:(.bss+0xa0): first defined here
/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: ./lib/termcap/libtermcap.a(tparam.o):/usr/src/bash-4.4.12-3.src/bash-4.4.12-3.x86_64/src/bash-4.4/lib/termcap/tparam.c:127: multiple definition of `UP'; ./lib/readline/libreadline.a(terminal.o):terminal.c:(.bss+0x90): first defined here
/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: ./lib/termcap/libtermcap.a(tparam.o):/usr/src/bash-4.4.12-3.src/bash-4.4.12-3.x86_64/src/bash-4.4/lib/termcap/tparam.c:126: multiple definition of `BC'; ./lib/readline/libreadline.a(terminal.o):terminal.c:(.bss+0x98): first defined here
/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: bashline.o:bashline.c:(.rdata$.refptr.__imp_rl_tab_insert[.refptr.__imp_rl_tab_insert]+0x0): undefined reference to `__imp_rl_tab_insert'
/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: bashline.o:bashline.c:(.rdata$.refptr.__imp_rl_tilde_expand[.refptr.__imp_rl_tilde_expand]+0x0): undefined reference to `__imp_rl_tilde_expand'
/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: bashline.o:bashline.c:(.rdata$.refptr.__imp_rl_vi_editing_mode[.refptr.__imp_rl_vi_editing_mode]+0x0): undefined reference to `__imp_rl_vi_editing_mode'
collect2: error: ld returned 1 exit status
make: *** [Makefile:573: bash.exe] Error 1


NOTE: Downgrading to GCC-9 package solves this issue.
Could you verify that issue, please?

Thanks in advance +
bR Mario


SSI Schäfer IT Solutions GmbH | Friesachstrasse 15 | 8114 Friesach | Austria
Registered Office: Friesach | Commercial Register: 49324 K | VAT no. ATU28654300
Commercial Court: Landesgericht für Zivilrechtssachen Graz
Managing Directors: Alois Scheibenreif, Wolfram Frena

Unsere Hinweise zum Umgang mit personenbezogenen Daten finden Sie hier<https://www.ssi-schaefer.com/de-at/datenschutz-49548>.
You can find our information on the handling of personal data here<https://www.ssi-schaefer.com/en-at/privacy-13258>.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: bash-4.4.12-3: Building package with gcc-10.2 fails due to duplicate symbols
  2020-12-16 16:58 bash-4.4.12-3: Building package with gcc-10.2 fails due to duplicate symbols Mattl Mario
@ 2020-12-16 17:12 ` Yasuhiro KIMURA
  0 siblings, 0 replies; 2+ messages in thread
From: Yasuhiro KIMURA @ 2020-12-16 17:12 UTC (permalink / raw)
  To: cygwin

From: Mattl Mario <Mario.Mattl@ssi-schaefer.com>
Subject: bash-4.4.12-3: Building package with gcc-10.2 fails due to duplicate symbols
Date: Wed, 16 Dec 2020 16:58:25 +0000

> With the GCC-10.2 Compiler package it's not possible to build the bash-src package anymore.
> 
> I firstly recognized the same issue with a bash-4.3 package, which we are currently using in our toolchain.
> So I decided to try building the Cygwin bash-src package (of course using the common cygport mechanism for applying all patches)

In GCC 10 default is changed from -fcommon to -fno-common. And your
build error is typical case caused by this change.

You can work around it by using -fcommon.

---
Yasuhiro KIMURA

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-16 17:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 16:58 bash-4.4.12-3: Building package with gcc-10.2 fails due to duplicate symbols Mattl Mario
2020-12-16 17:12 ` Yasuhiro KIMURA

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).