git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Building git-1.5.3.7 on HP-UX 11.00

From
H.Merijn Brand <h.m.brand@xs4all.nl>
Date
Dec 11, 2007, 13:33 UTC
Message-ID
<20071211143323.27c860db@pc09.procura.nl>
In-Reply-To
<7vfxy9fxh3.fsf@gitster.siamese.dyndns.org>
On Tue, 11 Dec 2007 00:26:48 -0800, Junio C Hamano <gitster@pobox.com> wrote:
Show 12 quoted lines
> "H.Merijn Brand" <h.m.brand@xs4all.nl> writes:
> 
> > Summary of the changes:
> >
> > 1 Added a section for HP-UX in the Makefile. Note that this will
> >   cover most of HP-UX, but might need several changes for both
> >   newer HP-UX versions and 64bit environments. Will come to that
> >   once I've got it all running
> >
> > 2 HP-UX does not have <sys/select.h>. I mentioned this before
> 
> Unfortunate.  It is even in POSIX.

The *include* file, or the function? HP-UX has the function, but not the include file.

> But nothing "make -DNO_SYS_SELECT=Unfortunately" cannot fix.

I didn't see any #ifdef/#ifndef around the include, otherwise I would have found that already I think.

Show 10 quoted lines
> > 3 I am willing to believe that HP_UX' vsnprintf () is broken, or
> >   at least does not conform to the expectations in the GNU world,
> >   but chickening out like the way strbuf_addf () does is maybe a
> >   bit too rude, so I forced a minimum of 64bytes available. That
> >   fixes a lot!
> >
> >   but it still breaks t4013 :(
> 
> I think Shawn had something similar for Solaris, and if it is a small
> cost to help portability, it does not feel so bad.
:)
Show 5 quoted lines
> > 4 'tr' doesn't like '\0', but wants '\000' instead.
> > 5 'tr' cannot deal with character classes
> 
> Ok, that's odd (and not old fashioned, which makes even odder), but
> "\000" is not too bad (unless we have to do that million places).
> perl -MFile::Find -e'find(sub{m/\.sh$/ or return;local@ARGV=($_);while(<>){/\btr\b.*\\\d(?\!\d\d)/&&print"$File::Find::name\t$.\t$_"}},".")'

./git-filter-branch.sh 293 git diff-index -r $commit | cut -f 2- | tr '\n' '\0' | \ ./test-sha1.sh 13 tr '[\0]' '[g]' ./test-sha1.sh 58 tr '[\0]' '[g]' ./t/diff-lib.sh 24 tr '\0' '\012' <"$1" | sed -e "$sanitize_diff_raw_z" >.tmp-1 ./t/diff-lib.sh 25 tr '\0' '\012' <"$2" | sed -e "$sanitize_diff_raw_z" >.tmp-2 ./t/t2001-checkout-cache-clash.sh 33 sed -e 's/^\([0-9]*\) [^ ]* [0-9a-f]* /tr: \1 /' ./t/t3300-funny-names.sh 57 'git ls-files -z | tr \\0 \\012 >current && ./t/t3300-funny-names.sh 86 'git diff-index -z --name-status $t0 | tr \\0 \\012 >current && ./t/t3300-funny-names.sh 90 'git diff-tree -z --name-status $t0 $t1 | tr \\0 \\012 >current && ./t/t4020-diff-external.sh 102 echo NULZbetweenZwords | tr Z '\0' > file ./t/t4103-apply-binary.sh 27 tr 'x' '\0' <file1 >file3 ./t/t4103-apply-binary.sh 30 tr '\0' 'v' <file3 >file1 ./t/t4116-apply-reverse.sh 15 tr "[ijk]" '\''[\0\1\2]'\'' <file1 >file2 && ./t/t4116-apply-reverse.sh 22 tr "[mon]" '\''[\0\1\2]'\'' <file1 >file2 && ./t/t4200-rerere.sh 132 echo "$sha1 a1" | tr '\012' '\0' > .git/rr-cache/MERGE_RR ./t/t5300-pack-object.sh 18 dd if=/dev/zero bs=4k count=1 | tr "\\0" $i >$i &&

