GNOME Bugzilla – Bug 791294
Build broken when srcdir == builddir
Last modified: 2019-01-15 03:43:21 UTC
I'm trying to build Geary with a simple: $ cmake . $ make -j8 I'm seeing a bunch of errors: cp: '/home/mcatanzaro/Projects/geary/ui/account_cannot_remove.glade' and '/home/mcatanzaro/Projects/geary/ui/account_cannot_remove.glade' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/account_list.glade' and '/home/mcatanzaro/Projects/geary/ui/account_list.glade' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/account_spinner.glade' and '/home/mcatanzaro/Projects/geary/ui/account_spinner.glade' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/certificate_warning_dialog.glade' and '/home/mcatanzaro/Projects/geary/ui/certificate_warning_dialog.glade' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/edit_alternate_emails.glade' and '/home/mcatanzaro/Projects/geary/ui/edit_alternate_emails.glade' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/find_bar.glade' and '/home/mcatanzaro/Projects/geary/ui/find_bar.glade' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/login.glade' and '/home/mcatanzaro/Projects/geary/ui/login.glade' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/password-dialog.glade' and '/home/mcatanzaro/Projects/geary/ui/password-dialog.glade' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/remove_confirm.glade' and '/home/mcatanzaro/Projects/geary/ui/remove_confirm.glade' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/upgrade_dialog.glade' and '/home/mcatanzaro/Projects/geary/ui/upgrade_dialog.glade' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/composer-headerbar.ui' and '/home/mcatanzaro/Projects/geary/ui/composer-headerbar.ui' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/composer-link-popover.ui' and '/home/mcatanzaro/Projects/geary/ui/composer-link-popover.ui' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/composer-menus.ui' and '/home/mcatanzaro/Projects/geary/ui/composer-menus.ui' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/composer-widget.ui' and '/home/mcatanzaro/Projects/geary/ui/composer-widget.ui' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/conversation-email-attachment-view.ui' and '/home/mcatanzaro/Projects/geary/ui/conversation-email-attachment-view.ui' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/conversation-email-menus.ui' and '/home/mcatanzaro/Projects/geary/ui/conversation-email-menus.ui' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/conversation-email.ui' and '/home/mcatanzaro/Projects/geary/ui/conversation-email.ui' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/conversation-message-menus.ui' and '/home/mcatanzaro/Projects/geary/ui/conversation-message-menus.ui' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/conversation-message.ui' and '/home/mcatanzaro/Projects/geary/ui/conversation-message.ui' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/conversation-viewer.ui' and '/home/mcatanzaro/Projects/geary/ui/conversation-viewer.ui' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/empty-placeholder.ui' and '/home/mcatanzaro/Projects/geary/ui/empty-placeholder.ui' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/folder-popover.ui' and '/home/mcatanzaro/Projects/geary/ui/folder-popover.ui' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/main-toolbar-menus.ui' and '/home/mcatanzaro/Projects/geary/ui/main-toolbar-menus.ui' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/main-toolbar.ui' and '/home/mcatanzaro/Projects/geary/ui/main-toolbar.ui' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/main-window-info-bar.ui' and '/home/mcatanzaro/Projects/geary/ui/main-window-info-bar.ui' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/main-window.ui' and '/home/mcatanzaro/Projects/geary/ui/main-window.ui' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/preferences-dialog.ui' and '/home/mcatanzaro/Projects/geary/ui/preferences-dialog.ui' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/composer-web-view.css' and '/home/mcatanzaro/Projects/geary/ui/composer-web-view.css' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/conversation-web-view.css' and '/home/mcatanzaro/Projects/geary/ui/conversation-web-view.css' are the same file cp: '/home/mcatanzaro/Projects/geary/ui/geary.css' and '/home/mcatanzaro/Projects/geary/ui/geary.css' are the same file Let's do two things: (1) Make the build not fail in this case: cp ||: (2) Redirect the output spam to /dev/null Now, really there should be a better way to do this. Using add_custom_command() or add_custom_target() without VERBATIM is nonportable/risky/evil. But fixing it better requires thinking, and I'm not very good at that....
Created attachment 365088 [details] [review] Fix cp error during build
(In reply to Michael Catanzaro from comment #0) > (1) Make the build not fail in this case: cp ||: Oh, hum, you know, it would be better to skip all the copying if srcdir == builddir.
Comment on attachment 365088 [details] [review] Fix cp error during build I swear this worked when I tried it five minutes ago, but now I'm getting a bunch of errors because of it. I think I'll just switch to trying an out of tree build....
Yeah, and with the meson port hopefully happening soonish (Bug 777044), it's probably not worth fixing in CMake for the moment.
Resolving this an obsolete since the meson build has landed.