GNOME Bugzilla – Bug 791784
'cp -u' is not supported on FreeBSD
Last modified: 2017-12-24 14:27:15 UTC
This problem was found when building gst-libav with gtk-doc enabled: gmake[1]: Entering directory '/home/lantw44/gnome/build/gst-libav/docs/plugins' DOC Scanning header files cp: illegal option -- u usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] source_file target_file cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] source_file ... target_directory cp: illegal option -- u usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] source_file target_file cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] source_file ... target_directory cp: illegal option -- u usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] source_file target_file cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] source_file ... target_directory cp: illegal option -- u usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] source_file target_file cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] source_file ... target_directory cp: illegal option -- u usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] source_file target_file cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] source_file ... target_directory cp: illegal option -- u usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] source_file target_file cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] source_file ... target_directory DOC Building XML DOC Building HTML warning: failed to load external entity "xml/tree_index.sgml" gst-libav-plugins-docs.sgml:38: element include: XInclude error : could not load xml/tree_index.sgml, and no fallback was found gmake[1]: *** [Makefile:897: html-build.stamp] Error 6 Since 'cp -u' cannot be found in POSIX (http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cp.html), can we simply remove -u from gtk-doc-plugins.mak?
(In reply to Ting-Wei Lan from comment #0) > Since 'cp -u' cannot be found in POSIX > (http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cp.html), can we > simply remove -u from gtk-doc-plugins.mak? That will slow down some developers work flow as it will copy files that don't need to be copied. Instead you should abstract CP into a make variable and change it's default argument base on the platform support. But then you need to patch pretty much all projects with gtk-doc (this is a commonly copy pasted make snippet). Maybe you could just create a cp wrapper that ignores the -u ?
I'd focus on the Meson build tbh, chances are that this bug will stay open due to indecisiveness until the autotools build gets deprecated ;)
Created attachment 365911 [details] [review] gtk-doc: Fallback to 'cp' when 'cp -u' fails 'cp -u' is not specified in POSIX and it can fail with illegal option error on systems not supporting it. It is better to fallback to the slower 'cp' than causing build failure. gst-libav still doesn't have meson build, so I have to get it fixed.
Thanks, will go in with the next common module update. commit 76b68df121dfce7c44a25738711c47fb0d034e24 (HEAD -> master) Author: Ting-Wei Lan <lantw@src.gnome.org> Date: Sun Dec 24 04:48:52 2017 +0800 gtk-doc: Fallback to 'cp' when 'cp -u' fails 'cp -u' is not specified in POSIX and it can fail with illegal option error on systems not supporting it. It is better to fallback to the slower 'cp' than causing build failure. https://bugzilla.gnome.org/show_bug.cgi?id=791784 > gst-libav still doesn't have meson build, so I have to get it fixed. gst-libav has a meson build, it's just that it only supports compilation against a system-installed libav. I would not hold my breath for a mesonified ffmpeg, so chances are when we drop autotools it will still be like that ;)