Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 394145 - app-portage/portage-utils-0.6 failed to build: missing utimensat
Summary: app-portage/portage-utils-0.6 failed to build: missing utimensat
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: Normal normal (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 393163
  Show dependency tree
 
Reported: 2011-12-09 12:35 UTC by Naohiro Aota
Modified: 2011-12-11 05:58 UTC (History)
1 user (show)

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


Attachments
0004-Check-utimensat-availability.patch (0004-Check-utimensat-availability.patch,1.06 KB, patch)
2011-12-09 12:35 UTC, Naohiro Aota
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Naohiro Aota gentoo-dev 2011-12-09 12:35:09 UTC
Created attachment 295287 [details, diff]
0004-Check-utimensat-availability.patch

Build failed with:

In file included from include_applets.h:15:0,
                 from main.c:1170:
qmerge.c: In function 'merge_tree_at':
qmerge.c:615:17: error: 'struct stat' has no member named 'st_mtim'
qmerge.c:616:17: error: 'struct stat' has no member named 'st_mtim'
qmerge.c:617:4: warning: implicit declaration of function 'futimens'
qmerge.c:617:4: warning: nested extern declaration of 'futimens'
qmerge.c:658:17: error: 'struct stat' has no member named 'st_mtim'
qmerge.c:659:17: error: 'struct stat' has no member named 'st_mtim'
qmerge.c:660:4: warning: implicit declaration of function 'utimensat'
qmerge.c:660:4: warning: nested extern declaration of 'utimensat'


I don't know this patch is enough.. but this make it build pass.
Comment 1 SpanKY gentoo-dev 2011-12-09 16:48:36 UTC
considering it's part of POSIX, i'm not sure i want to bother supporting non-POSIX setups in portage-utils as it'll turn into an ifdef mess

http://pubs.opengroup.org/onlinepubs/9699919799/functions/futimens.html
Comment 2 Fabian Groffen gentoo-dev 2011-12-09 18:35:29 UTC
it would really make things much easier if the package could get autotooled
Comment 3 SpanKY gentoo-dev 2011-12-09 18:52:41 UTC
just autotooling it wouldn't help.  i'd still ifdef garbage in the source.  it'd need autotooling & merging of gnulib so i wouldn't have to worrying about portability crap.  i guess we've hit that point with portage-utils.
Comment 4 Fabian Groffen gentoo-dev 2011-12-09 19:03:26 UTC
I don't think we really need gnulib, but I have nothing against that approach either.
Comment 5 SpanKY gentoo-dev 2011-12-09 19:12:49 UTC
i'm not going to accept #ifdef's around functions (like the proposed patch here does).  a basic autotools port wouldn't solve that problem.  it'd simply allow collapsing the ifdef checks to a single one: #ifdef HAVE_UTIMENSAT.  but the ifdef still exists which i don't want (because i'd have to consider how to implement the functionality in question rather than just disabling it) which means autotools wouldn't help.

adding gnulib would solve that because i can continue to assume funcs like utimensat/getline/etc... exist even when on older/stupid systems.
Comment 6 Fabian Groffen gentoo-dev 2011-12-09 19:19:36 UTC
It's ok.  I forgot we already use gnulib for portage-utils on the platforms that need it.
Comment 7 SpanKY gentoo-dev 2011-12-11 05:58:43 UTC
i've added a portage-utils-0.7 to the tree which includes autotools/gnulib.  but they only get executed on non-Linux systems.  i imagine this should fix any bsd build issues, as well as allow the prefix guys to merge their external changes back into the main tree.