{"thread":{"id":"20353","subject":"Building GIT on HP-UX: \"make test\" fails","startedAt":"2009-08-03T10:54:03Z","lastAt":"2009-08-04T06:39:50Z","messageCount":3,"participants":["Ulrich Windl","Alex Riesen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"119400","messageId":"4A76DDEE.6699.119A5FD@Ulrich.Windl.rkdvmks1.ngate.uni-regensburg.de","threadId":"20353","inReplyTo":null,"subject":"Building GIT on HP-UX: \"make test\" fails","fromName":"Ulrich Windl","fromEmail":"ulrich.windl@rz.uni-regensburg.de","sentAt":"2009-08-03T10:54:03Z","receivedAt":"2009-08-03T10:54:03Z","isPatch":false,"sender":{"key":"ulrich.windl@rz.uni-regensburg.de","avatar":null},"body":"(not subscribed, so please CC: replies to me, please (if replies go to the list))\nHello,\n\nI've tried to build GIT (git-1.6.2.5) on HP-UX 11.31 (IA64) using \"gcc (GCC) \n4.2.1\". Unfortunately the \"make test\" failed after build. Here are some details:\n\nConfigure command:\n./configure CC=gcc LIBS=\"-L../gzip-1.3.12/lib -lgzip\" --prefix=/usr/local\n\n(There were problems with \"-lz\" which seems to be \"-lgzip\" for recent builds; I \nhad to manually edit the Makefile)\n[...]\nchecking for deflateBound in -lz... no\n[...]\nIs the configure program expected to continue if there is no \"-lz\"?\n\n\"-lz\" problem:\n% make all\n    LINK git-fast-import\nld: Can't find library for -lz\nFatal error.\ncollect2: ld returned 1 exit status\n\nEventually the build succeeded, but there was one warning:\ndaemon.c: In function 'service_loop':\ndaemon.c:855: warning: passing argument 3 of 'accept' from incompatible pointer \ntype\n\nLine is:\nint incoming = accept(pfd[i].fd, (struct sockaddr *)&ss, &sslen);\n\nHP-UX manual has this prototype:\nint accept(int s, void *addr, int *addrlen);\n\nHere is the end of \"make test\":\n[...]\n*** t0100-previous.sh ***\n*   ok 1: branch -d @{-1}\n*   ok 2: branch -d @{-12} when there is not enough switches yet\n* FAIL 3: merge @{-1}\n\n                git checkout A &&\n                test_commit B &&\n                git checkout A &&\n                test_commit C &&\n                git branch -f master B &&\n                git branch -f other &&\n                git checkout other &&\n                git checkout master &&\n                git merge @{-1} &&\n                git cat-file commit HEAD | grep \"Merge branch 'other'\"\n\n* FAIL 4: merge @{-1} when there is not enough switches yet\n\n                git reflog expire --expire=now &&\n                git checkout -f master &&\n                git reset --hard B &&\n                git branch -f other C &&\n                git checkout other &&\n                git checkout master &&\n                test_must_fail git merge @{-12}\n\n* failed 2 among 4 test(s)\nmake[2]: *** [t0100-previous.sh] Error 1\n[...]\n\nI can try some simple things fixing the problem, but I don't have an Internet \nconnection at that machine.\n\nRegards,\nUlrich\n"},{"id":"119405","messageId":"81b0412b0908030754l553ddac2y4c2e7f9fe606e67a@mail.gmail.com","threadId":"20353","inReplyTo":"4A76DDEE.6699.119A5FD@Ulrich.Windl.rkdvmks1.ngate.uni-regensburg.de","subject":"Re: Building GIT on HP-UX: \"make test\" fails","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2009-08-03T14:54:00Z","receivedAt":"2009-08-03T14:54:00Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On Mon, Aug 3, 2009 at 12:54, Ulrich\nWindl<ulrich.windl@rz.uni-regensburg.de> wrote:\n> Here is the end of \"make test\":\n> [...]\n> *** t0100-previous.sh ***\n> *   ok 1: branch -d @{-1}\n> *   ok 2: branch -d @{-12} when there is not enough switches yet\n> * FAIL 3: merge @{-1}\n>\n>                git checkout A &&\n>                test_commit B &&\n>                git checkout A &&\n>                test_commit C &&\n>                git branch -f master B &&\n>                git branch -f other &&\n>                git checkout other &&\n>                git checkout master &&\n>                git merge @{-1} &&\n>                git cat-file commit HEAD | grep \"Merge branch 'other'\"\n>\n> * FAIL 4: merge @{-1} when there is not enough switches yet\n>\n>                git reflog expire --expire=now &&\n>                git checkout -f master &&\n>                git reset --hard B &&\n>                git branch -f other C &&\n>                git checkout other &&\n>                git checkout master &&\n>                test_must_fail git merge @{-12}\n>\n> * failed 2 among 4 test(s)\n> make[2]: *** [t0100-previous.sh] Error 1\n> [...]\n>\n> I can try some simple things fixing the problem, but I don't have an Internet\n> connection at that machine.\n\nTry:\n\n  $ cd t && ./t0100-previous.sh -d -v -i\n\nLook at the output and if you can't make anything out of it,\njust post it here.\n"},{"id":"119467","messageId":"4A77F3D9.4170.5574656@Ulrich.Windl.rkdvmks1.ngate.uni-regensburg.de","threadId":"20353","inReplyTo":"81b0412b0908030754l553ddac2y4c2e7f9fe606e67a@mail.gmail.com","subject":"Re: Building GIT on HP-UX: \"make test\" fails","fromName":"Ulrich Windl","fromEmail":"ulrich.windl@rz.uni-regensburg.de","sentAt":"2009-08-04T06:39:50Z","receivedAt":"2009-08-04T06:39:50Z","isPatch":false,"sender":{"key":"ulrich.windl@rz.uni-regensburg.de","avatar":null},"body":"On 3 Aug 2009 at 16:54, Alex Riesen wrote:\n\n> Try:\n> \n>   $ cd t && ./t0100-previous.sh -d -v -i\n> \n> Look at the output and if you can't make anything out of it,\n> just post it here.\n\nHi!\n\nThanks for that. It seems the basic problem is:\nfatal: your vsnprintf is broken\n\nHowever from my own programming I realized that HP-UX and Linux vsnprintf return \ndifferent values. Here's how I deal with it:\n\nMy comment says:\nDefine ``C99_LIBRARY'' fixes incompatible return value of\n * ``snprintf()'' that causes memory corruption on error with C99-compliant\n * C library. \n[...]\n * Handle negative return value of ``snprintf()'' properly.\n[...]\n        csp[cap] = '\\0';\n        d = snprintf(csp, cap, \"%s\", base);\n#ifdef  C99_LIBRARY\n        if ( d > cap )\n                d = cap;\n#else\n        if ( d > 0 )\n#endif\n                csp += d, cap -= d;\n--------\nBack to the test output; here it is:\n./t0100-previous.sh -d -v -i\nInitialized empty Git repository in /home/windl/GNU/git-1.6.2.5/t/trash \ndirectory.t0100-previous/.git/\n* expecting success:\n        test_commit A &&\n        git checkout -b junk &&\n        git checkout - &&\n        test \"$(git symbolic-ref HEAD)\" = refs/heads/master &&\n        git branch -d @{-1} &&\n        test_must_fail git rev-parse --verify refs/heads/junk\n\n[master (root-commit) 0ddfaf1] A\n 1 files changed, 1 insertions(+), 0 deletions(-)\n create mode 100644 A.t\nSwitched to a new branch 'junk'\nSwitched to branch 'master'\nDeleted branch junk (was 0ddfaf1).\nfatal: Needed a single revision\n*   ok 1: branch -d @{-1}\n\n* expecting success:\n        git reflog expire --expire=now &&\n        git checkout -b junk2 &&\n        git checkout - &&\n        test \"$(git symbolic-ref HEAD)\" = refs/heads/master &&\n        test_must_fail git branch -d @{-12} &&\n        git rev-parse --verify refs/heads/master\n\nSwitched to a new branch 'junk2'\nSwitched to branch 'master'\nerror: branch '@{-12}' not found.\n0ddfaf193ff13d6ab39b7cbd9eed645e3ee2f050\n*   ok 2: branch -d @{-12} when there is not enough switches yet\n\n* expecting success:\n        git checkout A &&\n        test_commit B &&\n        git checkout A &&\n        test_commit C &&\n        git branch -f master B &&\n        git branch -f other &&\n        git checkout other &&\n        git checkout master &&\n        git merge @{-1} &&\n        git cat-file commit HEAD | grep \"Merge branch 'other'\"\n\nNote: moving to 'A' which isn't a local branch\nIf you want to create a new branch from this checkout, you may do so\n(now or later) by using -b with the checkout command again. Example:\n  git checkout -b <new_branch_name>\nHEAD is now at 0ddfaf1... A\n[detached HEAD d9df450] B\n 1 files changed, 1 insertions(+), 0 deletions(-)\n create mode 100644 B.t\nPrevious HEAD position was d9df450... B\nfatal: your vsnprintf is broken\n* FAIL 3: merge @{-1}\n\n                git checkout A &&\n                test_commit B &&\n                git checkout A &&\n                test_commit C &&\n                git branch -f master B &&\n                git branch -f other &&\n                git checkout other &&\n                git checkout master &&\n                git merge @{-1} &&\n                git cat-file commit HEAD | grep \"Merge branch 'other'\"\n"}]}