git no longer builds on SunOS 5.10, a report

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I've spent the entire day trying to fix the build for SunOS 5.10, as
I've done a few times over the years out of sheer stubbornness, but
this time I'm throwing in the towel. I figured I would at least relay
what I found though, in case anyone else came looking.

First, clar.suite was generated as broken because clar-decls.h was
generated as empty. Tweaking the sed one-liner in Makefile that is
used to generate clar-decls.h fixed that (move the end-of-line marker
outside of the capture group, `$$\)` -> `\)$$`), which I would submit
as a patch, but (a) that only fixed part of the problem and (b) I'm
not entirely sure why it helped. If someone else wants to apply this
change, which would align the end-of-line marker placement with the
start-of-line marker placement, have at it.

The next issue was that clar/sandbox.h uses mkdtemp, which I don't
have here. Git has solved this in compat/mkdtemp.c via
git-compat-util.h, but clar is not using it. Adding git-compat-util.h
to clar/sandbox.h feels weird, but does get us further along. That
change introduced banned.h into clar, which exposed the use of strncpy
and localtime, both otherwise banned in git.

Including git-compat-util.h in clar/sandbox.h (bringing in mkdtemp,
and replacing strncpy with strlcpy) and clar/summary.h (replacing
localtime with localtime_r) leads to our next issue: a redefinition of
_FILE_OFFSET_BITS, which is defined unconditionally in
git-compat-util.h, because clar.c imports system headers that define
it first. git-compat-util.h is meant to be included first, so, I added
git-compat-util.h to the top of clar.c. That caused system includes
via <wchar.h> to no longer compile due to syntax errors. This is where
I gave up.

I'm sad that I can no longer build git on this old version of SunOS,
and that it's the newly-imported unit-testing framework and not git
itself that is preventing me from building it. Given the talk of
adding rust to git, and of bumping the perl requirements to 5.26.0 (I
have a system 5.8.3, and a 5.10.1 for building openssl), this moment
was inevitable. On the plus side, this was the slowest platform I
built git on, so perhaps I should be happy about my new free time.

Please note that this should not be read as opposition to the new
unit-testing framework in any way. Building git (and curl, and gmake,
and zlib, and openssl, and perl, all for git) for SunOS was a hobby
for me, and not anything I personally need, and besides, it's not like
my previous builds have disappeared.

The last successful build for me was 2.45.2. I've built or tried to
build most versions since 1.6.6. Some of my build infrastructure was
unavailable since sometime after 2.45.2, so I have not tried 2.46.x,
but it lacks clar, so I expect it would build fine.

Cheers,
-Alejandro




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux