git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* If NEEDS_LIBICONV is set for Solaris 8, it does not build git for me
@ 2007-07-22 10:40 Thomas Glanzmann
  2007-07-22 22:59 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Glanzmann @ 2007-07-22 10:40 UTC (permalink / raw
  To: Junio C Hamano, GIT; +Cc: Jason Riedy, Paul Jakma

Hello Junio,

     [ Paul and Jason CCed because they touched that section last ]

Patch is appended at the very bottom of the E-Mail. I have a fully
patched Solaris 8 with Forte 11. In order to get git compile I had to
delete the

	NEEDS_LIBICONV = YesPlease

line from the Makefile in the Solaris 8 section. After my patch the
section in the Makefile looks like that:

        ifeq ($(uname_R),5.8)
                NO_UNSETENV = YesPlease
                NO_SETENV = YesPlease
                NO_C99_FORMAT = YesPlease
                NO_STRTOUMAX = YesPlease
        endif
        ifeq ($(uname_R),5.9)
                NO_UNSETENV = YesPlease
                NO_SETENV = YesPlease
                NO_C99_FORMAT = YesPlease
                NO_STRTOUMAX = YesPlease
        endif

As you can see _after_ my patch the secion for 5.8 and 5.9 is the same.
So I wonder if it is possible to merge this two sections. But I have no
idea how to do that in the makefile language. I tried to remove other
flags for 5.8, too but it always resulted in built break so all other
flags are necessary.

----8<---- cut here ----8<---- cut here ----8<---- cut here ----8<----

The following issue as _absolutly_ nothing todo with the above and is
here only for completeness. In order to get git to compile with Forte 11
you have to work around a compiler bug in Forte 11. Forte 11 chokes
sometimes when function arguments are declared as static (I raised this
topic before even on this list). I guess that I will also file a bug
against forte 11 tomorrow. The symptom is:

    CC diff-delta.o
"diff-delta.c", line 248: identifier redeclared: create_delta
        current : function(pointer to const struct delta_index {pointer to const void src_buf, unsigned long src_size, unsigned int hash_mask, array[-1] of pointer to struct index_entry {..} hash}, pointer to const void, unsigned long, pointer to unsigned long, unsigned long) returning pointer to void
        previous: function(pointer to const struct delta_index {pointer to const void src_buf, unsigned long src_size, unsigned int hash_mask, array[-1] of pointer to struct index_entry {..} hash}, pointer to const void, unsigned long, pointer to unsigned long, unsigned long) returning pointer to void : "delta.h", line 37
cc: acomp failed for diff-delta.c
gmake[1]: *** [diff-delta.o] Error 2

As you can see Forte 11 is complaining that the protype is different to
the function. But it is not they absolut identical. And here is the
workaround which should _not_ be commited because it is just wrong. It
removes the const flags from the function arguments which results in lot
of warnings but does compile git with Forte 11.

--- a/diff-delta.c
+++ b/diff-delta.c
@@ -242,8 +242,8 @@
 #define MAX_OP_SIZE	(5 + 5 + 1 + RABIN_WINDOW + 7)
 
 void *
-create_delta(const struct delta_index *index,
-	     const void *trg_buf, unsigned long trg_size,
+create_delta(struct delta_index *index,
+	     void *trg_buf, unsigned long trg_size,
 	     unsigned long *delta_size, unsigned long max_size)
 {
 	unsigned int i, outpos, outsize, val;
--- a/delta.h
+++ b/delta.h
@@ -34,8 +34,8 @@
  * must be freed by the caller.
  */
 extern void *
-create_delta(const struct delta_index *index,
-	     const void *buf, unsigned long bufsize,
+create_delta(struct delta_index *index,
+	     void *buf, unsigned long bufsize,
 	     unsigned long *delta_size, unsigned long max_delta_size);
 
 /*

----8<---- cut here ----8<---- cut here ----8<---- cut here ----8<----

	Thomas

>From 14a4e0245c32c73a8a2dbd1763a23b8b69f8844d Mon Sep 17 00:00:00 2001
From: Thomas Glanzmann <sithglan@stud.uni-erlangen.de>
Date: Sun, 22 Jul 2007 12:14:14 +0200
Subject: [PATCH] Don't set NEEDS_LIBICONV for Solaris 8

I use a fully patched Solaris 8 with SUNs Forte 11 Compiler which is also fully
patched. If NEEDS_LIBICONV is set to YesPlease the compile fails for me with:

    AR xdiff/lib.a
    LINK git-convert-objects
ld: fatal: library -liconv: not found
ld: fatal: File processing errors. No output written to git-convert-objects
gmake[1]: *** [git-convert-objects] Error 1

Without the NEEDS_LIBICONV set it simply builds.
---
 Makefile |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 73b487f..1c294ca 100644
--- a/Makefile
+++ b/Makefile
@@ -401,7 +401,6 @@ ifeq ($(uname_S),SunOS)
 	NO_STRCASESTR = YesPlease
 	NO_HSTRERROR = YesPlease
 	ifeq ($(uname_R),5.8)
-		NEEDS_LIBICONV = YesPlease
 		NO_UNSETENV = YesPlease
 		NO_SETENV = YesPlease
 		NO_C99_FORMAT = YesPlease
-- 
1.5.2.3

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

* Re: If NEEDS_LIBICONV is set for Solaris 8, it does not build git for me
  2007-07-22 10:40 If NEEDS_LIBICONV is set for Solaris 8, it does not build git for me Thomas Glanzmann
@ 2007-07-22 22:59 ` Junio C Hamano
  2007-07-23 18:35   ` Jason Riedy
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2007-07-22 22:59 UTC (permalink / raw
  To: Thomas Glanzmann; +Cc: GIT, Jason Riedy, Paul Jakma

Thomas Glanzmann <thomas@glanzmann.de> writes:

>      [ Paul and Jason CCed because they touched that section last ]
>
> Patch is appended at the very bottom of the E-Mail. I have a fully
> patched Solaris 8 with Forte 11. In order to get git compile I had to
> delete the
>
> 	NEEDS_LIBICONV = YesPlease
>
> line from the Makefile in the Solaris 8 section.

In a distant past when I built git on an otherwise unused Sol8
at work I recall I needed that.  I do not think that machine
used Forte compiler, though.

Regarding 5.8 vs 5.9 (dis)similarity, I suspect that other three
are there in the version specific section only because people
who needed them had access to only that version, and everybody
played safe.  I would be for example very surprised if NO_SETENV
were unneeded on Solaris 5.7, given that both 5.8 and 5.9 need
it (if it is unneeded on 5.7 that would mean Sun dropped setenv
when they went to 5.8).

We currently handle only three cases for Solaris in the
Makefile, meaning that we consider that Solaris world is
fragmented in three factions: just "SunOS", 5.8 or 5.9.

I suspect that a blanket statement "Solaris 8 needs (or does not
need) NEEDS_LIBICONV" would not hold true.  It probably depends
on many other things (perhaps OS patchlevel, extra packages, C
compiler suite).  The best course of action is for interested
Solaris users to get together, list combinations of possible
variations that are available to them and they care about, and
see which make variable is needed where, and refine the current
"three-faction fragmentation", which apparently does not reflect
reality.

Unfortunately I am not in a position to best judge how Solaris
world is fragmented.

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

* Re: If NEEDS_LIBICONV is set for Solaris 8, it does not build git for me
  2007-07-22 22:59 ` Junio C Hamano
@ 2007-07-23 18:35   ` Jason Riedy
  2007-07-23 18:51     ` Thomas Glanzmann
  0 siblings, 1 reply; 4+ messages in thread
From: Jason Riedy @ 2007-07-23 18:35 UTC (permalink / raw
  To: Junio C Hamano; +Cc: Thomas Glanzmann, GIT, Paul Jakma

And Junio C. Hamano writes:
>
> In a distant past when I built git on an otherwise unused Sol8
> at work I recall I needed that.  I do not think that machine
> used Forte compiler, though.

I didn't even know you could patch 5.8 enough to use that
compiler version.  I can't imagine what strange combinations of
C89 and C99 features are available.

Luckily for me, I no longer have easy access to Solaris <9.

At some point, the crazy patch combinations need relegated to
each particular site's config.mak.  Solaris 8 has entered the
first "retirement phase", but new orders can include it for about
another month:
  http://www.sun.com/software/solaris/support/sol8.xml

Jason

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

* Re: If NEEDS_LIBICONV is set for Solaris 8, it does not build git for me
  2007-07-23 18:35   ` Jason Riedy
@ 2007-07-23 18:51     ` Thomas Glanzmann
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Glanzmann @ 2007-07-23 18:51 UTC (permalink / raw
  To: Jason Riedy; +Cc: Junio C Hamano, GIT, Paul Jakma

Hello,

> I didn't even know you could patch 5.8 enough to use that compiler
> version.  I can't imagine what strange combinations of C89 and C99
> features are available.

I even think that Forte 11 was one of the first who supported C99 in the
first place.  However my intention is the following: I build git on
Solaris 5.8 because it works on any system that is 5.8 or higher (5.9,
5.10 and the upcomming 5.11). Good in theory. But not in practice since
they bumped the perl version (I did not thought of that before). With
high probability I could work around that. But at the moment I don't
care that much because I have a build host for every major release of
Solaris and I don't use the perl part of git not that much. However
having git on Solaris is a real pleasure. Together with sudo and vim.

        Thomas

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

end of thread, other threads:[~2007-07-23 18:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-22 10:40 If NEEDS_LIBICONV is set for Solaris 8, it does not build git for me Thomas Glanzmann
2007-07-22 22:59 ` Junio C Hamano
2007-07-23 18:35   ` Jason Riedy
2007-07-23 18:51     ` Thomas Glanzmann

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).