{"thread":{"id":"9137","subject":"If NEEDS_LIBICONV is set for Solaris 8, it does not build git for me","startedAt":"2007-07-22T10:40:45Z","lastAt":"2007-07-23T18:51:11Z","messageCount":4,"participants":["Thomas Glanzmann","Junio C Hamano","Jason Riedy"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"48118","messageId":"20070722104045.GF4760@cip.informatik.uni-erlangen.de","threadId":"9137","inReplyTo":null,"subject":"If NEEDS_LIBICONV is set for Solaris 8, it does not build git for me","fromName":"Thomas Glanzmann","fromEmail":"thomas@glanzmann.de","sentAt":"2007-07-22T10:40:45Z","receivedAt":"2007-07-22T10:40:45Z","isPatch":false,"sender":{"key":"thomas@glanzmann.de","avatar":null},"body":"Hello Junio,\n\n     [ Paul and Jason CCed because they touched that section last ]\n\nPatch is appended at the very bottom of the E-Mail. I have a fully\npatched Solaris 8 with Forte 11. In order to get git compile I had to\ndelete the\n\n\tNEEDS_LIBICONV = YesPlease\n\nline from the Makefile in the Solaris 8 section. After my patch the\nsection in the Makefile looks like that:\n\n        ifeq ($(uname_R),5.8)\n                NO_UNSETENV = YesPlease\n                NO_SETENV = YesPlease\n                NO_C99_FORMAT = YesPlease\n                NO_STRTOUMAX = YesPlease\n        endif\n        ifeq ($(uname_R),5.9)\n                NO_UNSETENV = YesPlease\n                NO_SETENV = YesPlease\n                NO_C99_FORMAT = YesPlease\n                NO_STRTOUMAX = YesPlease\n        endif\n\nAs you can see _after_ my patch the secion for 5.8 and 5.9 is the same.\nSo I wonder if it is possible to merge this two sections. But I have no\nidea how to do that in the makefile language. I tried to remove other\nflags for 5.8, too but it always resulted in built break so all other\nflags are necessary.\n\n----8<---- cut here ----8<---- cut here ----8<---- cut here ----8<----\n\nThe following issue as _absolutly_ nothing todo with the above and is\nhere only for completeness. In order to get git to compile with Forte 11\nyou have to work around a compiler bug in Forte 11. Forte 11 chokes\nsometimes when function arguments are declared as static (I raised this\ntopic before even on this list). I guess that I will also file a bug\nagainst forte 11 tomorrow. The symptom is:\n\n    CC diff-delta.o\n\"diff-delta.c\", line 248: identifier redeclared: create_delta\n        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\n        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\ncc: acomp failed for diff-delta.c\ngmake[1]: *** [diff-delta.o] Error 2\n\nAs you can see Forte 11 is complaining that the protype is different to\nthe function. But it is not they absolut identical. And here is the\nworkaround which should _not_ be commited because it is just wrong. It\nremoves the const flags from the function arguments which results in lot\nof warnings but does compile git with Forte 11.\n\n--- a/diff-delta.c\n+++ b/diff-delta.c\n@@ -242,8 +242,8 @@\n #define MAX_OP_SIZE\t(5 + 5 + 1 + RABIN_WINDOW + 7)\n \n void *\n-create_delta(const struct delta_index *index,\n-\t     const void *trg_buf, unsigned long trg_size,\n+create_delta(struct delta_index *index,\n+\t     void *trg_buf, unsigned long trg_size,\n \t     unsigned long *delta_size, unsigned long max_size)\n {\n \tunsigned int i, outpos, outsize, val;\n--- a/delta.h\n+++ b/delta.h\n@@ -34,8 +34,8 @@\n  * must be freed by the caller.\n  */\n extern void *\n-create_delta(const struct delta_index *index,\n-\t     const void *buf, unsigned long bufsize,\n+create_delta(struct delta_index *index,\n+\t     void *buf, unsigned long bufsize,\n \t     unsigned long *delta_size, unsigned long max_delta_size);\n \n /*\n\n----8<---- cut here ----8<---- cut here ----8<---- cut here ----8<----\n\n\tThomas\n\n>From 14a4e0245c32c73a8a2dbd1763a23b8b69f8844d Mon Sep 17 00:00:00 2001\nFrom: Thomas Glanzmann <sithglan@stud.uni-erlangen.de>\nDate: Sun, 22 Jul 2007 12:14:14 +0200\nSubject: [PATCH] Don't set NEEDS_LIBICONV for Solaris 8\n\nI use a fully patched Solaris 8 with SUNs Forte 11 Compiler which is also fully\npatched. If NEEDS_LIBICONV is set to YesPlease the compile fails for me with:\n\n    AR xdiff/lib.a\n    LINK git-convert-objects\nld: fatal: library -liconv: not found\nld: fatal: File processing errors. No output written to git-convert-objects\ngmake[1]: *** [git-convert-objects] Error 1\n\nWithout the NEEDS_LIBICONV set it simply builds.\n---\n Makefile |    1 -\n 1 files changed, 0 insertions(+), 1 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 73b487f..1c294ca 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -401,7 +401,6 @@ ifeq ($(uname_S),SunOS)\n \tNO_STRCASESTR = YesPlease\n \tNO_HSTRERROR = YesPlease\n \tifeq ($(uname_R),5.8)\n-\t\tNEEDS_LIBICONV = YesPlease\n \t\tNO_UNSETENV = YesPlease\n \t\tNO_SETENV = YesPlease\n \t\tNO_C99_FORMAT = YesPlease\n-- \n1.5.2.3\n"},{"id":"48233","messageId":"7v8x98qc3k.fsf@assigned-by-dhcp.cox.net","threadId":"9137","inReplyTo":"20070722104045.GF4760@cip.informatik.uni-erlangen.de","subject":"Re: If NEEDS_LIBICONV is set for Solaris 8, it does not build git for me","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-07-22T22:59:11Z","receivedAt":"2007-07-22T22:59:11Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thomas Glanzmann <thomas@glanzmann.de> writes:\n\n>      [ Paul and Jason CCed because they touched that section last ]\n>\n> Patch is appended at the very bottom of the E-Mail. I have a fully\n> patched Solaris 8 with Forte 11. In order to get git compile I had to\n> delete the\n>\n> \tNEEDS_LIBICONV = YesPlease\n>\n> line from the Makefile in the Solaris 8 section.\n\nIn a distant past when I built git on an otherwise unused Sol8\nat work I recall I needed that.  I do not think that machine\nused Forte compiler, though.\n\nRegarding 5.8 vs 5.9 (dis)similarity, I suspect that other three\nare there in the version specific section only because people\nwho needed them had access to only that version, and everybody\nplayed safe.  I would be for example very surprised if NO_SETENV\nwere unneeded on Solaris 5.7, given that both 5.8 and 5.9 need\nit (if it is unneeded on 5.7 that would mean Sun dropped setenv\nwhen they went to 5.8).\n\nWe currently handle only three cases for Solaris in the\nMakefile, meaning that we consider that Solaris world is\nfragmented in three factions: just \"SunOS\", 5.8 or 5.9.\n\nI suspect that a blanket statement \"Solaris 8 needs (or does not\nneed) NEEDS_LIBICONV\" would not hold true.  It probably depends\non many other things (perhaps OS patchlevel, extra packages, C\ncompiler suite).  The best course of action is for interested\nSolaris users to get together, list combinations of possible\nvariations that are available to them and they care about, and\nsee which make variable is needed where, and refine the current\n\"three-faction fragmentation\", which apparently does not reflect\nreality.\n\nUnfortunately I am not in a position to best judge how Solaris\nworld is fragmented.\n"},{"id":"48331","messageId":"878x97eznf.fsf@sparse.dyndns.org","threadId":"9137","inReplyTo":"7v8x98qc3k.fsf@assigned-by-dhcp.cox.net","subject":"Re: If NEEDS_LIBICONV is set for Solaris 8, it does not build git for me","fromName":"Jason Riedy","fromEmail":"ejr@cs.berkeley.edu","sentAt":"2007-07-23T18:35:48Z","receivedAt":"2007-07-23T18:35:48Z","isPatch":false,"sender":{"key":"ejr@eecs.berkeley.edu","avatar":"https://gravatar.com/avatar/547fa56f887cab01599edab4e9f813c949c1269e02714f20e0496c56185d9837?d=mp&s=160"},"body":"And Junio C. Hamano writes:\n>\n> In a distant past when I built git on an otherwise unused Sol8\n> at work I recall I needed that.  I do not think that machine\n> used Forte compiler, though.\n\nI didn't even know you could patch 5.8 enough to use that\ncompiler version.  I can't imagine what strange combinations of\nC89 and C99 features are available.\n\nLuckily for me, I no longer have easy access to Solaris <9.\n\nAt some point, the crazy patch combinations need relegated to\neach particular site's config.mak.  Solaris 8 has entered the\nfirst \"retirement phase\", but new orders can include it for about\nanother month:\n  http://www.sun.com/software/solaris/support/sol8.xml\n\nJason\n"},{"id":"48332","messageId":"20070723185111.GA16085@cip.informatik.uni-erlangen.de","threadId":"9137","inReplyTo":"878x97eznf.fsf@sparse.dyndns.org","subject":"Re: If NEEDS_LIBICONV is set for Solaris 8, it does not build git for me","fromName":"Thomas Glanzmann","fromEmail":"thomas@glanzmann.de","sentAt":"2007-07-23T18:51:11Z","receivedAt":"2007-07-23T18:51:11Z","isPatch":false,"sender":{"key":"thomas@glanzmann.de","avatar":null},"body":"Hello,\n\n> I didn't even know you could patch 5.8 enough to use that compiler\n> version.  I can't imagine what strange combinations of C89 and C99\n> features are available.\n\nI even think that Forte 11 was one of the first who supported C99 in the\nfirst place.  However my intention is the following: I build git on\nSolaris 5.8 because it works on any system that is 5.8 or higher (5.9,\n5.10 and the upcomming 5.11). Good in theory. But not in practice since\nthey bumped the perl version (I did not thought of that before). With\nhigh probability I could work around that. But at the moment I don't\ncare that much because I have a build host for every major release of\nSolaris and I don't use the perl part of git not that much. However\nhaving git on Solaris is a real pleasure. Together with sudo and vim.\n\n        Thomas\n"}]}