git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Building GIT on HP-UX: "make test" fails
@ 2009-08-03 10:54 Ulrich Windl
  2009-08-03 14:54 ` Alex Riesen
  0 siblings, 1 reply; 3+ messages in thread
From: Ulrich Windl @ 2009-08-03 10:54 UTC (permalink / raw)
  To: git

(not subscribed, so please CC: replies to me, please (if replies go to the list))
Hello,

I've tried to build GIT (git-1.6.2.5) on HP-UX 11.31 (IA64) using "gcc (GCC) 
4.2.1". Unfortunately the "make test" failed after build. Here are some details:

Configure command:
./configure CC=gcc LIBS="-L../gzip-1.3.12/lib -lgzip" --prefix=/usr/local

(There were problems with "-lz" which seems to be "-lgzip" for recent builds; I 
had to manually edit the Makefile)
[...]
checking for deflateBound in -lz... no
[...]
Is the configure program expected to continue if there is no "-lz"?

"-lz" problem:
% make all
    LINK git-fast-import
ld: Can't find library for -lz
Fatal error.
collect2: ld returned 1 exit status

Eventually the build succeeded, but there was one warning:
daemon.c: In function 'service_loop':
daemon.c:855: warning: passing argument 3 of 'accept' from incompatible pointer 
type

Line is:
int incoming = accept(pfd[i].fd, (struct sockaddr *)&ss, &sslen);

HP-UX manual has this prototype:
int accept(int s, void *addr, int *addrlen);

Here is the end of "make test":
[...]
*** t0100-previous.sh ***
*   ok 1: branch -d @{-1}
*   ok 2: branch -d @{-12} when there is not enough switches yet
* FAIL 3: merge @{-1}

                git checkout A &&
                test_commit B &&
                git checkout A &&
                test_commit C &&
                git branch -f master B &&
                git branch -f other &&
                git checkout other &&
                git checkout master &&
                git merge @{-1} &&
                git cat-file commit HEAD | grep "Merge branch 'other'"

* FAIL 4: merge @{-1} when there is not enough switches yet

                git reflog expire --expire=now &&
                git checkout -f master &&
                git reset --hard B &&
                git branch -f other C &&
                git checkout other &&
                git checkout master &&
                test_must_fail git merge @{-12}

* failed 2 among 4 test(s)
make[2]: *** [t0100-previous.sh] Error 1
[...]

I can try some simple things fixing the problem, but I don't have an Internet 
connection at that machine.

Regards,
Ulrich

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Building GIT on HP-UX: "make test" fails
  2009-08-03 10:54 Building GIT on HP-UX: "make test" fails Ulrich Windl
@ 2009-08-03 14:54 ` Alex Riesen
  2009-08-04  6:39   ` Ulrich Windl
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Riesen @ 2009-08-03 14:54 UTC (permalink / raw)
  To: Ulrich Windl; +Cc: git

On Mon, Aug 3, 2009 at 12:54, Ulrich
Windl<ulrich.windl@rz.uni-regensburg.de> wrote:
> Here is the end of "make test":
> [...]
> *** t0100-previous.sh ***
> *   ok 1: branch -d @{-1}
> *   ok 2: branch -d @{-12} when there is not enough switches yet
> * FAIL 3: merge @{-1}
>
>                git checkout A &&
>                test_commit B &&
>                git checkout A &&
>                test_commit C &&
>                git branch -f master B &&
>                git branch -f other &&
>                git checkout other &&
>                git checkout master &&
>                git merge @{-1} &&
>                git cat-file commit HEAD | grep "Merge branch 'other'"
>
> * FAIL 4: merge @{-1} when there is not enough switches yet
>
>                git reflog expire --expire=now &&
>                git checkout -f master &&
>                git reset --hard B &&
>                git branch -f other C &&
>                git checkout other &&
>                git checkout master &&
>                test_must_fail git merge @{-12}
>
> * failed 2 among 4 test(s)
> make[2]: *** [t0100-previous.sh] Error 1
> [...]
>
> I can try some simple things fixing the problem, but I don't have an Internet
> connection at that machine.

Try:

  $ cd t && ./t0100-previous.sh -d -v -i

Look at the output and if you can't make anything out of it,
just post it here.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Building GIT on HP-UX: "make test" fails
  2009-08-03 14:54 ` Alex Riesen
