{"thread":{"id":"15779","subject":"Build bug report: 'make check' needs sparse, but configure doesn't check it","startedAt":"2008-10-04T13:19:56Z","lastAt":"2008-10-06T11:28:25Z","messageCount":5,"participants":["Ed Avis","Dmitry Potapov","Shawn O. Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"92293","messageId":"loom.20081004T131652-828@post.gmane.org","threadId":"15779","inReplyTo":null,"subject":"Build bug report: 'make check' needs sparse, but configure doesn't check it","fromName":"Ed Avis","fromEmail":"eda@waniasset.com","sentAt":"2008-10-04T13:19:56Z","receivedAt":"2008-10-04T13:19:56Z","isPatch":false,"sender":{"key":"eda@waniasset.com","avatar":null},"body":"When you build git-1.6.0.2 and 'make check', it tries to run sparse and fails if\nsparse is not there.  But the configure script does not check sparse is\ninstalled.\n\nI suggest that 'make check' skip the sparse tests if sparse is not there.  As I\nunderstand it, they are really more for the developers to get a report of\npossible errors in the source code and not to test that the built executables\nwork, so it would not be dangerous to just skip running those tests for ordinary\nusers who don't have the tool.\n\nAlternatively, if running sparse is really important for a thorough 'make\ncheck', the configure script should check for it and warn you to install it.\n\n-- \nEd Avis <ed@membled.com>\n"},{"id":"92313","messageId":"20081005003446.GN21650@dpotapov.dyndns.org","threadId":"15779","inReplyTo":"loom.20081004T131652-828@post.gmane.org","subject":"Re: Build bug report: 'make check' needs sparse, but configure doesn't check it","fromName":"Dmitry Potapov","fromEmail":"dpotapov@gmail.com","sentAt":"2008-10-05T00:34:46Z","receivedAt":"2008-10-05T00:34:46Z","isPatch":false,"sender":{"key":"dpotapov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6568595?v=4"},"body":"On Sat, Oct 04, 2008 at 01:19:56PM +0000, Ed Avis wrote:\n> When you build git-1.6.0.2 and 'make check', it tries to run sparse and fails if\n> sparse is not there.  But the configure script does not check sparse is\n> installed.\n> \n> I suggest that 'make check' skip the sparse tests if sparse is not there.  As I\n> understand it, they are really more for the developers to get a report of\n> possible errors in the source code and not to test that the built executables\n> work, so it would not be dangerous to just skip running those tests for ordinary\n> users who don't have the tool.\n\nThe whole point of 'make check' is to run 'sparce' on all files.\nGranted, you may not have 'sparce' installed, but then why do you\nwant to run 'make check'? It makes no sense. If you want to build\nand to test the resulting binaries then you run 'make test'.\n\n\nDmitry\n"},{"id":"92329","messageId":"loom.20081005T094301-345@post.gmane.org","threadId":"15779","inReplyTo":"20081005003446.GN21650@dpotapov.dyndns.org","subject":"Re: Build bug report: 'make check' needs sparse, but configure doesn't check it","fromName":"Ed Avis","fromEmail":"eda@waniasset.com","sentAt":"2008-10-05T09:46:57Z","receivedAt":"2008-10-05T09:46:57Z","isPatch":false,"sender":{"key":"eda@waniasset.com","avatar":null},"body":"Dmitry Potapov <dpotapov <at> gmail.com> writes:\n\n>The whole point of 'make check' is to run 'sparce' on all files.\n\n>If you want to build\n>and to test the resulting binaries then you run 'make test'.\n\nThanks, I didn't realize that.  I assumed that 'make check' was to run the test\nsuite.\n\nThat is the convention used by most autoconf-based programs: for example if you\ndownload coreutils then 'make check' runs the tests, so the normal way to build\nand install is something like 'configure && make check && make install'.\n\nTo reduce confusion I suggest renaming the target to 'make sparse'.  Then it's\nobvious what it does and it can't get confused with the more common usage of\n'make check'.\n\n-- \nEd Avis <eda@waniasset.com>\n"},{"id":"92390","messageId":"20081006065847.GA27516@spearce.org","threadId":"15779","inReplyTo":"loom.20081005T094301-345@post.gmane.org","subject":"Re: Build bug report: 'make check' needs sparse, but configure doesn't check it","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-10-06T06:58:47Z","receivedAt":"2008-10-06T06:58:47Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Ed Avis <eda@waniasset.com> wrote:\n> Dmitry Potapov <dpotapov <at> gmail.com> writes:\n> \n> >The whole point of 'make check' is to run 'sparce' on all files.\n> \n> >If you want to build\n> >and to test the resulting binaries then you run 'make test'.\n> \n> To reduce confusion I suggest renaming the target to 'make sparse'.  Then it's\n> obvious what it does and it can't get confused with the more common usage of\n> 'make check'.\n\nNah.  We're not going to rename the target to \"make sparse\".\nFirst off that sounds like we are compiling the sparse binary for\nthe user, and we will never do that.  And existing developers who\nuse \"make check\" to run sparse are used to that calling convention.\n\n-- \nShawn.\n"},{"id":"92401","messageId":"loom.20081006T112601-258@post.gmane.org","threadId":"15779","inReplyTo":"20081006065847.GA27516@spearce.org","subject":"Re: Build bug report: 'make check' needs sparse, but configure doesn't check it","fromName":"Ed Avis","fromEmail":"eda@waniasset.com","sentAt":"2008-10-06T11:28:25Z","receivedAt":"2008-10-06T11:28:25Z","isPatch":false,"sender":{"key":"eda@waniasset.com","avatar":null},"body":"Shawn O. Pearce <spearce <at> spearce.org> writes:\n\n>Nah.  We're not going to rename the target to \"make sparse\".\n\nFair enough.  Can I suggest a one line patch to avoid any misunderstanding in \nthe future?\n\ndiff --git a/Makefile b/Makefile\nindex 3c0664a..c98b921 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1354,6 +1354,7 @@ check-sha1:: test-sha1$X\n        ./test-sha1.sh\n\n check: common-cmds.h\n+       @echo \"'make check' runs the 'sparse' tool on all source files; say \n'make test' to run the test suite.\"\n        for i in *.c; do sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i || exit; done\n\n remove-dashes:\n"}]}