#13511 closed enhancement (fixed)
gcc-10.1.0 (wait for LFS)
Reported by: | Douglas R. Reno | Owned by: | Pierre Labastie |
---|---|---|---|
Priority: | normal | Milestone: | 10.0 |
Component: | BOOK | Version: | SVN |
Severity: | normal | Keywords: | |
Cc: |
Description
New major version
A year has lapsed away since the release of last major GCC release, more than 33 years passed since the first public GCC release and the GCC developers survived repository conversion from SVN to GIT earlier this year. Today, we are glad to announce another major GCC release, 10.1. This release makes great progress in the C++20 language support, both on the compiler and library sides [1], some C2X enhancements, various optimization enhancements and bug fixes, several new hardware enablement changes and enhancements to the compiler back-ends and many other changes. There is even a new experimental static analysis pass [2]. Some code that compiled successfully with older GCC versions might require source changes, see http://gcc.gnu.org/gcc-10/porting_to.html for details. See https://gcc.gnu.org/gcc-10/changes.html for more information about changes in GCC 10.1. This release is available from the FTP servers listed here: http://www.gnu.org/order/ftp.html The release is in gcc/gcc-10.1.0/ subdirectory. If you encounter difficulties using GCC 10.1, please do not contact me directly. Instead, please visit http://gcc.gnu.org for information about getting help. Driving a leading free software project such as GNU Compiler Collection would not be possible without support from its many contributors. Not to only mention its developers but especially its regular testers and users which contribute to its high quality. The list of individuals is too large to thank individually! [1] See https://gcc.gnu.org/projects/cxx-status.html, and https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.2020 [2] See https://developers.redhat.com/blog/2020/03/26/static-analysis-in-gcc-10
Attachments (1)
Change History (53)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 4 years ago
ntp: There is a patch available on ntp.org which is scheduled for ntp-4.2.8p15 (https://bugs.ntp.org/show_bug.cgi?id=3659). In the meanwhile, added -fcommon to CFLAGS, r23093
follow-up: 9 comment:6 by , 4 years ago
xf86-video-ati, xf86-vidoe-intel: CFLAGS=-fcommon added at r23094
by , 4 years ago
Attachment: | qt-everywhere-src-5.14.2-gcc10-1.patch added |
---|
comment:7 by , 4 years ago
QT: Not an -fcommon issue, but also caused by gcc-10. QT compilation terminates with errors like
g++ -o .obj/platform/default/bidi.o platform/default/bidi.cpp agent:2020/03/12 11:42:37 build.go:253: platform/default/bidi.cpp: In member function ‘void mbgl::BiDi::mergeParagraphLineBreaks(std::set<long unsigned int>&)’: agent:2020/03/12 11:42:37 build.go:253: platform/default/bidi.cpp:63:24: error: ‘runtime_error’ is not a member of ‘std’
According to the bugreport on qt.io (https://bugreports.qt.io/browse/QTBUG-82850), it has something to do with standards of gcc. Cannot explain details. I reformatted the patch so it can be applied in the root source directory as usual.
Done in r23096
follow-up: 11 comment:9 by , 4 years ago
comment:10 by , 4 years ago
qtwebengine: Added a patch which fixes issues with gcc-10. Also merged a patch (origin ArchLinux) to enable usage of system-icu again. (r23107)
comment:11 by , 4 years ago
Replying to pierre.labastie:
Replying to thomas:
xf86-video-ati, xf86-vidoe-intel: CFLAGS=-fcommon added at r23094
In case this does not get fixed upstream, an alternative way is:
sed 's/const/extern &/' -i src/gen9_hevc_enc_kernels_binary.h
Sorry, this is for intel-vaapi-driver, not xf86-video-intel.
comment:13 by , 4 years ago
freeglut needs a fix: https://sourceforge.net/p/freeglut/code/1863/
Maybe just wait for next version and add CFLAGS=-fcommon for now...
Added -DCMAKE_C_FLAGS=-fcommon at r23109
follow-up: 22 comment:15 by , 4 years ago
comment:16 by , 4 years ago
Valgrind needs a fix:
gcc -Winline -Wall -Wshadow -Wno-long-long -g -fno-stack-protector -m64 -o libvexmultiarch_test libvexmultiarch_test-libvex_test.o ../../VEX/libvexmultiarch-amd64-linux.a ../../VEX/libvex-amd64-linux.a /usr/bin/ld: ../../VEX/libvex-amd64-linux.a(libvex_amd64_linux_a-guest_s390_helpers.o):/sources/valgrind-3.15.0/valgrind-3.15.0/VEX/priv/guest_s390_defs.h:289: multiple definition of `s390x_vec_op_t'; ../../VEX/libvexmultiarch-amd64-linux.a(libvexmultiarch_amd64_linux_a-multiarch_main_main.o):/sources/valgrind-3.15.0/valgrind-3.15.0/VEX/priv/guest_s390_defs.h:289: first defined here /usr/bin/ld: ../../VEX/libvex-amd64-linux.a(libvex_amd64_linux_a-guest_s390_toIR.o):/sources/valgrind-3.15.0/valgrind-3.15.0/VEX/priv/guest_s390_defs.h:289: multiple definition of `s390x_vec_op_t'; ../../VEX/libvexmultiarch-amd64-linux.a(libvexmultiarch_amd64_linux_a-multiarch_main_main.o):/sources/valgrind-3.15.0/valgrind-3.15.0/VEX/priv/guest_s390_defs.h:289: first defined here /usr/bin/ld: ../../VEX/libvex-amd64-linux.a(libvex_amd64_linux_a-host_s390_defs.o):/sources/valgrind-3.15.0/valgrind-3.15.0/VEX/priv/guest_s390_defs.h:289: multiple definition of `s390x_vec_op_t'; ../../VEX/libvexmultiarch-amd64-linux.a(libvexmultiarch_amd64_linux_a-multiarch_main_main.o):/sources/valgrind-3.15.0/valgrind-3.15.0/VEX/priv/guest_s390_defs.h:289: first defined here /usr/bin/ld: ../../VEX/libvex-amd64-linux.a(libvex_amd64_linux_a-host_s390_isel.o):/sources/valgrind-3.15.0/valgrind-3.15.0/VEX/priv/guest_s390_defs.h:289: multiple definition of `s390x_vec_op_t'; ../../VEX/libvexmultiarch-amd64-linux.a(libvexmultiarch_amd64_linux_a-multiarch_main_main.o):/sources/valgrind-3.15.0/valgrind-3.15.0/VEX/priv/guest_s390_defs.h:289: first defined here collect2: error: ld returned 1 exit status
Note that I originally noticed this while running the regression test. That makes me wonder about the functionality of the program itself.
Looking for a fix...
comment:17 by , 4 years ago
Valgrind:
It looks like we'll need to change an 'enum' to a 'typedef enum' in VEX/priv/guest_s390_defs.h. There are multiple 'enum's though, and only one of them are affected. The sed I found is:
sed -i '267 s/enum/typedef enum/' VEX/priv/guest_s390_defs.h
Testing now
comment:18 by , 4 years ago
Valgrind
Attempting to run Valgrind on a program may result in a segfault because GCC-10 changed the way that assembly was produced in a way that Valgrind's developers did not account for (from my understanding, this is due to -fno-common, but I'm not sure). The tests show this with:
== 711 tests, 11 stderr failures, 5 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == memcheck/tests/amd64/shr_edx (stdout) memcheck/tests/amd64/shr_edx (stderr) memcheck/tests/overlap (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc09_bad_unlock (stderr) drd/tests/sem_open2 (stderr) drd/tests/sem_open_traced (stderr) none/tests/amd64/fxtract (stdout) none/tests/amd64/fxtract (stderr) none/tests/amd64/jrcxz (stdout) none/tests/amd64/jrcxz (stderr) none/tests/amd64/sbbmisc (stdout) none/tests/amd64/sbbmisc (stderr) none/tests/amd64/shrld (stdout) none/tests/amd64/shrld (stderr) exp-sgcheck/tests/stackerr (stderr)
Some of the commits that fix this are (these are all related to GCC-10):
https://sourceware.org/git/?p=valgrind.git;a=commit;h=fe6805efc1b6db0cfa5f1cd5fb1854775cbfa31a https://sourceware.org/git/?p=valgrind.git;a=commit;h=2dab3249867615055a680cad7fccb22411587579 https://sourceware.org/git/?p=valgrind.git;a=commit;h=4c39fd9a0098648e19ab6e436a515dc0d9fd387e https://sourceware.org/git/?p=valgrind.git;a=commit;h=ee18ab11ddf41a7a484fea01e8738c32bae630d9
I'm going to roll up a patch for this.
follow-up: 21 comment:19 by , 4 years ago
openjdk needs a fix. Looks like --with-extra-cflags=-fcommon should do
comment:21 by , 4 years ago
Replying to pierre.labastie:
openjdk needs a fix. Looks like --with-extra-cflags=-fcommon should do
Unfortunately not. There are also segfaults, which may be due to too aggressive optimization, according to bug reports (for other versions of openjdk: java-12 does not seem to be in wide use).
comment:22 by , 4 years ago
Replying to pierre.labastie:
p7zip needs a fix: https://src.fedoraproject.org/rpms/p7zip/c/c3938a10a21b4eda3cc002c5e0c65ac7191d8b6b?branch=master
p7zip fixed at revision 23116.
comment:26 by , 4 years ago
xf86-video-amdgpu needs:
sed -i 's/^miPointerSpriteFuncRec/extern &/' src/drmmode_display.h
comment:29 by , 4 years ago
lxtask has "multiple definitions" errors. Found this patch: https://gitweb.gentoo.org/repo/gentoo.git/tree/lxde-base/lxtask/files/lxtask-0.1.7-fix-no-common.patch?id=a6e8c6ce860d627a878d8957c81c6991860aed67
Works with:
configure --prefix=/usr CFLAGS=-fcommon
comment:30 by , 4 years ago
menu-cache has "multiple definitions" errors. Pass by adding CFLAGS=-fcommon to configure.
follow-up: 37 comment:31 by , 4 years ago
dhcp has errors. There is patch by xry111. But since it removes completely the faulty variables, I am not sure about it...
comment:32 by , 4 years ago
tcsh needs -fcommon
CFLAGS=-fcommon ./configure --prefix=/usr --bindir=/bin
Fixed at revision 23128.
comment:33 by , 4 years ago
jfsutils needs -fcommon
CFLAGS=-fcommon ./configure
Fixed at revision 23129.
comment:34 by , 4 years ago
Sawfish needs a patch:
https://github.com/SawfishWM/sawfish/commit/d4364707a58d335dab4d6ca11b761fd91ef2434d
CFLAGS=-fcommon didn't work for me. Going to start work on this now
comment:37 by , 4 years ago
Replying to pierre.labastie:
dhcp has errors. There is patch by xry111. But since it removes completely the faulty variables, I am not sure about it...
I'm now convinced xry111's patch is the way to go. Can be applied with two seds:
sed -i -r '/u.*(local|remote)_port/d' client/dhclient.c relay/dhcrelay.c sed -i '/o.*dhcp_type/d' server/mdb.c
comment:38 by , 4 years ago
transcode has "multiple definitions" errors. The symbol audio is defined in several .c files and no .h. Better use CFLAGS...
comment:40 by , 4 years ago
vinagre needs an extern in a .h file, and to define the variable in the corresponding .c file. No confirmation upstream (no bugs, no commit, no PR, as far as I can see). Will use CFLAGS.
comment:43 by , 4 years ago
libreoffice has a "format-overflow" false positive... [Edit] patch: https://cgit.freedesktop.org/libreoffice/core/commit/?id=047e8ae5d189f030d565b13f97a4d6a45b00e6be
comment:44 by , 4 years ago
libreoffice: the patch fixes the "format-overflow" issue, but I have another one:
CXX OutputShape.lo In file included from /usr/include/boost/format/alt_sstream.hpp:174, from /usr/include/boost/format/internals.hpp:24, from /usr/include/boost/format.hpp:38, from PMDExceptions.h:15, from OutputShape.h:16, from OutputShape.cpp:10: /usr/include/boost/format/alt_sstream_impl.hpp: In instantiation of ‘boost::io:: basic_altstringbuf<Ch, Tr, Alloc>::int_type boost::io::basic_altstringbuf<Ch, Tr , Alloc>::overflow(boost::io::basic_altstringbuf<Ch, Tr, Alloc>::int_type) [with Ch = char; Tr = std::char_traits<char>; Alloc = std::allocator<char>; boost::io::basic_altstringbuf<Ch, Tr, Alloc>::int_type = int]’: /usr/include/boost/format/alt_sstream_impl.hpp:227:9: required from here /usr/include/boost/format/alt_sstream_impl.hpp:261:45: error: no matching function for call to ‘std::allocator<char>::allocate(std::size_t&, char*)’ 261 | newptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0); | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10.1.0/memory:64, from OutputShape.h:13, from OutputShape.cpp:10: /usr/include/c++/10.1.0/bits/allocator.h:167:7: note: candidate: ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = char; std::size_t = long unsigned int]’ 167 | allocate(size_t __n) | ^~~~~~~~ /usr/include/c++/10.1.0/bits/allocator.h:167:7: note: candidate expects 1 argument, 2 provided make[5]: *** [Makefile:493: OutputShape.lo] Error 1 make[4]: *** [Makefile:381: all-recursive] Error 1 make[3]: *** [Makefile:490: all-recursive] Error 1 make[2]: *** [Makefile:401: all] Error 2 make[1]: *** [/sources/libreoffice/libreoffice-6.4.3.2/external/libpagemaker/ExternalProject_libpagemaker.mk:24: /sources/libreoffice/libreoffice-6.4.3.2/workdir/ExternalProject/libpagemaker/build]
will try disabling system boost
comment:45 by , 4 years ago
libreoffice: there is a patch (to modify bundled boost, actually) https://cgit.freedesktop.org/libreoffice/core/commit/?id=677c8de4fa79cd9b278b142013ba7f1c9e4e41c3
there is a PR at boost: https://github.com/boostorg/format/pull/70
comment:48 by , 4 years ago
Replying to pierre.labastie:
rox-filer has "multiple definition" error.
Seems to be fixed with:
sed -i 's/gboolean/extern &/' src/session.h
comment:49 by , 4 years ago
vsftpd has a conversion error:
sysstr.c:77:40: error: implicit conversion from ‘enum EVSFSysStrOpenMode’ to ‘enum EVSFSysUtilOpenMode’ [-Werror=enum-conversion] 77 | enum EVSFSysUtilOpenMode open_mode = kVSFSysStrOpenUnknown; | ^~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors
Can be fixed with:
sed -i 's/kVSFSysStrOpenUnknown;/0;/' sysstr.c
comment:50 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
vsftpd, libreoffice, rox-filer fixed at r23151. Boost patched at the same revision. Closing.
Xi Ruoyao has found several issues because of the -fno-common default. See: http://linuxfromscratch.org/~xry111/fno-common-patches/
Also, on blfs-dev mailing list, from Ryan Marsaw:
Also the link to upstream fix: https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=641d3f489cf6238bb916368d4ba0d9325a235afb