{"thread":{"id":"15367","subject":"latest clone/pull of git.git problems with setlinebuf.","startedAt":"2008-09-04T01:04:30Z","lastAt":"2008-09-04T05:39:55Z","messageCount":9,"participants":["Boyd Lynn Gerber","Avery Pennarun","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"89707","messageId":"alpine.LNX.1.10.0809031858570.12887@suse104.zenez.com","threadId":"15367","inReplyTo":null,"subject":"latest clone/pull of git.git problems with setlinebuf.","fromName":"Boyd Lynn Gerber","fromEmail":"gerberb@zenez.com","sentAt":"2008-09-04T01:04:30Z","receivedAt":"2008-09-04T01:04:30Z","isPatch":false,"sender":{"key":"gerberb@zenez.com","avatar":null},"body":"Hello,\n\nI just noticed that setlinebuf is coming back as undefined when trying to \nbuild the lastest version.\n\non UnixWare 7.1.4 I get\n\n     LINK git-var\n     CC daemon.o\nUX:acomp: WARNING: \"daemon.c\", line 485: end-of-loop code not reached\n     LINK git-daemon\nUndefined                       first referenced\nsymbol                              in file\nsetlinebuf                          daemon.o\nUX:ld: ERROR: Symbol referencing errors. No output written to git-daemon\ngmake: *** [git-daemon] Error 1\n\n\nand on OpenServer 6.0 I get\n\n     LINK git-http-push\n     CC daemon.o\nUX:acomp: WARNING: \"daemon.c\", line 485: end-of-loop code not reached\n     LINK git-daemon\nUndefined                       first referenced\nsymbol                              in file\nsetlinebuf                          daemon.o\nUX:ld: ERROR: Symbol referencing errors. No output written to git-daemon\ngmake: *** [git-daemon] Error 1\n\nSo the new behavior breaks things.  On UnixWare 7.1.4 there is a \n/usr/ucb/cc but when I use it much more breaks.  It is better to use the \n/usr/bin/cc.\n\nCan we please revert the patch that breaks this or provide a better fix. \nThe older methods at least worked.\n\nThanks,\n\n--\nBoyd Gerber <gerberb@zenez.com>\nZENEZ\t1042 East Fort Union #135, Midvale Utah  84047\n"},{"id":"89708","messageId":"alpine.LNX.1.10.0809031907540.12887@suse104.zenez.com","threadId":"15367","inReplyTo":"alpine.LNX.1.10.0809031858570.12887@suse104.zenez.com","subject":"Re: latest clone/pull of git.git problems with setlinebuf.","fromName":"Boyd Lynn Gerber","fromEmail":"gerberb@zenez.com","sentAt":"2008-09-04T01:10:47Z","receivedAt":"2008-09-04T01:10:47Z","isPatch":false,"sender":{"key":"gerberb@zenez.com","avatar":null},"body":"On Wed, 3 Sep 2008, Boyd Lynn Gerber wrote:\n> I just noticed that setlinebuf is coming back as undefined when trying to \n> build the lastest version.\n\nI did\n\ngit clone git://git.kernel.org/pub/scm/git/git.git git\n\ncd git/\ngmake configure\nCC=cc CXX=CC ./configure\n\nAnd then I get the errors.\n\n> on UnixWare 7.1.4 I get\n>\n>    LINK git-var\n>    CC daemon.o\n> UX:acomp: WARNING: \"daemon.c\", line 485: end-of-loop code not reached\n>    LINK git-daemon\n> Undefined                       first referenced\n> symbol                              in file\n> setlinebuf                          daemon.o\n> UX:ld: ERROR: Symbol referencing errors. No output written to git-daemon\n> gmake: *** [git-daemon] Error 1\n>\n>\n> and on OpenServer 6.0 I get\n>\n>    LINK git-http-push\n>    CC daemon.o\n> UX:acomp: WARNING: \"daemon.c\", line 485: end-of-loop code not reached\n>    LINK git-daemon\n> Undefined                       first referenced\n> symbol                              in file\n> setlinebuf                          daemon.o\n> UX:ld: ERROR: Symbol referencing errors. No output written to git-daemon\n> gmake: *** [git-daemon] Error 1\n>\n> So the new behavior breaks things.  On UnixWare 7.1.4 there is a /usr/ucb/cc \n> but when I use it much more breaks.  It is better to use the /usr/bin/cc.\n>\n> Can we please revert the patch that breaks this or provide a better fix. The \n> older methods at least worked.\n\nI really hate getting everything working only to then have another \nbreak-age from master on a pull.  Can we please try to keep some \ncompatitbility with other non linux OS's.\n\nThanks,\n\n--\nBoyd Gerber <gerberb@zenez.com>\nZENEZ\t1042 East Fort Union #135, Midvale Utah  84047\n"},{"id":"89710","messageId":"32541b130809031904mb62d13du234da4558bead723@mail.gmail.com","threadId":"15367","inReplyTo":"alpine.LNX.1.10.0809031907540.12887@suse104.zenez.com","subject":"Re: latest clone/pull of git.git problems with setlinebuf.","fromName":"Avery Pennarun","fromEmail":"apenwarr@gmail.com","sentAt":"2008-09-04T02:04:28Z","receivedAt":"2008-09-04T02:04:28Z","isPatch":false,"sender":{"key":"apenwarr@gmail.com","avatar":"https://avatars.githubusercontent.com/u/20592?v=4"},"body":"On Wed, Sep 3, 2008 at 9:10 PM, Boyd Lynn Gerber <gerberb@zenez.com> wrote:\n> I really hate getting everything working only to then have another break-age\n> from master on a pull.  Can we please try to keep some compatitbility with\n> other non linux OS's.\n\nWell, it's kind of unavoidable; presumably most of the developers\ndon't have access to a UnixWare system, and thus have no idea if their\npatches will break compatibility with it.\n\nPerhaps what you need is an autobuilder running on UnixWare that will\nbuild Junio's pu and next branches, so that you can report problems\nbefore they make it all the way into master.\n\nHey, what a coincidence!  I have just what you need! :)\nhttp://marc.info/?l=git&m=122015205123247&w=2\n\nHave fun,\n\nAvery\n"},{"id":"89712","messageId":"alpine.LNX.1.10.0809032035130.16857@suse104.zenez.com","threadId":"15367","inReplyTo":"32541b130809031904mb62d13du234da4558bead723@mail.gmail.com","subject":"Re: latest clone/pull of git.git problems with setlinebuf.","fromName":"Boyd Lynn Gerber","fromEmail":"gerberb@zenez.com","sentAt":"2008-09-04T02:38:35Z","receivedAt":"2008-09-04T02:38:35Z","isPatch":false,"sender":{"key":"gerberb@zenez.com","avatar":null},"body":"On Wed, 3 Sep 2008, Avery Pennarun wrote:\n> On Wed, Sep 3, 2008 at 9:10 PM, Boyd Lynn Gerber <gerberb@zenez.com> wrote:\n>> I really hate getting everything working only to then have another break-age\n>> from master on a pull.  Can we please try to keep some compatitbility with\n>> other non linux OS's.\n>\n> Well, it's kind of unavoidable; presumably most of the developers\n> don't have access to a UnixWare system, and thus have no idea if their\n> patches will break compatibility with it.\n\nI offer free access to the OpenServer 6.0, UnixWare 7.1.4 and OpenServer \n5.0.7 to oss developers.  The only condition is the use them for OSS \ndevelopment.  Free access is only for non commercial developement.  I do \nhave paid access for non OSS.\n\n> Perhaps what you need is an autobuilder running on UnixWare that will\n> build Junio's pu and next branches, so that you can report problems\n> before they make it all the way into master.\n>\n> Hey, what a coincidence!  I have just what you need! :)\n> http://marc.info/?l=git&m=122015205123247&w=2\n\nI cloned the repo when you announced it.  I was going to get the latest \ngit master running and then use them.  I have them.  I hope to have them \nrunning in the next while.\n\nThanks,\n\n--\nBoyd Gerber <gerberb@zenez.com>\nZENEZ\t1042 East Fort Union #135, Midvale Utah  84047\n"},{"id":"89717","messageId":"7vljy88u0m.fsf@gitster.siamese.dyndns.org","threadId":"15367","inReplyTo":"alpine.LNX.1.10.0809031858570.12887@suse104.zenez.com","subject":"Re: latest clone/pull of git.git problems with setlinebuf.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-09-04T03:33:29Z","receivedAt":"2008-09-04T03:33:29Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Boyd Lynn Gerber <gerberb@zenez.com> writes:\n\n> Hello,\n>\n> I just noticed that setlinebuf is coming back as undefined when trying\n> to build the lastest version.\n>\n> on UnixWare 7.1.4 I get\n>\n>     LINK git-var\n>     CC daemon.o\n> UX:acomp: WARNING: \"daemon.c\", line 485: end-of-loop code not reached\n>     LINK git-daemon\n> Undefined                       first referenced\n> symbol                              in file\n> setlinebuf                          daemon.o\n> UX:ld: ERROR: Symbol referencing errors. No output written to git-daemon\n> gmake: *** [git-daemon] Error 1\n\nAh, ok.  I should have noticed that setlinebuf() was outside POSIX (it is\nnot usable on older BSDs either).\n\nLet's see if we can replace it with setvbuf() which is POSIX.\n\n---\n daemon.c |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git c/daemon.c w/daemon.c\nindex 23278e2..7f2743a 100644\n--- c/daemon.c\n+++ w/daemon.c\n@@ -1083,7 +1083,8 @@ int main(int argc, char **argv)\n \t\topenlog(\"git-daemon\", LOG_PID, LOG_DAEMON);\n \t\tset_die_routine(daemon_die);\n \t} else\n-\t\tsetlinebuf(stderr); /* avoid splitting a message in the middle */\n+\t\t/* avoid splitting a message in the middle */\n+\t\tsetvbuf(stderr, NULL, _IOLBF, 0);\n \n \tif (inetd_mode && (group_name || user_name))\n \t\tdie(\"--user and --group are incompatible with --inetd\");\n"},{"id":"89719","messageId":"alpine.LNX.1.10.0809032157200.21167@suse104.zenez.com","threadId":"15367","inReplyTo":"7vljy88u0m.fsf@gitster.siamese.dyndns.org","subject":"Re: latest clone/pull of git.git problems with setlinebuf.","fromName":"Boyd Lynn Gerber","fromEmail":"gerberb@zenez.com","sentAt":"2008-09-04T03:58:08Z","receivedAt":"2008-09-04T03:58:08Z","isPatch":false,"sender":{"key":"gerberb@zenez.com","avatar":null},"body":"On Wed, 3 Sep 2008, Junio C Hamano wrote:\n> Boyd Lynn Gerber <gerberb@zenez.com> writes:\n>> I just noticed that setlinebuf is coming back as undefined when trying\n>> to build the lastest version.\n>>\n>> on UnixWare 7.1.4 I get\n>>\n>>     LINK git-var\n>>     CC daemon.o\n>> UX:acomp: WARNING: \"daemon.c\", line 485: end-of-loop code not reached\n>>     LINK git-daemon\n>> Undefined                       first referenced\n>> symbol                              in file\n>> setlinebuf                          daemon.o\n>> UX:ld: ERROR: Symbol referencing errors. No output written to git-daemon\n>> gmake: *** [git-daemon] Error 1\n>\n> Ah, ok.  I should have noticed that setlinebuf() was outside POSIX (it is\n> not usable on older BSDs either).\n>\n> Let's see if we can replace it with setvbuf() which is POSIX.\n\nThis fixes the problem. on both OS's.\n\nThanks,\n\n--\nBoyd Gerber <gerberb@zenez.com>\nZENEZ\t1042 East Fort Union #135, Midvale Utah  84047\n"},{"id":"89722","messageId":"7vhc8w8rme.fsf@gitster.siamese.dyndns.org","threadId":"15367","inReplyTo":"alpine.LNX.1.10.0809032157200.21167@suse104.zenez.com","subject":"Re: latest clone/pull of git.git problems with setlinebuf.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-09-04T04:25:13Z","receivedAt":"2008-09-04T04:25:13Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Boyd Lynn Gerber <gerberb@zenez.com> writes:\n\n> On Wed, 3 Sep 2008, Junio C Hamano wrote:\n> ...\n>> Ah, ok.  I should have noticed that setlinebuf() was outside POSIX (it is\n>> not usable on older BSDs either).\n>>\n>> Let's see if we can replace it with setvbuf() which is POSIX.\n>\n> This fixes the problem. on both OS's.\n\nBy the way, have you actually exercised the codepath, or does your above\n\"fixes\" mean \"compiles\"?\n\nI knew it would compile on a system with POSIX setvbuf(), but I was unsure\nabout the size argument.  I know for glibc giving <NULL, 0> would be\nequivalent to setlinebuf(), but POSIX itself leaves what exactly happens\nto the size argument quite vague, saying only \"otherwise [when buf is a\nnull pointer], size may determine the size of a buffer allocated by the\nsetvbuf() function.\"  Does size=0 mean it allocates very little, and while\nit tries to line buffer the output, because the buffer is so small that it\nfails to buffer an entire line causing early flushing of the stream?\n"},{"id":"89726","messageId":"alpine.LNX.1.10.0809032325080.25336@suse104.zenez.com","threadId":"15367","inReplyTo":"7vhc8w8rme.fsf@gitster.siamese.dyndns.org","subject":"Re: latest clone/pull of git.git problems with setlinebuf.","fromName":"Boyd Lynn Gerber","fromEmail":"gerberb@zenez.com","sentAt":"2008-09-04T05:29:32Z","receivedAt":"2008-09-04T05:29:32Z","isPatch":false,"sender":{"key":"gerberb@zenez.com","avatar":null},"body":"On Wed, 3 Sep 2008, Junio C Hamano wrote:\n> Boyd Lynn Gerber <gerberb@zenez.com> writes:\n>> On Wed, 3 Sep 2008, Junio C Hamano wrote:\n>>> Ah, ok.  I should have noticed that setlinebuf() was outside POSIX (it is\n>>> not usable on older BSDs either).\n>>>\n>>> Let's see if we can replace it with setvbuf() which is POSIX.\n>>\n>> This fixes the problem. on both OS's.\n>\n> By the way, have you actually exercised the codepath, or does your above\n> \"fixes\" mean \"compiles\"?\n>\n> I knew it would compile on a system with POSIX setvbuf(), but I was \n> unsure about the size argument.  I know for glibc giving <NULL, 0> would \n> be equivalent to setlinebuf(), but POSIX itself leaves what exactly \n> happens to the size argument quite vague, saying only \"otherwise [when \n> buf is a null pointer], size may determine the size of a buffer \n> allocated by the setvbuf() function.\"  Does size=0 mean it allocates \n> very little, and while it tries to line buffer the output, because the \n> buffer is so small that it fails to buffer an entire line causing early \n> flushing of the stream?\n\nI only compiled it.  I am debuging some test errors.  I did a gmake test\n\nThis is the test that fails.  Everything before it passes.\n\n*   ok 41: very long name in the index handled sanely\n* fixed 1 known breakage(s)\n* still have 1 known breakage(s)\n* passed all remaining 40 test(s)\n*** t0001-init.sh ***\n...\n*   ok 9: GIT_DIR & GIT_WORK_TREE (2)\n* FAIL 10: reinit\n\n\n                 (\n                         unset GIT_CONFIG GIT_WORK_TREE GIT_CONFIG\n\n                         mkdir again &&\n                         cd again &&\n                         git init >out1 2>err1 &&\n                         git init >out2 2>err2\n                 ) &&\n                 grep \"Initialized empty\" again/out1 &&\n                 grep \"Reinitialized existing\" again/out2 &&\n                 >again/empty &&\n                 test_cmp again/empty again/err1 &&\n                 test_cmp again/empty again/err2\n\n* FAIL 11: init with --template\n\n                 mkdir template-source &&\n                 echo content >template-source/file &&\n                 (\n                         mkdir template-custom &&\n                         cd template-custom &&\n                         git init --template=../template-source\n                 ) &&\n                 test_cmp template-source/file template-custom/.git/file\n\n*   ok 12: init with --template (blank)\n* failed 2 among 12 test(s)\ngmake[2]: *** [t0001-init.sh] Error 1\n\n\n--\nBoyd Gerber <gerberb@zenez.com>\nZENEZ\t1042 East Fort Union #135, Midvale Utah  84047\n"},{"id":"89729","messageId":"alpine.LNX.1.10.0809032337480.26028@suse104.zenez.com","threadId":"15367","inReplyTo":"alpine.LNX.1.10.0809032325080.25336@suse104.zenez.com","subject":"Re: latest clone/pull of git.git problems with setlinebuf.","fromName":"Boyd Lynn Gerber","fromEmail":"gerberb@zenez.com","sentAt":"2008-09-04T05:39:55Z","receivedAt":"2008-09-04T05:39:55Z","isPatch":false,"sender":{"key":"gerberb@zenez.com","avatar":null},"body":"On Wed, 3 Sep 2008, Boyd Lynn Gerber wrote:\n> On Wed, 3 Sep 2008, Junio C Hamano wrote:\n>> Boyd Lynn Gerber <gerberb@zenez.com> writes:\n>>> On Wed, 3 Sep 2008, Junio C Hamano wrote:\n>>>> Ah, ok.  I should have noticed that setlinebuf() was outside POSIX (it is\n>>>> not usable on older BSDs either).\n>>>> \n>>>> Let's see if we can replace it with setvbuf() which is POSIX.\n>>> \n>>> This fixes the problem. on both OS's.\n>> \n>> By the way, have you actually exercised the codepath, or does your above\n>> \"fixes\" mean \"compiles\"?\n>> \n>> I knew it would compile on a system with POSIX setvbuf(), but I was unsure \n>> about the size argument.  I know for glibc giving <NULL, 0> would be \n>> equivalent to setlinebuf(), but POSIX itself leaves what exactly happens to \n>> the size argument quite vague, saying only \"otherwise [when buf is a null \n>> pointer], size may determine the size of a buffer allocated by the \n>> setvbuf() function.\"  Does size=0 mean it allocates very little, and while \n>> it tries to line buffer the output, because the buffer is so small that it \n>> fails to buffer an entire line causing early flushing of the stream?\n>\n> I only compiled it.  I am debuging some test errors.  I did a gmake test\n>\n> This is the test that fails.  Everything before it passes.\n\n...\n*   still broken 4: pretend we have a known breakage\n*   FIXED 5: pretend we have fixed a known breakage\n...\n\n> *   ok 41: very long name in the index handled sanely\n> * fixed 1 known breakage(s)\n> * still have 1 known breakage(s)\n> * passed all remaining 40 test(s)\n> *** t0001-init.sh ***\n> ...\n> *   ok 9: GIT_DIR & GIT_WORK_TREE (2)\n> * FAIL 10: reinit\n>\n>\n>                (\n>                        unset GIT_CONFIG GIT_WORK_TREE GIT_CONFIG\n>\n>                        mkdir again &&\n>                        cd again &&\n>                        git init >out1 2>err1 &&\n>                        git init >out2 2>err2\n>                ) &&\n>                grep \"Initialized empty\" again/out1 &&\n>                grep \"Reinitialized existing\" again/out2 &&\n>                >again/empty &&\n>                test_cmp again/empty again/err1 &&\n>                test_cmp again/empty again/err2\n>\n> * FAIL 11: init with --template\n>\n>                mkdir template-source &&\n>                echo content >template-source/file &&\n>                (\n>                        mkdir template-custom &&\n>                        cd template-custom &&\n>                        git init --template=../template-source\n>                ) &&\n>                test_cmp template-source/file template-custom/.git/file\n>\n> *   ok 12: init with --template (blank)\n> * failed 2 among 12 test(s)\n> gmake[2]: *** [t0001-init.sh] Error 1\n\nI have now inclulded everything in gmake test that was not an OK.  I hope \nthis answers your questions.\n\nWhat I should have said is that I have not used it outside of gmake and \ngmake test.\n\n--\nBoyd Gerber <gerberb@zenez.com>\nZENEZ\t1042 East Fort Union #135, Midvale Utah  84047\n"}]}