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 :
/usr/bin/ld:
.libs/via_exa.o:/builddir/build/BUILD/xf86-video-openchrome-20200131/src/via_driver.h:365:
multiple definition of `iga2_crtc_funcs';
.libs/via_analog.o:/builddir/build/BUILD/xf86-video-openchrome-20200131/src/via_driver.h:365:
first defined here
/usr/bin/ld:
.libs/via_exa.o:/builddir/build/BUILD/xf86-video-openchrome-20200131/src/via_driver.h:364:
multiple definition of `iga1_crtc_funcs';
.libs/via_analog.o:/builddir/build/BUILD/xf86-video-openchrome-20200131/src/via_driver.h:364:
first defined here
/usr/bin/ld:
.libs/via_exa.o:/builddir/build/BUILD/xf86-video-openchrome-20200131/src/via_vt1632.h:54:
multiple definition of `via_vt1632_funcs';
.libs/via_analog.o:/builddir/build/BUILD/xf86-video-openchrome-20200131/src/via_vt1632.h:54:
first defined here
Grepping the build log, the affected vars are :
iga1_crtc_funcs
iga2_crtc_funcs
via_sii164_funcs
via_vt1632_funcs
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,
Xavier
Regards,
Kevin Brace
Brace Computer Laboratory blog
https://bracecomputerlab.com
Date: Mon, 17 Feb 2020 18:21:05 +0100
From: Xavier Bachelot
To: openchrome-devel@lists.freedesktop.org
Subject: [openchrome-devel] Build failure with GCC 10
Message-ID:
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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/openchrome-devel
diff -Naur xf86-video-openchrome-20200131.orig/src/via_driver.h xf86-video-openchrome-20200131/src/via_driver.h
--- xf86-video-openchrome-20200131.orig/src/via_driver.h 2020-02-21 10:52:01.523263642 +0100
+++ xf86-video-openchrome-20200131/src/via_driver.h 2020-01-23 01:27:57.0 +0100
@@ -361,8 +361,8 @@
void viaProcessOptions(ScrnInfoPtr pScrn);
/* In via_display.c. */
-const xf86CrtcFuncsRec iga1_crtc_funcs;
-const xf86CrtcFuncsRec iga2_crtc_funcs;
+extern xf86CrtcFuncsRec iga1_crtc_funcs;
+extern xf86CrtcFuncsRec iga2_crtc_funcs;
/* In via_exa.c. */
Bool viaInitExa(ScreenPtr pScreen);
diff -Naur xf86-video-openchrome-20200131.orig/src/via_sii164.h xf86-video-openchrome-20200131/src/via_sii164.h
--- xf86-video-openchrome-20200131.orig/src/via_sii164.h 2020-02-21 10:52:52.587481902 +0100
+++ xf86-video-openchrome-20200131/src/via_sii164.h 2020-01-23 01:27:57.0 +0100
@@ -51,7 +51,7 @@
} viaSiI164Rec, *viaSiI164RecPtr;
-const xf86OutputFuncsRec via_sii164_funcs;
+extern xf86OutputFuncsRec via_sii164_funcs;
Bool viaSiI164Probe(ScrnInfoPtr pScrn, I2CBusPtr pI2CBus);
void viaSiI164Init(ScrnInfoPtr pScrn);
diff -Naur xf86-video-openchrome-20200131.orig/src/via_vt1632.h xf86-video-openchrome-20200131/src/via_vt1632.h
--- xf86-video-openchrome-20200131.orig/src/via_vt1632.h 2020-02-21 10:53:44.302702683 +0100
+++ xf86-video-openchrome-20200131/src/via_vt1632.h 2020-01-23 01:27:57.0 +0100
@@ -51,7 +51,7 @@
} viaVT1632Rec, *viaVT1632RecPtr;
-const xf86OutputFuncsRec via_vt1632_funcs;
+extern xf86OutputFuncsRec