Bug 386948 - Does not compile on armhf
Summary: Does not compile on armhf
Status: RESOLVED FIXED
Alias: None
Product: kget
Classification: Applications
Component: Core (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KGet authors
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-15 14:47 UTC by Jonathan Riddell
Modified: 2018-04-09 18:53 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Riddell 2017-11-15 14:47:58 UTC
KGet in master does not compile on armhf which is 32 bit.

https://build.neon.kde.org/job/xenial_unstable_applications_kget_bin_armhf/2/console

In file included from /workspace/build/obj-arm-linux-gnueabihf/kgetcore_automoc.cpp:3:0:
17:48:43 /workspace/build/obj-arm-linux-gnueabihf/moc_datasourcefactory.cpp: In static member function ‘static void DataSourceFactory::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)’:
17:48:43 /workspace/build/obj-arm-linux-gnueabihf/moc_datasourcefactory.cpp:225:22: error: ‘class DataSourceFactory’ has no member named ‘open64’
17:48:43          case 19: _t->open64((*reinterpret_cast< KIO::Job*(*)>(_a[1]))); break;
17:48:43                       ^
Comment 1 Wolfgang Bauer 2017-11-15 16:48:11 UTC
Sounds like https://bugreports.qt.io/browse/QTBUG-57796 and https://gitlab.kitware.com/cmake/cmake/issues/16640 .

Should be fixed in cmake 2.9.0.
If I interpret the log correctly, that build uses 2.8.9 though...
Comment 2 Wolfgang Bauer 2017-11-15 17:07:57 UTC
(In reply to Wolfgang Bauer from comment #1)
> Should be fixed in cmake 2.9.0.
Oops, I mean 3.9.0 of course.
Comment 3 Wolfgang Bauer 2017-11-16 12:47:10 UTC
Git commit 1d78410a557ae45fa55fedcf2b97103da988b334 by Wolfgang Bauer.
Committed on 16/11/2017 at 12:29.
Pushed by wbauer into branch 'Applications/17.12'.

Fix build on 32bit systems

cmake < 3.9.0 has a bug that causes the build to fail on 32bit systems:
https://gitlab.kitware.com/cmake/cmake/merge_requests/671

This workaround is taken from kio, commit 781cfa4e2.

M  +12   -0    CMakeLists.txt

https://commits.kde.org/kget/1d78410a557ae45fa55fedcf2b97103da988b334
Comment 4 Jonathan Riddell 2017-11-16 13:25:00 UTC
unfortunately I don't see a change with this commit
https://build.neon.kde.org/job/xenial_unstable_applications_kget_bin_armhf/4/console

13:03:39 /workspace/build/obj-arm-linux-gnueabihf/moc_datasourcefactory.cpp:225:22: error: ‘class DataSourceFactory’ has no member named ‘open64’
13:03:39          case 19: _t->open64((*reinterpret_cast< KIO::Job*(*)>(_a[1]))); break;
13:03:39                       ^

built with 1d78410a557ae45fa55fedcf2b97103da988b334
Comment 5 Wolfgang Bauer 2017-11-16 13:32:18 UTC
(In reply to Jonathan Riddell from comment #4)
> unfortunately I don't see a change with this commit

Yes, I just noticed. :-(

Strange, the fix worked on openSUSE Tumbleweed i586 when using cmake 3.5.2 instead of the default 3.9.5... (it originally failed with the same error)
Hm.
Comment 6 Wolfgang Bauer 2017-11-17 19:12:27 UTC
Anyway, the reason for the build failure obviously is that open is #define'd to open64 (when the moc file is generated), and DataSourceFactory has a slot named "open"...
So it should be fixed by either #undef'ing open, or rename that slot.

I'll do the latter, as it's just a private slot that's only used in one place.
Comment 7 Wolfgang Bauer 2017-11-17 19:18:05 UTC
Git commit 93870f22352f086b90f3ce27bd26d31eaf2036ef by Wolfgang Bauer.
Committed on 17/11/2017 at 19:08.
Pushed by wbauer into branch 'Applications/17.12'.

Rename slot DataSourceFactory::open()

On some (32bit) systems, open may be #define'd to open64 when the moc
file is generated, which breaks the compilation.
Renaming the slot to slotOpen() should avoid this problem.

M  +2    -2    core/datasourcefactory.cpp
M  +1    -1    core/datasourcefactory.h

https://commits.kde.org/kget/93870f22352f086b90f3ce27bd26d31eaf2036ef