Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 924503 - net-misc/nextcloud-client-3.12.3 fails to compile: utility.cpp:195:22: error: variable OCC::Utility::freeDiskSpace(const QString&)::statvfs64 stat has initializer but incomplete type
Summary: net-misc/nextcloud-client-3.12.3 fails to compile: utility.cpp:195:22: error:...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: musl-1.2.4
  Show dependency tree
 
Reported: 2024-02-14 08:42 UTC by Agostino Sarubbo
Modified: 2025-03-31 07:39 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,89.10 KB, text/plain)
2024-02-14 08:42 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2024-02-14 08:42:03 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: net-misc/nextcloud-client-3.11.1 fails to compile.
Discovered on: amd64 (internal ref: tinderbox_musl)
System: MUSL-SYSTEM (https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#MUSL)

Info about the issue:
https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0014
Comment 1 Agostino Sarubbo gentoo-dev 2024-02-14 08:42:05 UTC
Created attachment 884940 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2024-02-14 08:42:07 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
FAILED: src/csync/CMakeFiles/nextcloud_csync.dir/__/common/utility.cpp.o 
/var/tmp/portage/net-misc/nextcloud-client-3.11.1/work/desktop-3.11.1/src/common/utility.cpp:195:22: error: variable 'OCC::Utility::freeDiskSpace(const QString&)::statvfs64 stat' has initializer but incomplete type
Comment 3 Willy 2024-03-11 19:26:01 UTC
Musl does not seems to have it implemented. This patch got me though.

--- a/src/common/utility.cpp    2024-03-06 03:37:52.000000000 -0600
+++ b/src/common/utility.cpp    2024-03-11 13:54:42.266466151 -0500
@@ -192,8 +192,8 @@ qint64 Utility::freeDiskSpace(const QStr
         return (qint64)stat.f_bavail * stat.f_frsize;
     }
 #elif defined(Q_OS_UNIX)
-    struct statvfs64 stat{};
-    if (statvfs64(path.toLocal8Bit().data(), &stat) == 0) {
+    struct statvfs stat{};
+    if (statvfs(path.toLocal8Bit().data(), &stat) == 0) {
         return (qint64)stat.f_bavail * stat.f_frsize;
     }
 #elif defined(Q_OS_WIN)

I also filed an upstream bug:

https://github.com/nextcloud/desktop/issues/6536
Comment 4 Agostino Sarubbo gentoo-dev 2024-03-30 18:32:56 UTC
tinderbox_musl has reproduced this issue with version 3.12.3 - Updating summary.
Comment 5 Larry the Git Cow gentoo-dev 2025-03-31 07:39:35 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e32d32fe99e441a785f0399daf4f23651587310

commit 2e32d32fe99e441a785f0399daf4f23651587310
Author:     Florian Schmaus <flow@gentoo.org>
AuthorDate: 2025-03-31 07:36:32 +0000
Commit:     Florian Schmaus <flow@gentoo.org>
CommitDate: 2025-03-31 07:39:22 +0000

    net-misc/nextcloud-client: define _LARGEFILE64_SOURCE on musl
    
    As per musl porting [1], we now define _LARGEFILE64_SOURCE to fix a
    compilation error when using musl.
    
    1:
    https://wiki.gentoo.org/wiki/Musl_porting_notes#error:_LFS64_interfaces_.28.2A64_undeclared_here.2C_ex._pread64.29
    
    Closes: https://bugs.gentoo.org/924503
    Link: https://github.com/nextcloud/desktop/issues/6536
    Signed-off-by: Florian Schmaus <flow@gentoo.org>

 net-misc/nextcloud-client/nextcloud-client-3.16.2.ebuild | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)