Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to build with GCC 7 #277

Closed
Vogtinator opened this issue Jul 2, 2020 · 4 comments
Closed

Fails to build with GCC 7 #277

Vogtinator opened this issue Jul 2, 2020 · 4 comments

Comments

@Vogtinator
Copy link
Contributor

Building with GCC 7 fails with:

[   51s] c++ -Iqt/becf854@@AppStreamQt@sha -Iqt/ -I../qt -Isrc/ -I../src -I/usr/include/qt5/QtCore -I/usr/include/qt5 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=gnu++14 -Wno-unused-parameter -Wno-error=deprecated-copy -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -fPIC -pthread -DQT_CORE_LIB -MD -MQ 'qt/becf854@@AppStreamQt@sha/icon.cpp.o' -MF 'qt/becf854@@AppStreamQt@sha/icon.cpp.o.d' -o 'qt/becf854@@AppStreamQt@sha/icon.cpp.o' -c ../qt/icon.cpp
[   51s] cc1plus: error: -Werror=deprecated-copy: no option -Wdeprecated-copy

Not sure whether GCC 7 is supported, but just removing the option results in a successful build:

--- AppStream-0.12.11.orig/meson.build
+++ AppStream-0.12.11/meson.build
@@ -54,7 +54,7 @@ endif
 
 # a few compiler warning flags we always want enabled
 add_global_arguments('-Werror=implicit-function-declaration', '-Wno-unused-parameter', language: 'c')
-add_global_arguments('-Wno-unused-parameter', '-Wno-error=deprecated-copy', language: 'cpp')
+add_global_arguments('-Wno-unused-parameter', language: 'cpp')
 add_global_arguments('-DAS_COMPILATION', language : 'c')
 
 #

@ximion
Copy link
Owner

ximion commented Nov 30, 2020

GCC 7 isn't really supported well anymore (no tests for distributions using it in the CI), but if you need it we could for sure add support for it back.

@Vogtinator
Copy link
Contributor Author

GCC 7 is the default compiler on openSUSE Leap 15.x (inherited from SLE 15), so we'll try to use it as long as possible. Though later (ABI compatible) versions of GCC are also available, so we could switch to those if necessary.

@ximion ximion closed this as completed in b446d13 Jan 9, 2021
@ximion
Copy link
Owner

ximion commented Jan 9, 2021

I originally wanted to make this conditional on the compiler version, but actually this version override is no longer needed so we can just drop it (it had to do with some older Qt-related issues).
Thank you for your patience, newer versions of AppStream should build with older compilers again :-)

@Vogtinator
Copy link
Contributor Author

Yay, so I can drop the downstream patch with the next update again. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants