Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 895580 - kde-frameworks/networkmanager-qt-5.103.0 fails to compile (lto): src/settings/connectionsettings.cpp:57:12: error: type of ‘checkVersion’ does not match original declaration [-Werror=lto-type-mismatch]
Summary: kde-frameworks/networkmanager-qt-5.103.0 fails to compile (lto): src/settings...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard: fixed in 5.104.0
Keywords: PATCH
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2023-02-20 18:23 UTC by Kostadin Shishmanov
Modified: 2023-02-24 11:48 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info and build log (build.log,319.06 KB, text/x-log)
2023-02-20 18:23 UTC, Kostadin Shishmanov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kostadin Shishmanov 2023-02-20 18:23:34 UTC
Created attachment 853358 [details]
emerge --info and build log

kde-frameworks/networkmanager-qt fails to compile with CFLAGS=-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing


/var/tmp/portage/kde-frameworks/networkmanager-qt-5.103.0/work/networkmanager-qt-5.103.0/src/settings/connectionsettings.cpp:57:12: error: type of ‘checkVersion’ does not match original declaration [-Werror=lto-type-mismatch]
   57 | extern int checkVersion(const int x, const int y, const int z);
      |            ^
/var/tmp/portage/kde-frameworks/networkmanager-qt-5.103.0/work/networkmanager-qt-5.103.0/src/manager.cpp:966:6: note: return value type mismatch
  966 | bool NetworkManager::checkVersion(const int x, const int y, const int z)
      |      ^
/var/tmp/portage/kde-frameworks/networkmanager-qt-5.103.0/work/networkmanager-qt-5.103.0/src/manager.cpp:966:6: note: type ‘bool’ should match type ‘int’
/var/tmp/portage/kde-frameworks/networkmanager-qt-5.103.0/work/networkmanager-qt-5.103.0/src/manager.cpp:966:6: note: ‘checkVersion’ was previously declared here
/var/tmp/portage/kde-frameworks/networkmanager-qt-5.103.0/work/networkmanager-qt-5.103.0/src/manager.cpp:966:6: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
lto1: some warnings being treated as errors
lto-wrapper: fatal error: /usr/bin/x86_64-pc-linux-gnu-g++ returned 1 exit status
compilation terminated.
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
Comment 1 Andreas Sturmlechner gentoo-dev 2023-02-24 11:38:40 UTC
Cherry-picked to kf5 branch in https://invent.kde.org/frameworks/networkmanager-qt/-/commit/794fff02b08d15bc5fffd9dee54abc909b53a44a, thanks.