So with the recent history in the back of my mind, I'd expect all tr commands with character class like notations to fail. Patch below.

Show 7 quoted lines
> > 6 I don't know how to attack another HP specific problem: HP has
> >   a system command called 'patch' and it is *very* incompatible
> >   with GNU patch. Very.
> 
> I do not think there is any reason for us to rely on "GNU patch"
> anymore.  4109 can have precomputed test vector instead of comparing our
> output with what GNU patch of the day happens to do.
\o/
Show 7 quoted lines
> > 7 What do you expect for LOCALE's?
> 
> I am not opposed to a change that makes these tests to conditionally
> skip on systems (not necessarily "platforms" but individual
> "installations") that do not have locales necessary to run tests
> installed, just like cvs or svn tests are skipped when they are not
> installed.  Especially you are not using iconv...
\o/

BTW it is rather unlikely to find Tcl and/or Tk on most HP-UX systems. Having perl already required, would you cheer an attempt to rewrite git-gui to Perl/Tk? (I didn't have a look at it yet, but that should make git-gui an awful lot more portable and when used on windows with ActivePerl, Tk is already available in all builds)

I have put the output of
% make -i test | & perl -ne'm/^\*\s+ok\s+\d+:/ or print' > git-make-test.log
on http://www.xs4all.nl/~procura/git-make-test.log
which leaves only the following tests as failures:

t3901-i18n-patch.sh t4201-shortlog.sh t5100-mailinfo.sh t5405-send-pack-rewind.sh t5500-fetch-pack.sh t5505-remote.sh t5510-fetch.sh t5515-fetch-merge-logic.sh t5516-fetch-push.sh t5520-pull.sh t5600-clone-fail-cleanup.sh t5700-clone-reference.sh t5701-clone-local.sh t6002-rev-list-bisect.sh t6003-rev-list-topo-order.sh t6022-merge-rename.sh t6026-merge-attr.sh t6200-fmt-merge-msg.sh t7003-filter-branch.sh t9300-fast-import.sh t9301-fast-export.sh t9500-gitweb-standalone-no-errors.sh

How close am I to success?

--8<--- git-tr.diff --- git-2007-12-10_01/git-filter-branch.sh 2007-12-09 10:23:48 +0100 +++ git-2007-12-10/git-filter-branch.sh 2007-12-11 13:39:02 +0100

@@ -290,7 +290,7 @@ while read commit parents; do
                eval "$filter_tree" < /dev/null ||
                        die "tree filter failed: $filter_tree"

-               git diff-index -r $commit | cut -f 2- | tr '\n' '\0' | \
+               git diff-index -r $commit | cut -f 2- | tr '\n' '\000' | \
                        xargs -0 git update-index --add --replace --remove
                git ls-files -z --others | \
                        xargs -0 git update-index --add --replace --remove
--- git-2007-12-10_01/test-sha1.sh      2007-12-09 10:23:48 +0100
+++ git-2007-12-10/test-sha1.sh 2007-12-11 13:39:29 +0100
@@ -10,7 +10,7 @@ do
                {
                        test -z "$pfx" || echo "$pfx"
                        dd if=/dev/zero bs=1048576 count=$cnt 2>/dev/null |
-                       tr '[\0]' '[g]'
+                       tr '\000' 'g'
                } | ./test-sha1 $cnt
        `
        if test "$expect" = "$actual"
@@ -55,7 +55,7 @@ do
                {
                        test -z "$pfx" || echo "$pfx"
                        dd if=/dev/zero bs=1048576 count=$cnt 2>/dev/null |
-                       tr '[\0]' '[g]'
+                       tr '\000' 'g'
                } | sha1sum |
                sed -e 's/ .*//'
        `
--- git-2007-12-10_01/t/diff-lib.sh     2007-12-09 10:23:48 +0100
+++ git-2007-12-10/t/diff-lib.sh        2007-12-11 13:39:56 +0100
@@ -21,8 +21,8 @@ compare_diff_raw_z () {
     # Also we do not check SHA1 hash generation in this test, which
     # is a job for t0000-basic.sh

-    tr '\0' '\012' <"$1" | sed -e "$sanitize_diff_raw_z" >.tmp-1
-    tr '\0' '\012' <"$2" | sed -e "$sanitize_diff_raw_z" >.tmp-2
+    tr '\000' '\012' <"$1" | sed -e "$sanitize_diff_raw_z" >.tmp-1
+    tr '\000' '\012' <"$2" | sed -e "$sanitize_diff_raw_z" >.tmp-2
     git diff .tmp-1 .tmp-2 && rm -f .tmp-1 .tmp-2
 }

--- git-2007-12-10_01/t/t3300-funny-names.sh    2007-12-09 10:23:48 +0100
+++ git-2007-12-10/t/t3300-funny-names.sh       2007-12-11 13:40:32 +0100
@@ -54,7 +54,7 @@ echo 'just space
 no-funny
 tabs   ," (dq) and spaces' >expected
 test_expect_success 'git ls-files -z with-funny' \
-       'git ls-files -z | tr \\0 \\012 >current &&
+       'git ls-files -z | tr \\000 \\012 >current &&
        git diff expected current'

 t1=`git write-tree`
@@ -83,11 +83,11 @@ test_expect_success 'git diff-tree with-
 echo 'A
 tabs   ," (dq) and spaces' >expected
 test_expect_success 'git diff-index -z with-funny' \
-       'git diff-index -z --name-status $t0 | tr \\0 \\012 >current &&
+       'git diff-index -z --name-status $t0 | tr \\000 \\012 >current &&
        git diff expected current'

 test_expect_success 'git diff-tree -z with-funny' \
-       'git diff-tree -z --name-status $t0 $t1 | tr \\0 \\012 >current &&
+       'git diff-tree -z --name-status $t0 $t1 | tr \\000 \\012 >current &&
        git diff expected current'

 cat > expected <<\EOF
--- git-2007-12-10_01/t/t4020-diff-external.sh  2007-12-09 10:23:48 +0100
+++ git-2007-12-10/t/t4020-diff-external.sh     2007-12-11 13:40:44 +0100
@@ -99,7 +99,7 @@ test_expect_success 'no diff with -diff'
        git diff | grep Binary
 '

-echo NULZbetweenZwords | tr Z '\0' > file
+echo NULZbetweenZwords | tr Z '\000' > file

 test_expect_success 'force diff with "diff"' '
        echo >.gitattributes "file diff" &&
--- git-2007-12-10_01/t/t4103-apply-binary.sh   2007-12-09 10:23:48 +0100
+++ git-2007-12-10/t/t4103-apply-binary.sh      2007-12-11 13:40:57 +0100
@@ -24,10 +24,10 @@ git update-index --add --remove file1 fi
 git-commit -m 'Initial Version' 2>/dev/null

 git-checkout -b binary
-tr 'x' '\0' <file1 >file3
+tr 'x' '\000' <file1 >file3
 cat file3 >file4
 git add file2
-tr '\0' 'v' <file3 >file1
+tr '\000' 'v' <file3 >file1
 rm -f file2
 git update-index --add --remove file1 file2 file3 file4
 git-commit -m 'Second Version'
--- git-2007-12-10_01/t/t4116-apply-reverse.sh  2007-12-09 10:23:48 +0100
+++ git-2007-12-10/t/t4116-apply-reverse.sh     2007-12-11 13:42:13 +0100
@@ -12,14 +12,14 @@ test_description='git apply in reverse
 test_expect_success setup '

        for i in a b c d e f g h i j k l m n; do echo $i; done >file1 &&
-       tr "[ijk]" '\''[\0\1\2]'\'' <file1 >file2 &&
+       tr "ijk" '\''\000\001\002'\'' <file1 >file2 &&

        git add file1 file2 &&
        git commit -m initial &&
        git tag initial &&

        for i in a b c g h i J K L m o n p q; do echo $i; done >file1 &&
-       tr "[mon]" '\''[\0\1\2]'\'' <file1 >file2 &&
+       tr "mon" '\''\000\001\002'\'' <file1 >file2 &&

        git commit -a -m second &&
        git tag second &&
--- git-2007-12-10_01/t/t4200-rerere.sh 2007-12-09 10:23:48 +0100
+++ git-2007-12-10/t/t4200-rerere.sh    2007-12-11 13:42:28 +0100
@@ -129,7 +129,7 @@ test_expect_success 'rerere kicked in' "
 test_expect_success 'rerere prefers first change' 'git diff a1 expect'

 rm $rr/postimage
-echo "$sha1    a1" | tr '\012' '\0' > .git/rr-cache/MERGE_RR
+echo "$sha1    a1" | tr '\012' '\000' > .git/rr-cache/MERGE_RR

 test_expect_success 'rerere clear' 'git rerere clear'

--- git-2007-12-10_01/t/t5300-pack-object.sh    2007-12-09 10:23:48 +0100
+++ git-2007-12-10/t/t5300-pack-object.sh       2007-12-11 13:42:46 +0100
@@ -15,7 +15,7 @@ test_expect_success \
     'rm -f .git/index*
      for i in a b c
      do
-            dd if=/dev/zero bs=4k count=1 | tr "\\0" $i >$i &&
+            dd if=/dev/zero bs=4k count=1 | tr "\\000" $i >$i &&
             git update-index --add $i || return 1
      done &&
      cat c >d && echo foo >>d && git update-index --add d &&
-->8--- git-tr.diff
-- 
H.Merijn Brand         Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using & porting perl 5.6.2, 5.8.x, 5.10.x  on HP-UX 10.20, 11.00, 11.11,
& 11.23, SuSE 10.1 & 10.2, AIX 5.2, and Cygwin.       http://qa.perl.org
http://mirrors.develooper.com/hpux/            http://www.test-smoke.org
                        http://www.goldmark.org/jeff/stupid-disclaimers/
Previous: Johannes SixtNext: Johannes Sixt
Message 25 of 27 in “Building git-1.5.3.7 on HP-UX 11.00”
  1. H.Merijn BrandDec 4, 2007
  2. Johannes SchindelinDec 4, 2007
  3. H.Merijn BrandDec 4, 2007
  4. Johannes SchindelinDec 4, 2007
  5. H.Merijn BrandDec 4, 2007
  6. Andreas EricssonDec 4, 2007
  7. H.Merijn BrandDec 4, 2007
  8. Johannes SchindelinDec 4, 2007
  9. H.Merijn BrandDec 4, 2007
  10. Johannes SchindelinDec 4, 2007
  11. H.Merijn BrandDec 5, 2007
  12. Junio C HamanoDec 4, 2007
  13. H.Merijn BrandDec 4, 2007
  14. Johannes SchindelinDec 4, 2007
  15. H.Merijn BrandDec 5, 2007
  16. Do not rely on the exit status of "unset" for unset variablesJohannes Schindelin, Dec 4, 2007
  17. H.Merijn BrandDec 5, 2007
  18. H.Merijn BrandDec 10, 2007
  19. Junio C HamanoDec 11, 2007
  20. Shawn O. PearceDec 11, 2007
  21. H.Merijn BrandDec 11, 2007
  22. Johannes SixtDec 11, 2007
  23. H.Merijn BrandDec 11, 2007
  24. Johannes SixtDec 11, 2007
  25. H.Merijn BrandDec 11, 2007
  26. Johannes SixtDec 11, 2007
  27. H.Merijn BrandDec 4, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.