After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 791784 - 'cp -u' is not supported on FreeBSD
'cp -u' is not supported on FreeBSD
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: common
git master
Other FreeBSD
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-12-19 13:35 UTC by Ting-Wei Lan
Modified: 2017-12-24 14:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtk-doc: Fallback to 'cp' when 'cp -u' fails (1.55 KB, patch)
2017-12-23 20:55 UTC, Ting-Wei Lan
none Details | Review

Description Ting-Wei Lan 2017-12-19 13:35: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?
Comment 1 Nicolas Dufresne (ndufresne) 2017-12-19 18:58:38 UTC
(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 ?
Comment 2 Tim-Philipp Müller 2017-12-19 21:31:07 UTC
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 ;)
Comment 3 Ting-Wei Lan 2017-12-23 20:55:38 UTC
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.
Comment 4 Tim-Philipp Müller 2017-12-24 14:27:15 UTC
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 ;)