{"thread":{"id":"31748","subject":"build deps","startedAt":"2012-10-08T00:39:37Z","lastAt":"2012-10-16T07:37:41Z","messageCount":13,"participants":["Thiago Farina","Andrew Wong","Michael J Gruber","Junio C Hamano","David Aguilar"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"200737","messageId":"CACnwZYe_vhH9Ui8W9D=M_8avgEugR+UvM1E+jH7fxr+8yk2UtQ@mail.gmail.com","threadId":"31748","inReplyTo":null,"subject":"build deps","fromName":"Thiago Farina","fromEmail":"tfransosi@gmail.com","sentAt":"2012-10-08T00:39:37Z","receivedAt":"2012-10-08T00:39:37Z","isPatch":false,"sender":{"key":"tfransosi@gmail.com","avatar":"https://avatars.githubusercontent.com/u/970071?v=4"},"body":"Hi,\n\nWhen trying to build from source but it's failing:\n\n$ sudo make prefix=/usr/local all\n    LINK git-credential-store\ngcc: @CHARSET_LIB@: No such file or directory\nmake: *** [git-credential-store] Error 1\n\nI'm know I'm missing some dep and googling for it.\n\nBut wouldn't be better if we have something like [1]?\n\n[1] http://git.chromium.org/gitweb/?p=chromium.git;a=blob;f=build/install-build-deps.sh;h=705d4c210455f36916be607d7fd0f32f0b472c70;hb=HEAD\n\nAnd yes, I'm following these instructions [2].\n\n[2] http://git-scm.com/book/en/Getting-Started-Installing-Git\n"},{"id":"200751","messageId":"5072FAD1.1000807@gmail.com","threadId":"31748","inReplyTo":"CACnwZYe_vhH9Ui8W9D=M_8avgEugR+UvM1E+jH7fxr+8yk2UtQ@mail.gmail.com","subject":"Re: build deps","fromName":"Andrew Wong","fromEmail":"andrew.kw.w@gmail.com","sentAt":"2012-10-08T16:09:53Z","receivedAt":"2012-10-08T16:09:53Z","isPatch":false,"sender":{"key":"andrew.kw.w@gmail.com","avatar":"https://avatars.githubusercontent.com/u/489311?v=4"},"body":"On 10/07/12 20:39, Thiago Farina wrote:\n> When trying to build from source but it's failing:\n>\n> $ sudo make prefix=/usr/local all\n>     LINK git-credential-store\n> gcc: @CHARSET_LIB@: No such file or directory\n> make: *** [git-credential-store] Error 1\nDid you run the \"configure\" script?\nIn the source folder, do you have either file \"config.mak\" or\n\"config.mak.autogen\" ? If you do, try removing them, and compile again.\nWhich version are you compiling? Did you get the source files from tar?\nOr from git?\n"},{"id":"200790","messageId":"CACnwZYeJ-FKXterxd697iu+U4HobqEaP0zx_p8CZDsPZx4hbHQ@mail.gmail.com","threadId":"31748","inReplyTo":"5072FAD1.1000807@gmail.com","subject":"Re: build deps","fromName":"Thiago Farina","fromEmail":"tfransosi@gmail.com","sentAt":"2012-10-08T21:36:55Z","receivedAt":"2012-10-08T21:36:55Z","isPatch":false,"sender":{"key":"tfransosi@gmail.com","avatar":"https://avatars.githubusercontent.com/u/970071?v=4"},"body":"On Mon, Oct 8, 2012 at 1:09 PM, Andrew Wong <andrew.kw.w@gmail.com> wrote:\n> On 10/07/12 20:39, Thiago Farina wrote:\n>> When trying to build from source but it's failing:\n>>\n>> $ sudo make prefix=/usr/local all\n>>     LINK git-credential-store\n>> gcc: @CHARSET_LIB@: No such file or directory\n>> make: *** [git-credential-store] Error 1\n> Did you run the \"configure\" script?\nHum, I haven't.\n\nNow I did.\n\n\n> In the source folder, do you have either file \"config.mak\" or\n> \"config.mak.autogen\" ?\nAfter running ./configure, now I have.\n\n> If you do, try removing them, and compile again.\n> Which version are you compiling?\n$ cat GIT-VERSION-FILE\nGIT_VERSION = 1.7.12.84.gefa6462\n\n> Did you get the source files from tar?\n> Or from git?\nFrom git (git://git.kernel.org/pub/scm/git/git.git).\n\nOK, after running ./configure I tried the make command again.\n\nCC credential-store.o\n/bin/sh: clang: not found\nmake: *** [credential-store.o] Error 127\n\n$ which clang\n/home/tfarina/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang\n\n$ clang --version\nclang version 3.2 (trunk 163674)\nTarget: x86_64-unknown-linux-gnu\nThread model: posix\n"},{"id":"200791","messageId":"CACnwZYe5CR-1m4rfCcaLsh4rGDx_8kRNCPK31=AepqocG_Lwzg@mail.gmail.com","threadId":"31748","inReplyTo":"CACnwZYeJ-FKXterxd697iu+U4HobqEaP0zx_p8CZDsPZx4hbHQ@mail.gmail.com","subject":"Re: build deps","fromName":"Thiago Farina","fromEmail":"tfransosi@gmail.com","sentAt":"2012-10-08T21:37:38Z","receivedAt":"2012-10-08T21:37:38Z","isPatch":false,"sender":{"key":"tfransosi@gmail.com","avatar":"https://avatars.githubusercontent.com/u/970071?v=4"},"body":"On Mon, Oct 8, 2012 at 6:36 PM, Thiago Farina <tfransosi@gmail.com> wrote:\n> On Mon, Oct 8, 2012 at 1:09 PM, Andrew Wong <andrew.kw.w@gmail.com> wrote:\n>> On 10/07/12 20:39, Thiago Farina wrote:\n>>> When trying to build from source but it's failing:\n>>>\n>>> $ sudo make prefix=/usr/local all\n>>>     LINK git-credential-store\n>>> gcc: @CHARSET_LIB@: No such file or directory\n>>> make: *** [git-credential-store] Error 1\n>> Did you run the \"configure\" script?\n> Hum, I haven't.\n>\n> Now I did.\n>\n>\n>> In the source folder, do you have either file \"config.mak\" or\n>> \"config.mak.autogen\" ?\n> After running ./configure, now I have.\n>\n>> If you do, try removing them, and compile again.\n>> Which version are you compiling?\n> $ cat GIT-VERSION-FILE\n> GIT_VERSION = 1.7.12.84.gefa6462\n>\n>> Did you get the source files from tar?\n>> Or from git?\n> From git (git://git.kernel.org/pub/scm/git/git.git).\n>\n> OK, after running ./configure I tried the make command again.\n>\n> CC credential-store.o\n> /bin/sh: clang: not found\n> make: *** [credential-store.o] Error 127\n>\n> $ which clang\n> /home/tfarina/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang\n>\n> $ clang --version\n> clang version 3.2 (trunk 163674)\n> Target: x86_64-unknown-linux-gnu\n> Thread model: posix\n\nAlso:\n\n$ echo $CC\nclang -B/usr/local/gold/bin\n"},{"id":"200795","messageId":"50735939.10604@gmail.com","threadId":"31748","inReplyTo":"CACnwZYeJ-FKXterxd697iu+U4HobqEaP0zx_p8CZDsPZx4hbHQ@mail.gmail.com","subject":"Re: build deps","fromName":"Andrew Wong","fromEmail":"andrew.kw.w@gmail.com","sentAt":"2012-10-08T22:52:41Z","receivedAt":"2012-10-08T22:52:41Z","isPatch":false,"sender":{"key":"andrew.kw.w@gmail.com","avatar":"https://avatars.githubusercontent.com/u/489311?v=4"},"body":"On 10/08/12 17:36, Thiago Farina wrote:\n> OK, after running ./configure I tried the make command again.\n>\n> CC credential-store.o\n> /bin/sh: clang: not found\n> make: *** [credential-store.o] Error 127\n>\n> $ which clang\n> /home/tfarina/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang\n>\n> $ clang --version\n> clang version 3.2 (trunk 163674)\n> Target: x86_64-unknown-linux-gnu\n> Thread model: posix\nLooks like something went wrong with \"make\" setting PATH. I wonder if\nthe \"+\" sign in your path is somehow messing things up.\n\nAre you trying to compile specifically with clang? If not, maybe try\nunsetting the CC env var, and run configure again?\n"},{"id":"201023","messageId":"CACnwZYf56XkqW085HoWhAN2EnjCJd=VYHGAD8fZCCe6_FNhO2A@mail.gmail.com","threadId":"31748","inReplyTo":"50735939.10604@gmail.com","subject":"Re: build deps","fromName":"Thiago Farina","fromEmail":"tfransosi@gmail.com","sentAt":"2012-10-11T20:54:13Z","receivedAt":"2012-10-11T20:54:13Z","isPatch":false,"sender":{"key":"tfransosi@gmail.com","avatar":"https://avatars.githubusercontent.com/u/970071?v=4"},"body":"On Mon, Oct 8, 2012 at 7:52 PM, Andrew Wong <andrew.kw.w@gmail.com> wrote:\n> On 10/08/12 17:36, Thiago Farina wrote:\n>> OK, after running ./configure I tried the make command again.\n>>\n>> CC credential-store.o\n>> /bin/sh: clang: not found\n>> make: *** [credential-store.o] Error 127\n>>\n>> $ which clang\n>> /home/tfarina/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang\n>>\n>> $ clang --version\n>> clang version 3.2 (trunk 163674)\n>> Target: x86_64-unknown-linux-gnu\n>> Thread model: posix\n> Looks like something went wrong with \"make\" setting PATH. I wonder if\n> the \"+\" sign in your path is somehow messing things up.\n>\nWould be something that could be fixed in git?\n\n> Are you trying to compile specifically with clang?\nNope, it just happen that I switched to clang because I use it to\ncompile chromium and I need it to use the chrome_plugin[1].\n\n> If not, maybe try\n> unsetting the CC env var, and run configure again?\nJust setting CC to gcc works for me. But still, I'd like to be able to\nbuild with clang (may be as you noted is just something with the + in\nmy PATH).\n\n[1] http://git.chromium.org/gitweb/?p=chromium.git;a=tree;f=tools/clang/plugins;h=8e79d8f35d5ccfee82b6ab8f27ea8b5d820c772d;hb=HEAD\n"},{"id":"201035","messageId":"50776D0D.9090306@gmail.com","threadId":"31748","inReplyTo":"CACnwZYf56XkqW085HoWhAN2EnjCJd=VYHGAD8fZCCe6_FNhO2A@mail.gmail.com","subject":"Re: build deps","fromName":"Andrew Wong","fromEmail":"andrew.kw.w.lists@gmail.com","sentAt":"2012-10-12T01:06:21Z","receivedAt":"2012-10-12T01:06:21Z","isPatch":false,"sender":{"key":"andrew.kw.w.lists@gmail.com","avatar":null},"body":"On 10/11/12 16:54, Thiago Farina wrote:\n> Just setting CC to gcc works for me. But still, I'd like to be able to\n> build with clang (may be as you noted is just something with the + in\n> my PATH).\nOh, I just realized you were using \"sudo\". The PATH environment was\nprobably not inherited when you use sudo to run \"make\". So the\nsubsequent shells statred by \"make' were not able to find \"clang\".\n"},{"id":"201037","messageId":"CACnwZYfmz1BTo6okzFh8jXbw+0MAV0sEanYXNzAnV7L4p7nY_g@mail.gmail.com","threadId":"31748","inReplyTo":"50776D0D.9090306@gmail.com","subject":"Re: build deps","fromName":"Thiago Farina","fromEmail":"tfransosi@gmail.com","sentAt":"2012-10-12T04:08:16Z","receivedAt":"2012-10-12T04:08:16Z","isPatch":false,"sender":{"key":"tfransosi@gmail.com","avatar":"https://avatars.githubusercontent.com/u/970071?v=4"},"body":"On Thu, Oct 11, 2012 at 10:06 PM, Andrew Wong\n<andrew.kw.w.lists@gmail.com> wrote:\n> On 10/11/12 16:54, Thiago Farina wrote:\n>> Just setting CC to gcc works for me. But still, I'd like to be able to\n>> build with clang (may be as you noted is just something with the + in\n>> my PATH).\n> Oh, I just realized you were using \"sudo\". The PATH environment was\n> probably not inherited when you use sudo to run \"make\". So the\n> subsequent shells statred by \"make' were not able to find \"clang\".\n\nInteresting, thank you for your observation.\n\nThis worked for me now:\n\n$ git clone  https://github.com/gitster/git\n$ cd git\n$ make configure\n$ ./configure\n$ make\n$ ./git version\ngit version 1.8.0.rc2\n\nclang reported this:\ncombine-diff.c:1006:19: warning: adding 'int' to a string does not\nappend to the string [-Wstring-plus-int]\n                prefix = COLONS + offset;\n                         ~~~~~~~^~~~~~~~\ncombine-diff.c:1006:19: note: use array indexing to silence this\nwarning\n                prefix = COLONS + offset;\n                                ^\n                         &      [       ]\n1 warning generated.\n\ngrep.c:451:16: warning: comparison of unsigned enum expression < 0 is\nalways false [-Wtautological-compare]\n                if (p->field < 0 || GREP_HEADER_FIELD_MAX <= p->field)\n                    ~~~~~~~~ ^ ~\n1 warning generated.\n"},{"id":"201264","messageId":"507C2F6E.9060100@drmicha.warpmail.net","threadId":"31748","inReplyTo":"CACnwZYfmz1BTo6okzFh8jXbw+0MAV0sEanYXNzAnV7L4p7nY_g@mail.gmail.com","subject":"Re: build deps","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2012-10-15T15:44:46Z","receivedAt":"2012-10-15T15:44:46Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Thiago Farina venit, vidit, dixit 12.10.2012 06:08:\n> On Thu, Oct 11, 2012 at 10:06 PM, Andrew Wong\n> <andrew.kw.w.lists@gmail.com> wrote:\n>> On 10/11/12 16:54, Thiago Farina wrote:\n>>> Just setting CC to gcc works for me. But still, I'd like to be able to\n>>> build with clang (may be as you noted is just something with the + in\n>>> my PATH).\n>> Oh, I just realized you were using \"sudo\". The PATH environment was\n>> probably not inherited when you use sudo to run \"make\". So the\n>> subsequent shells statred by \"make' were not able to find \"clang\".\n> \n> Interesting, thank you for your observation.\n> \n> This worked for me now:\n> \n> $ git clone  https://github.com/gitster/git\n> $ cd git\n> $ make configure\n> $ ./configure\n> $ make\n> $ ./git version\n> git version 1.8.0.rc2\n> \n> clang reported this:\n> combine-diff.c:1006:19: warning: adding 'int' to a string does not\n> append to the string [-Wstring-plus-int]\n>                 prefix = COLONS + offset;\n>                          ~~~~~~~^~~~~~~~\n> combine-diff.c:1006:19: note: use array indexing to silence this\n> warning\n>                 prefix = COLONS + offset;\n>                                 ^\n>                          &      [       ]\n> 1 warning generated.\n\nDoes\n\n&COLONS[offset]\n\nsilence that?\n\n\n> grep.c:451:16: warning: comparison of unsigned enum expression < 0 is\n> always false [-Wtautological-compare]\n>                 if (p->field < 0 || GREP_HEADER_FIELD_MAX <= p->field)\n>                     ~~~~~~~~ ^ ~\n> 1 warning generated.\n> \n\nRight, that enum type starts at 0. Junio, you last touched this area.\nCan we just dump the first comparison or did you have something else in\nmind?\n\nMichael\n"},{"id":"201277","messageId":"CACnwZYdpuju4VtvRxNDRSTwnCCFYK4j_f=h9eCoLPBWHKF7LsA@mail.gmail.com","threadId":"31748","inReplyTo":"507C2F6E.9060100@drmicha.warpmail.net","subject":"Re: build deps","fromName":"Thiago Farina","fromEmail":"tfransosi@gmail.com","sentAt":"2012-10-15T17:51:13Z","receivedAt":"2012-10-15T17:51:13Z","isPatch":false,"sender":{"key":"tfransosi@gmail.com","avatar":"https://avatars.githubusercontent.com/u/970071?v=4"},"body":"On Mon, Oct 15, 2012 at 12:44 PM, Michael J Gruber\n<git@drmicha.warpmail.net> wrote:\n>> clang reported this:\n>> combine-diff.c:1006:19: warning: adding 'int' to a string does not\n>> append to the string [-Wstring-plus-int]\n>>                 prefix = COLONS + offset;\n>>                          ~~~~~~~^~~~~~~~\n>> combine-diff.c:1006:19: note: use array indexing to silence this\n>> warning\n>>                 prefix = COLONS + offset;\n>>                                 ^\n>>                          &      [       ]\n>> 1 warning generated.\n>\n> Does\n>\n> &COLONS[offset]\n>\n> silence that?\n>\nYes.\n"},{"id":"201287","messageId":"7vd30jwj7v.fsf@alter.siamese.dyndns.org","threadId":"31748","inReplyTo":"507C2F6E.9060100@drmicha.warpmail.net","subject":"Re: build deps","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-10-15T20:53:08Z","receivedAt":"2012-10-15T20:53:08Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael J Gruber <git@drmicha.warpmail.net> writes:\n\n>> grep.c:451:16: warning: comparison of unsigned enum expression < 0 is\n>> always false [-Wtautological-compare]\n>>                 if (p->field < 0 || GREP_HEADER_FIELD_MAX <= p->field)\n>>                     ~~~~~~~~ ^ ~\n>> 1 warning generated.\n>\n> Right, that enum type starts at 0. Junio, you last touched this area.\n> Can we just dump the first comparison or did you have something else in\n> mind?\n\nI think it was a leftover from the very first implementation that\ndefensively said \"this has to be one of these known ones\", and tried\nto bound it from both sides of the range, regaredless of the actual\ntype of the field (these GREP_HEADER_WHAT things may have been\nsimple integers with #define'd values).  Dropping the \"negative\"\ncomparison is perfectly fine.\n"},{"id":"201303","messageId":"CAJDDKr5QaByGg0wW_fwFErRyMA6hbg2kHskxOqY4Z_rLoo1maQ@mail.gmail.com","threadId":"31748","inReplyTo":"7vd30jwj7v.fsf@alter.siamese.dyndns.org","subject":"Re: build deps","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2012-10-16T01:39:02Z","receivedAt":"2012-10-16T01:39:02Z","isPatch":false,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On Mon, Oct 15, 2012 at 1:53 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Michael J Gruber <git@drmicha.warpmail.net> writes:\n>\n>>> grep.c:451:16: warning: comparison of unsigned enum expression < 0 is\n>>> always false [-Wtautological-compare]\n>>>                 if (p->field < 0 || GREP_HEADER_FIELD_MAX <= p->field)\n>>>                     ~~~~~~~~ ^ ~\n>>> 1 warning generated.\n>>\n>> Right, that enum type starts at 0. Junio, you last touched this area.\n>> Can we just dump the first comparison or did you have something else in\n>> mind?\n>\n> I think it was a leftover from the very first implementation that\n> defensively said \"this has to be one of these known ones\", and tried\n> to bound it from both sides of the range, regaredless of the actual\n> type of the field (these GREP_HEADER_WHAT things may have been\n> simple integers with #define'd values).  Dropping the \"negative\"\n> comparison is perfectly fine.\n\nThis snippet of code came up before:\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/184908/focus=185014\n\nThere seemed to be good reasons to keep the check at the time.\n\nWas this same snippet not also touched when Nguyen Thai Ngoc Duy\nworked on the \"even if I'm drunk\" patch?:\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/206413/focus=206539\n\nWith the \"drunk\" patch then we wouldn't need the check at all,\nwhich is really nice.\n\nI hope that helps jog folks' memories.\nI'm not sure if the above discussions are relevant anymore,\nbut I figured it'd be good to provide some more context.\n\ncheers,\n-- \nDavid\n"},{"id":"201317","messageId":"507D0EC5.4030206@drmicha.warpmail.net","threadId":"31748","inReplyTo":"CAJDDKr5QaByGg0wW_fwFErRyMA6hbg2kHskxOqY4Z_rLoo1maQ@mail.gmail.com","subject":"Re: build deps","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2012-10-16T07:37:41Z","receivedAt":"2012-10-16T07:37:41Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"David Aguilar venit, vidit, dixit 16.10.2012 03:39:\n> On Mon, Oct 15, 2012 at 1:53 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>> Michael J Gruber <git@drmicha.warpmail.net> writes:\n>>\n>>>> grep.c:451:16: warning: comparison of unsigned enum expression < 0 is\n>>>> always false [-Wtautological-compare]\n>>>>                 if (p->field < 0 || GREP_HEADER_FIELD_MAX <= p->field)\n>>>>                     ~~~~~~~~ ^ ~\n>>>> 1 warning generated.\n>>>\n>>> Right, that enum type starts at 0. Junio, you last touched this area.\n>>> Can we just dump the first comparison or did you have something else in\n>>> mind?\n>>\n>> I think it was a leftover from the very first implementation that\n>> defensively said \"this has to be one of these known ones\", and tried\n>> to bound it from both sides of the range, regaredless of the actual\n>> type of the field (these GREP_HEADER_WHAT things may have been\n>> simple integers with #define'd values).  Dropping the \"negative\"\n>> comparison is perfectly fine.\n> \n> This snippet of code came up before:\n> \n> http://thread.gmane.org/gmane.comp.version-control.git/184908/focus=185014\n> \n> There seemed to be good reasons to keep the check at the time.\n> \n> Was this same snippet not also touched when Nguyen Thai Ngoc Duy\n> worked on the \"even if I'm drunk\" patch?:\n> \n> http://thread.gmane.org/gmane.comp.version-control.git/206413/focus=206539\n> \n> With the \"drunk\" patch then we wouldn't need the check at all,\n> which is really nice.\n> \n> I hope that helps jog folks' memories.\n> I'm not sure if the above discussions are relevant anymore,\n> but I figured it'd be good to provide some more context.\n> \n> cheers,\n\nThe drunk patch, cheers ;)\n\nThat's very valuable context that you are giving. So it's either\navoiding the warning and relying and enum unsignedness (or human/static\nanalysis) or playing it safe and keeping the warning. How is\n\nif (/* p->field < 0 || */ GREP_HEADER_FIELD_MAX <= p->field)\n\nto remind any reader that the first condition should be granted? One\ncould take this further and use a macro but that seems overkill.\n\nMichael\n"}]}