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 791294 - Build broken when srcdir == builddir
Build broken when srcdir == builddir
Status: RESOLVED OBSOLETE
Product: geary
Classification: Other
Component: build
0.12.x
Other Linux
: Normal normal
: ---
Assigned To: Geary Maintainers
Geary Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-12-06 04:22 UTC by Michael Catanzaro
Modified: 2019-01-15 03:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix cp error during build (1.12 KB, patch)
2017-12-06 04:24 UTC, Michael Catanzaro
none Details | Review

Description Michael Catanzaro 2017-12-06 04:22:32 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....
Comment 1 Michael Catanzaro 2017-12-06 04:24:08 UTC
Created attachment 365088 [details] [review]
Fix cp error during build
Comment 2 Michael Catanzaro 2017-12-06 04:26:56 UTC
(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 3 Michael Catanzaro 2017-12-06 04:35:24 UTC
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....
Comment 4 Michael Gratton 2017-12-08 00:54:02 UTC
Yeah, and with the meson port hopefully happening soonish (Bug 777044), it's probably not worth fixing in CMake for the moment.
Comment 5 Michael Gratton 2019-01-15 03:43:21 UTC
Resolving this an obsolete since the meson build has landed.