Re: Build failures on GCC 10 due to -fno-common default
Daniel Diaz <[email protected]> Sun, 11 Jul 2021 10:51:50 +0200
| Newsgroups | gmane.comp.gnu.prolog.bugs |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail=_DBA6308D-64BF-4B81-BB75-2A929609FBC4
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=us-ascii
Hi Till,
Sorry for the very late reply.=20
Version 1.5.0 which has been released last week solves this problem.
Daniel
On 2/7/20 9:32 AM, Till Hofmann wrote:
> On 2/7/20 9:31 AM, Till Hofmann wrote:
>> Hi all,
>>=20
>> gprolog currently fails to build on Fedora Rawhide due to a change in
>> GCC 10. With GCC 10, it is no longer allowed to have multiple
>> definitions of the same variable, which may happen if the variable is
>> declared in a header without extern. This causes errors such as this:
>> /usr/bin/ld:
>> =
/builddir/build/BUILD/gprolog-1.4.5/src/Linedit/liblinedit.a(terminal.o):/=
builddir/build/BUILD/gprolog-1.4.5/src/Linedit/linedit.h:92:
>> multiple definition of `pl_le_hook_set_line_buffering';
>> =
/builddir/build/BUILD/gprolog-1.4.5/src/BipsPl/libbips_pl.a(stream_c.o):/b=
uilddir/build/BUILD/gprolog-1.4.5/src/Linedit/linedit.h:92:
>> first defined here
>>=20
>> GCC has an explanation and porting instructions:
>> https://gcc.gnu.org/gcc-10/porting_to.html#common =
<https://gcc.gnu.org/gcc-10/porting_to.html#common>
>>=20
>> I can re-enable -fcommon for Fedora builds. However, the recommended =
way
>> to fix this is to actually fix the code.
>>=20
>> Kind regards,
>> Till
>>=20
> Here's the Fedora BZ ticket with more logs:
> https://bugzilla.redhat.com/show_bug.cgi?id=3D1799464 =
<https://bugzilla.redhat.com/show_bug.cgi?id=3D1799464>
>=20
--Apple-Mail=_DBA6308D-64BF-4B81-BB75-2A929609FBC4
Content-Transfer-Encoding: 7bit
Content-Type: text/html;
charset=us-ascii
<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
<div class="">
<div class="moz-cite-prefix"><div class="moz-cite-prefix">Hi Till,</div><div class="moz-cite-prefix"><br class=""></div><div class="moz-cite-prefix">Sorry for the very late reply. </div><div class="moz-cite-prefix">Version 1.5.0 which has been released last week solves this problem.</div><div class="moz-cite-prefix"><br class=""></div></div>
<div class="moz-cite-prefix">Daniel<br class="">
</div>
<div class="moz-cite-prefix"><br class="">
</div>
<div class="moz-cite-prefix"><br class="">
</div>
<div class="moz-cite-prefix">On 2/7/20 9:32 AM, Till Hofmann wrote:<br class="">
</div>
<blockquote type="cite" cite="mid:[email protected]" class="">
<pre class="moz-quote-pre" wrap="">On 2/7/20 9:31 AM, Till Hofmann wrote:
</pre>
<blockquote type="cite" class="">
<pre class="moz-quote-pre" wrap="">Hi all,
gprolog currently fails to build on Fedora Rawhide due to a change in
GCC 10. With GCC 10, it is no longer allowed to have multiple
definitions of the same variable, which may happen if the variable is
declared in a header without extern. This causes errors such as this:
/usr/bin/ld:
/builddir/build/BUILD/gprolog-1.4.5/src/Linedit/liblinedit.a(terminal.o):/builddir/build/BUILD/gprolog-1.4.5/src/Linedit/linedit.h:92:
multiple definition of `pl_le_hook_set_line_buffering';
/builddir/build/BUILD/gprolog-1.4.5/src/BipsPl/libbips_pl.a(stream_c.o):/builddir/build/BUILD/gprolog-1.4.5/src/Linedit/linedit.h:92:
first defined here
GCC has an explanation and porting instructions:
<a class="moz-txt-link-freetext" href="https://gcc.gnu.org/gcc-10/porting_to.html#common">https://gcc.gnu.org/gcc-10/porting_to.html#common</a>
I can re-enable -fcommon for Fedora builds. However, the recommended way
to fix this is to actually fix the code.
Kind regards,
Till
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">Here's the Fedora BZ ticket with more logs:
<a class="moz-txt-link-freetext" href="https://bugzilla.redhat.com/show_bug.cgi?id=1799464">https://bugzilla.redhat.com/show_bug.cgi?id=1799464</a>
</pre>
</blockquote><p class=""><br class="">
</p>
</div>
</body></html>
--Apple-Mail=_DBA6308D-64BF-4B81-BB75-2A929609FBC4--