[PATCH] Building Git on Tru64

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Daniel Richard G.
Date: Thursday, April 15, 2010 - 12:09 pm

Building Git on a Tru64 V4.0G system (for the purpose of running a CMake
dashboard) was a bit of a challenge, and required numerous changes to
the source. It was a good exercise, however, in maintaining
compatibility with systems on which many modern facilities are missing.

A patch against 1.7.0.5 is attached, though parts of it are intended
more for reference than actual committing---some of the changes are system-
specific, and need to be integrated in a more generalized form.

A summary of the changes:

* Enum lists can't have a comma after the last element. (This was
  actually more for the benefit of the Solaris compiler, but Tru64
  complained as well.) I took out the comma, though for the sake of
  future diffs it may be preferable to add a last-element sentinel.

* Can't have C++-style comments in C code.

* Quelled a couple of control-reaches-end-of-non-void-function warnings
  by adding "return 0;" after an "exit(0);".

* compat/{hstrerror.c,inet_ntop.c,inet_pton.c} don't do any kind of feature-
  macro setup at the top, and a bit of this was necessary to get these
  files to compile.

* In daemon.c, the compiler complained about the last argument to
  accept() being the wrong size (32 bits instead of the expected 64).

* On Tru64, MAP_FAILED is #defined as (-1L), and the compiler chokes if
  you directly compare a pointer to an integer. So, need to cast
  MAP_FAILED to (void *), redundant as that may seem.

* Most of the modern features in the system headers are enabled by
  #defining _OSF_SOURCE. AES_SOURCE is needed to get setenv() and
  unsetenv().

* This rev of Tru64 doesn't have an inttypes.h header, so the #include
  has to be conditional, and you have to provide your own definitions of
  uint{16,32,64}_t and {,u}intptr_t. (These types are not present at all
  in the system headers.)

* The "inline" keyword is not supported.


Some additional necessities, handled in config.mak.autogen:

* The following options are needed:

        NO_HSTRERROR = 1
        NO_INET_NTOP = 1
        NO_INET_PTON = 1
        NO_NSEC = 1
        NO_SOCKADDR_STORAGE = 1
        NO_STRTOULL = 1

  Could checks for these be added to the configure script?

* Prototypes are not provided for the compat/* implementations of
  {,v}snprintf(), inet_ntop() and inet_pton() (and maybe others). This
  can potentially be an issue for at least inet_ntop(), which returns a
  pointer (that is truncated if the compiler assumes the function
  returns int).

* Need to define _POSIX_C_SOURCE with a value of at least 199506L, or
  else you don't get MAP_FAILED or various pthread-related types
  (pthread_attr_t, pthread_mutex_t et al.).

* Need to define _POSIX_PII_SOCKET to get socklen_t.


Even after all that, installing via DESTDIR doesn't work:

    SUBDIR perl
perl.mak:691: *** ExtUtils::MakeMaker version "6.03" is older than 6.11 and so is likely incompatible with the DESTDIR mechanism.  Try setting NO_PERL_MAKEMAKER=1 instead.  Stop.
gmake[1]: *** [all] Error 2
gmake: *** [all] Error 2

    SUBDIR perl
perl.mak:691: *** ExtUtils::MakeMaker version "6.03" is older than 6.11 and so is likely incompatible with the DESTDIR mechanism.  Try setting NO_PERL_MAKEMAKER=1 instead.  Stop.
gmake[1]: *** [all] Error 2
gmake: *** [all] Error 2

(Configuring with --without-perl prevents the build from even starting,
so is there any way to sidestep the above error?)

Comments are welcome, as well as requests for further testing. I'd like
to get Git to the point where it builds out-of-the-box on this system.


--Daniel


P.S.: Please Cc: any replies to me, as I am not subscribed to this list.


-- 
NAME = Daniel Richard G.     _\|/_    Remember, skunks
MAIL = skunk@iSKUNK.ORG     (/o|o\) _- don't smell bad---
MAIL+= skunk@alum.MIT.EDU   < (^),>     it's the people who
WWW  = (not there yet!)      /   \      annoy us that do!
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Building Git on Tru64, Daniel Richard G., (Thu Apr 15, 12:09 pm)
Re: [PATCH] Building Git on Tru64, Alex Riesen, (Thu Apr 15, 12:29 pm)
Re: [PATCH] Building Git on Tru64, Daniel Richard G., (Thu Apr 15, 12:46 pm)
Re: [PATCH] Building Git on Tru64, Nicolas Pitre, (Thu Apr 15, 1:04 pm)
Re: [PATCH] Building Git on Tru64, Daniel Richard G., (Thu Apr 15, 1:21 pm)
Re: [PATCH] Building Git on Tru64, Jakub Narebski, (Thu Apr 15, 2:24 pm)
Re: [PATCH] Building Git on Tru64, Erik Faye-Lund, (Thu Apr 15, 11:58 pm)