Bug 274462 - build failure in kmemoryinfo - swapctl
Summary: build failure in kmemoryinfo - swapctl
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Portability-Compilation (show other bugs)
Version: 2.0.0
Platform: Compiled Sources Solaris
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-29 22:30 UTC by tropikhajma
Modified: 2017-08-19 21:06 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tropikhajma 2011-05-29 22:30:21 UTC
Version:           2.0.0 (using KDE 4.6.2) 
OS:                Solaris

building digikam-2.0.0-beta5 on Solaris 11e/amd64 with gcc 4.5.2 fails with: 

...
In file included from /home/test/packages/BUILD/digikam-2.0.0-beta5/i386/digikam-2.0.0-beta5/core/libs/3rdparty/kmemoryinfo/kmemoryinfo_backend.cpp:408:0,
                 from /home/test/packages/BUILD/digikam-2.0.0-beta5/i386/digikam-2.0.0-beta5/core/libs/3rdparty/kmemoryinfo/kmemoryinfo.cpp:182:
/usr/include/sys/swap.h:51:2: error: #error "Cannot use swapctl in the large files compilation environment"

Just for the record, the below patch lets me proceed, but there's no doubt it's just a crude hack and not a proper solution:

--- digikam-2.0.0-beta5/core/libs/3rdparty/kmemoryinfo/kmemoryinfo_backend.cpp.orig	2011-05-29 22:01:30.372131120 +0200
+++ digikam-2.0.0-beta5/core/libs/3rdparty/kmemoryinfo/kmemoryinfo_backend.cpp	2011-05-29 22:02:06.723252758 +0200
@@ -404,6 +404,9 @@
 // ----------------------------------------------------------------------------
 
 #ifdef Q_OS_SOLARIS
+#ifdef _FILE_OFFSET_BITS
+#undef _FILE_OFFSET_BITS
+#endif
 #include <sys/stat.h>
 #include <sys/swap.h>
 #include <unistd.h>


Reproducible: Always
Comment 1 caulier.gilles 2011-06-08 13:12:25 UTC
As i don't have a Solaris computer, i cannot found a better way to fix this problem.

Gilles Caulier
Comment 2 caulier.gilles 2011-06-08 13:13:10 UTC
Git commit 497a0cc2e9e601366875151dfd2a01de69a0f20e by Gilles Caulier.
Committed on 08/06/2011 at 13:12.
Pushed by cgilles into branch 'master'.

fix broken compilation under Solaris
BUGS: 274462

M  +3    -0    libs/3rdparty/kmemoryinfo/kmemoryinfo_backend.cpp     

http://commits.kde.org/digikam/497a0cc2e9e601366875151dfd2a01de69a0f20e
Comment 3 Francesco Riosa 2011-06-10 14:29:11 UTC
Git commit 054de546570266f8c5dd224eb72814a42d4679b4 by Francesco Riosa, on behalf of Gilles Caulier.
Committed on 08/06/2011 at 13:12.
Pushed by riosa into branch 'sql/2.0'.

fix broken compilation under Solaris
BUGS: 274462

M  +3    -0    libs/3rdparty/kmemoryinfo/kmemoryinfo_backend.cpp     

http://commits.kde.org/digikam/054de546570266f8c5dd224eb72814a42d4679b4