@ 2009-08-04  6:39   ` Ulrich Windl
  0 siblings, 0 replies; 3+ messages in thread
From: Ulrich Windl @ 2009-08-04  6:39 UTC (permalink / raw)
  To: Alex Riesen; +Cc: git

On 3 Aug 2009 at 16:54, Alex Riesen wrote:

> Try:
> 
>   $ cd t && ./t0100-previous.sh -d -v -i
> 
> Look at the output and if you can't make anything out of it,
> just post it here.

Hi!

Thanks for that. It seems the basic problem is:
fatal: your vsnprintf is broken

However from my own programming I realized that HP-UX and Linux vsnprintf return 
different values. Here's how I deal with it:

My comment says:
Define ``C99_LIBRARY'' fixes incompatible return value of
 * ``snprintf()'' that causes memory corruption on error with C99-compliant
 * C library. 
[...]
 * Handle negative return value of ``snprintf()'' properly.
[...]
        csp[cap] = '\0';
        d = snprintf(csp, cap, "%s", base);
#ifdef  C99_LIBRARY
        if ( d > cap )
                d = cap;
#else
        if ( d > 0 )
#endif
                csp += d, cap -= d;
--------
Back to the test output; here it is:
./t0100-previous.sh -d -v -i
Initialized empty Git repository in /home/windl/GNU/git-1.6.2.5/t/trash 
directory.t0100-previous/.git/
* expecting success:
        test_commit A &&
        git checkout -b junk &&
        git checkout - &&
        test "$(git symbolic-ref HEAD)" = refs/heads/master &&
        git branch -d @{-1} &&
        test_must_fail git rev-parse --verify refs/heads/junk

[master (root-commit) 0ddfaf1] A
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 A.t
Switched to a new branch 'junk'
Switched to branch 'master'
Deleted branch junk (was 0ddfaf1).
fatal: Needed a single revision
*   ok 1: branch -d @{-1}

* expecting success:
        git reflog expire --expire=now &&
        git checkout -b junk2 &&
        git checkout - &&
        test "$(git symbolic-ref HEAD)" = refs/heads/master &&
        test_must_fail git branch -d @{-12} &&
        git rev-parse --verify refs/heads/master

Switched to a new branch 'junk2'
Switched to branch 'master'
error: branch '@{-12}' not found.
0ddfaf193ff13d6ab39b7cbd9eed645e3ee2f050
*   ok 2: branch -d @{-12} when there is not enough switches yet

* expecting success:
        git checkout A &&
        test_commit B &&
        git checkout A &&
        test_commit C &&
        git branch -f master B &&
        git branch -f other &&
        git checkout other &&
        git checkout master &&
        git merge @{-1} &&
        git cat-file commit HEAD | grep "Merge branch 'other'"

Note: moving to 'A' which isn't a local branch
If you want to create a new branch from this checkout, you may do so
(now or later) by using -b with the checkout command again. Example:
  git checkout -b <new_branch_name>
HEAD is now at 0ddfaf1... A
[detached HEAD d9df450] B
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 B.t
Previous HEAD position was d9df450... B
fatal: your vsnprintf is broken
* FAIL 3: merge @{-1}

                git checkout A &&
                test_commit B &&
                git checkout A &&
                test_commit C &&
                git branch -f master B &&
                git branch -f other &&
                git checkout other &&
                git checkout master &&
                git merge @{-1} &&
                git cat-file commit HEAD | grep "Merge branch 'other'"

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-08-04  6:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-03 10:54 Building GIT on HP-UX: "make test" fails Ulrich Windl
2009-08-03 14:54 ` Alex Riesen
2009-08-04  6:39   ` Ulrich Windl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).