[openchrome-devel] Build failure with GCC 10

Xavier Bachelot xavier at bachelot.org
Fri Feb 21 10:51:33 UTC 2020

Hi Kevin,

Le 20/02/2020 à 23:07, Kevin Brace a écrit :
> Hi Xavier,
> I have not heard from you for a while.
> How have you been?

I'm doing fine, thanks. I'm quite busy with life in general, and part of 
both my pro and spare time is quite full with various opensource stuff. 
Unfortunately not much of it is dedicated to openchrome, and I'm now 
left with only one x86_64 machine still able to run openchrome, due to 
lot of distros dropping i386 support, which most of my VIA boards are. 
However, I still keep an eye on what is going on here and I still take 
care of the very first package I pushed to Fedora, which is the 
openchrome driver :-)

>     Xavier, for this issue, can you open a bug report with https://bugs.freedesktop.org?
> I do not really use the latest compiler for testing, so I was not aware of this issue.
> You will need to attach a text file with relevant error messages indicating which extern variables are causing the issue.

This issue is only visible with GCC 10, and I don't think any stable 
distro ships with it yet. I'm seeing this on Fedora 32, which has not 
even reached beta, so I'm probably the first one to notice.

Actually, I thing the behavior can be reproduced with any GCC version. 
GCC 10 enabled -fno-common by default, but this flag is available in 
earlier GCC as well, so one can reproduce the GCC 10 behavior easily.
For the same reason, the build failure can be worked around quite easily 
too with GCC 10.

The errors are like :
multiple definition of `iga2_crtc_funcs'; 
first defined here

multiple definition of `iga1_crtc_funcs'; 
first defined here

multiple definition of `via_vt1632_funcs'; 
first defined here

Grepping the build log, the affected vars are :

I will drop all of that in a proper bug report with full build log asap.

I'm attaching a quickly hacked patch that fixes the link issue, but I'm 
not confident it's okay. Only build tested, not run tested anyway. the 
patch is against 0.6.209, I'll submit a proper patch once you've looked 
at it and I've tested for real.


> Regards,
> Kevin Brace
> Brace Computer Laboratory blog
> https://bracecomputerlab.com
>> Date: Mon, 17 Feb 2020 18:21:05 +0100
>> From: Xavier Bachelot <xavier at bachelot.org>
>> To: openchrome-devel at lists.freedesktop.org
>> Subject: [openchrome-devel] Build failure with GCC 10
>> Message-ID: <a3efba25-5eae-f0e9-b682-435a90f44649 at bachelot.org>
>> Content-Type: text/plain; charset=utf-8; format=flowed
>> Hi Kevin,
>> openchrome fails to link when using GCC 10 which now defaults to
>> -fno-common, as explained here:
>> https://gcc.gnu.org/gcc-10/porting_to.html#common
>> Regards,
>> Xavier
> _______________________________________________
> openchrome-devel mailing list
> openchrome-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/openchrome-devel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc10.patch
Type: text/x-patch
Size: 3706 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/openchrome-devel/attachments/20200221/1b21a85b/attachment.bin>

More information about the openchrome-devel mailing list