Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 638786 - sys-apps/fakechroot-2.17.2 compilation failed with "array type has incomplete element type 'struct timespec'"
Summary: sys-apps/fakechroot-2.17.2 compilation failed with "array type has incomplete...
Status: RESOLVED DUPLICATE of bug 639816
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-25 11:48 UTC by Jiří Moravec
Modified: 2021-03-29 14:23 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiří Moravec 2017-11-25 11:48:46 UTC
build.log part:
...
In file included from __lxstat.c:27:0:
/usr/include/sys/stat.h:361:31: error: array type has incomplete element type 'struct timespec'
         const struct timespec __times[2],
                               ^~~~~~~
__getwd_chk.c:25:0: warning: "_FORTIFY_SOURCE" redefined
 #define _FORTIFY_SOURCE 2
 
<built-in>: note: this is the location of the previous definition
...

Solutions proposed in some forums for same error in different packages were:
1)
--- fakechroot-2.17.2/src/__lxstat.c~   2017-11-25 02:39:29.163331128 +0100
+++ fakechroot-2.17.2/src/__lxstat.c    2017-11-25 02:39:13.388331461 +0100
@@ -24,6 +24,7 @@
 
 #define _ATFILE_SOURCE
 #define _XOPEN_SOURCE
+#include <time.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include <fcntl.h>

2)
--- fakechroot-2.17.2/src/__lxstat.c~   2017-11-25 03:04:47.921299063 +0100
+++ fakechroot-2.17.2/src/__lxstat.c    2017-11-25 03:04:47.922299063 +0100
@@ -22,7 +22,7 @@
 
 #ifdef HAVE___LXSTAT
 
-#define _ATFILE_SOURCE
+#define _USE_XOPEN2K8
 #define _XOPEN_SOURCE
 #include <sys/stat.h>
 #include <unistd.h>

Even just removal of "#define _ATFILE_SOURCE" line from __lxstat.c is enough for successful compilation.
Comment 1 Jonas Stein gentoo-dev 2017-11-27 20:00:26 UTC
Thank you for the report. Please *attach* the logfiles,
https://wiki.gentoo.org/wiki/Bugzilla/Bug_report_guide#Report_a_build-time_bug_.28emerge_failed.29
and reopen this ticket (Status:unconfirmed).
Comment 2 Martin von Gagern 2017-12-19 21:44:12 UTC
Probably a duplicate of bug 639816, which is more recent but has more details.
Comment 3 Ben Kohler gentoo-dev 2021-03-29 14:23:17 UTC
Please open a new bug against the latest version if you still have issues

*** This bug has been marked as a duplicate of bug 639816 ***