Mailing List Archive

[Bug 2577] Exim fails to build/link using -fno-common (GCC 10 default)
https://bugs.exim.org/show_bug.cgi?id=2577

Fabian Groffen <grobian@gentoo.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
URL| |https://bugs.gentoo.org/723
| |430

--- Comment #1 from Fabian Groffen <grobian@gentoo.org> ---
Sorry, should have done this in first post. A copy of the Gentoo bug contents,
so the full information is available here:


See link. This package appears affected. Compiled without problem with gcc-9.
Now on gcc-10.1.0 it is affected by the switched default.

Reproducible: Always

Steps to Reproduce:
1. gcc-10.1.0 without -fcommon overrule
2. fails linking
Actual Results:
x86_64-pc-linux-gnu-gcc -o macro_predef -rdynamic -ldl macro_predef.o
macro-globals.o macro-readconf.o macro-route.o macro-transport.o
macro-drtables.o macro-tls.o macro-appendfile.o macro-autoreply.o macro-lmtp.o
macro-pipe.o macro-queuefile.o macro-smtp.o macro-accept.o macro-dnslookup.o
macro-ipliteral.o macro-iplookup.o macro-manualroute.o macro-queryprogram.o
macro-redirect.o macro-auth-spa.o macro-cram_md5.o macro-cyrus_sasl.o
macro-dovecot.o macro-gsasl_exim.o macro-heimdal_gssapi.o macro-plaintext.o
macro-spa.o macro-authtls.o macro-external.o macro-dkim.o macro-malware.o
macro-signing.o
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-globals.o:(.bss+0x1170): multiple definition of `arc_received';
macro_predef.o:(.bss+0x10): first defined here

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 2577] Exim fails to build/link using -fno-common (GCC 10 default) [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=2577

--- Comment #2 from Jeremy Harris <jgh146exb@wizmail.org> ---
macro-globals.o is the right place for it to be.
I'm not seeing how it arrived in macro_predef.o and I don't have a Gentoo
platform to test on.

Having tried a build, in the build*/ directory, do
"cc -E -O -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -I/usr/local/include
-DMACRO_PREDEF macro_predef.c | grep arc_received".

Is it present in the preprocessor output?
If not, check the cc args using (back in the usual build dir)
"make distclean; make FULLECHO="

If it is present, look at the cpp output for file-source tags to work out
where the definition arrives from.

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 2577] Exim fails to build/link using -fno-common (GCC 10 default) [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=2577

--- Comment #3 from Jeremy Harris <jgh146exb@wizmail.org> ---
Further, if Gentoo is a platform of interest to you please consider operating
one
or more buildfarm animals, with configurations of interest. That way,
regression
testing will get done.

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 2577] Exim fails to build/link using -fno-common (GCC 10 default) [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=2577

--- Comment #4 from Fabian Groffen <grobian@gentoo.org> ---
(In reply to Jeremy Harris from comment #3)
> Further, if Gentoo is a platform of interest to you please consider
> operating one
> or more buildfarm animals, with configurations of interest. That way,
> regression
> testing will get done.

I'm still waiting for a reply on my inquiry for that. :)

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 2577] Exim fails to build/link using -fno-common (GCC 10 default) [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=2577

--- Comment #5 from Fabian Groffen <grobian@gentoo.org> ---
With GCC-9 I can reproduce this issue when using CFLAGS=-fno-common and
enabling EXPERIMENTAL_ARC


x86_64-pc-linux-gnu-gcc -fno-common -I/usr/include/db5.3 -o exim_dbmbuild
-Wl,-O1 -Wl,--as-needed -lssl -lcrypto exim_dbmbuild.o \
-lcrypt -lm -ldb-5.3 -rdynamic -ldl
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-globals.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-readconf.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-route.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-transport.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-drtables.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-tls.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-appendfile.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-autoreply.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-lmtp.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-pipe.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-queuefile.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-smtp.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-accept.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-dnslookup.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-ipliteral.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-iplookup.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-manualroute.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-queryprogram.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-redirect.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-auth-spa.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-cram_md5.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-cyrus_sasl.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-dovecot.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-gsasl_exim.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-heimdal_gssapi.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-plaintext.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-spa.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-authtls.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-external.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-dkim.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-malware.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
macro-signing.o:(.bss+0x0): multiple definition of `arc_received';
macro_predef.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:360: macro_predef] Error 1
make[1]: *** Waiting for unfinished jobs....
>>> exim_dbmbuild utility built


in globals.h I find this:

struct arc_set *arc_received; /* highest ARC instance evaluation
struct */

the rest of all there is properly declared with extern, and I think this one
was missed.

adding extern in front of this one makes the link succeed. Will attach patch
in a second.

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 2577] Exim fails to build/link using -fno-common (GCC 10 default) [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=2577

--- Comment #6 from Fabian Groffen <grobian@gentoo.org> ---
Created attachment 1306
--> https://bugs.exim.org/attachment.cgi?id=1306&action=edit
-fno-common fix

This patch fixes the problem for me.

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 2577] Exim fails to build/link using -fno-common (GCC 10 default) [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=2577

Jeremy Harris <jgh146exb@wizmail.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|Exim 4.95+ |Exim 4.94
Status|NEW |ASSIGNED
Assignee|unallocated@exim.org |jgh146exb@wizmail.org

--- Comment #7 from Jeremy Harris <jgh146exb@wizmail.org> ---
Already fixed: 137ae145e0. Please try 4.94 RC.

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 2577] Exim fails to build/link using -fno-common (GCC 10 default) [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=2577

--- Comment #8 from Fabian Groffen <grobian@gentoo.org> ---
I can confirm RC2 compiles/links with -fno-common

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 2577] Exim fails to build/link using -fno-common (GCC 10 default) [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=2577

Jeremy Harris <jgh146exb@wizmail.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED

--- Comment #9 from Jeremy Harris <jgh146exb@wizmail.org> ---
(In reply to Fabian Groffen from comment #8)
> I can confirm RC2 compiles/links with -fno-common

Closing as confirmed

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##