Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 706256

Summary: =app-arch/sharutils-4.15.2-r1 fails w/ -fno-common
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 705764    

Description Toralf Förster gentoo-dev 2020-01-24 19:43:27 UTC
Wno-format-contains-nul -c -o shar.o shar.c
shar.c: In function ‘print_header_stamp’:
shar.c:934:7: warning: format not a string literal and no format arguments [-Wformat-security]
  934 |       error (0, errno, _("Cannot get current directory name"));
      |       ^~~~~
shar.c: In function ‘configure_shar’:
shar.c:2158:16: warning: format not a string literal and no format arguments [-Wformat-security]
 2158 |                _("reopening stderr to /dev/null"));
      |                ^
shar.c:2228:2: warning: format not a string literal and no format arguments [-Wformat-security]
 2228 |  error (0, 0, _("PLEASE avoid -X shars on Usenet or public networks"));
      |  ^~~~~
x86_64-pc-linux-gnu-gcc -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I. -I..  -I../libopts -I. -I.. -I../lib -I../lib -I../intl  -Wno-format-contains-nul -O2 -pipe -march=native -fno-common -Wno-error=format-security -Wno-format-contains-nul -c -o encode.o encode.c
x86_64-pc-linux-gnu-gcc -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I. -I..  -I../libopts -I. -I.. -I../lib -I../lib -I../intl  -Wno-format-contains-nul -O2 -pipe -march=native -fno-common -Wno-error=format-security -Wno-format-contains-nul -c -o scribble.o scribble.c
x86_64-pc-linux-gnu-gcc -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I. -I..  -I../libopts -I. -I.. -I../lib -I../lib -I../intl  -Wno-format-contains-nul -O2 -pipe -march=native -fno-common -Wno-error=format-security -Wno-format-contains-nul -c -o shar-opts.o shar-opts.c
x86_64-pc-linux-gnu-gcc -Wno-format-contains-nul -O2 -pipe -march=native -fno-common -Wno-error=format-security -Wno-format-contains-nul  -Wl,-O1 -Wl,--as-needed -o shar shar.o encode.o scribble.o shar-opts.o ../libopts/libopts.a ../lib/libgnu.a ../lib/libgnu.a     
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: shar-opts.o:(.data.rel.ro.local+0x10): multiple definition of `program_name'; shar.o:(.rodata+0x1a40): first defined here
collect2: error: ld returned 1 exit status
Comment 1 Larry the Git Cow gentoo-dev 2020-05-02 12:18:59 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2fc78c6750cb4d92e6411b71f47218ea51335763

commit 2fc78c6750cb4d92e6411b71f47218ea51335763
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-05-02 12:15:03 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-05-02 12:18:52 +0000

    app-arch/sharutils: tweak for gcc-10, bug #706256
    
    Reported-by: Toralf Förster
    Closes: https://bugs.gentoo.org/706256
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 .../sharutils/files/sharutils-4.15.2-gcc-10.patch  | 48 ++++++++++++++++++++++
 app-arch/sharutils/sharutils-4.15.2-r1.ebuild      |  1 +
 2 files changed, 49 insertions(+)