[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: failed to build with gcc10
From: |
Shigio YAMAGUCHI |
Subject: |
Re: failed to build with gcc10 |
Date: |
Wed, 12 Feb 2020 20:11:55 +0900 |
Hello,
I fixed the bug by changing the library side. I confirmed that
the following command was successful.
$ ./configure CFLAGS=-fno-common
$ make
Thank you for the report!
cvs diff: Diffing .
Index: args.c
===================================================================
RCS file: /sources/global/global/libutil/args.c,v
retrieving revision 1.12
diff -r1.12 args.c
42,45c42,45
< int type;
< const char **argslist;
< FILE *ip;
< GFIND *gp;
---
> static int type;
> static const char **argslist;
> static FILE *ip;
> static GFIND *gp;
Index: convert.c
===================================================================
RCS file: /sources/global/global/libutil/convert.c,v
retrieving revision 1.3
diff -r1.3 convert.c
49c49
< int flags;
---
> static int flags;
Index: gpathop.c
===================================================================
RCS file: /sources/global/global/libutil/gpathop.c,v
retrieving revision 1.48
diff -r1.48 gpathop.c
52c52
< int openflags;
---
> static int openflags;
Index: version.c
===================================================================
RCS file: /sources/global/global/libutil/version.c,v
retrieving revision 1.37
diff -r1.37 version.c
33c33
< const char *copy = "\
---
> static const char *copy = "\
2020年2月12日(水) 1:28 Pavel Zhukov <address@hidden>:
>
>
> Hello,
>
> global-6.6.4 is failed to build with newest gcc because -fno-common is
> enabled by default.
>
> /usr/bin/ld:
> ../libutil/libgloutil.a(args.o):/builddir/build/BUILD/global-6.6.3/libutil/args.c:42:
> multiple definition of `type';
> global.o:/builddir/build/BUILD/global-6.6.3/global/global.c:134: first
> defined here
> collect2: error: ld returned 1 exit status
> make[2]: *** [Makefile:459: global] Error 1
>
> Successfully built with:
>
> diff --git a/global/global.c b/global/global.c
> index e406e89..0f0a430 100644
> --- a/global/global.c
> +++ b/global/global.c
> @@ -131,7 +131,7 @@ int debug;
> int literal; /**< 1: literal search */
> int print0; /**< --print0 option */
> int format;
> -int type; /**< path conversion type */
> +extern int type; /**< path conversion type */
> int match_part; /**< match part only */
> int abslib; /**< absolute path only in library
> project */
> int use_color; /**< coloring */
>
> --
> PAVEL ZHUKOV
> SOFTWARE ENGINEER, RHCE, RHCVA
> Red Hat
> address@hidden IM: IRC: landgraf
>
>
>
>
--
Shigio YAMAGUCHI <address@hidden>
PGP fingerprint:
26F6 31B4 3D62 4A92 7E6F 1C33 969C 3BE3 89DD A6EB