threads / patch / 11149

patchCompile fix for SCO OpenServer

Subject: [PATCH] Compile fix for SCO OpenServer

## tl;dr

14 messages between Dec 5, 2007 and Jul 31, 2008. Diffs are folded; open one to read it.

replies: 13people: 3as markdown or json

Aidan Van Dyk· Dec 5, 2007, 17:21 UTC · lore

SCO OpenServer hides the definitions of (at least) u_short and friends if _XOPEN_SOURCE is defined.

Signed-off-by: Aidan Van Dyk <aidan@highrise.ca>
---
Show changes to git-compat-util.h +1 −1
diff --git a/git-compat-util.h b/git-compat-util.h
index ca0a597..be8cbe8 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -24,7 +24,7 @@
 /* Approximation of the length of the decimal representation of this type. */
 #define decimal_length(x)      ((int)(sizeof(x) * 2.56 + 0.5) + 1)

-#if !defined(__APPLE__) && !defined(__FreeBSD__)
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined (__OPENSERVER__)
 #define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
 #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
 #endif
Aidan Van Dyk· Jul 30, 2008, 18:49 UTC · re: Aidan Van Dyk · lore

Compile fix for SCO OPenServer

SCO OpenServer also hides the definitions of (at least) u_short and friends if _XOPEN_SOURCE is defined. --- Same patch as last time, updated for current master.

 git-compat-util.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to git-compat-util.h +1 −2
diff --git a/git-compat-util.h b/git-compat-util.h
index cf89cdf..42e3e0b 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -39,7 +39,7 @@
 /* Approximation of the length of the decimal representation of this type. */
 #define decimal_length(x)      ((int)(sizeof(x) * 2.56 + 0.5) + 1)

-#if !defined(__APPLE__) && !defined(__FreeBSD__)  && !defined(__USLC__) && !defined(_M_UNIX)
+#if !defined(__APPLE__) && !defined(__FreeBSD__)  && !defined(__USLC__) && !defined(_M_UNIX) && !defined(__OPENSERVER__)
 #define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
 #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
 #endif
--
1.6.0.rc1.dirty
Junio C Hamano· Jul 30, 2008, 20:01 UTC · re: Aidan Van Dyk · lore

Re: Compile fix for SCO OPenServer

Aidan Van Dyk <aidan@highrise.ca> writes:
> SCO OpenServer also hides the definitions of (at least) u_short and
> friends if _XOPEN_SOURCE is defined.
I thought that was covered by 457bb45 (Port to 12 other Platforms., 2008-06-08).
> ---
> Same patch as last time, updated for current master.
Sign-off?
Boyd, does this make any of the earlier symbols you added redundant?
Show 19 quoted lines
>
>  git-compat-util.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/git-compat-util.h b/git-compat-util.h
> index cf89cdf..42e3e0b 100644
> --- a/git-compat-util.h
> +++ b/git-compat-util.h
> @@ -39,7 +39,7 @@
>  /* Approximation of the length of the decimal representation of this type. */
>  #define decimal_length(x)      ((int)(sizeof(x) * 2.56 + 0.5) + 1)
>
> -#if !defined(__APPLE__) && !defined(__FreeBSD__)  && !defined(__USLC__) && !defined(_M_UNIX)
> +#if !defined(__APPLE__) && !defined(__FreeBSD__)  && !defined(__USLC__) && !defined(_M_UNIX) && !defined(__OPENSERVER__)
>  #define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
>  #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
>  #endif
> --
> 1.6.0.rc1.dirty
Boyd Lynn Gerber· Jul 30, 2008, 20:09 UTC · re: Junio C Hamano · lore

Re: Compile fix for SCO OPenServer

On Wed, 30 Jul 2008, Junio C Hamano wrote:
Show 5 quoted lines
> Aidan Van Dyk <aidan@highrise.ca> writes:
> > SCO OpenServer also hides the definitions of (at least) u_short and
> > friends if _XOPEN_SOURCE is defined.
> 
> I thought that was covered by 457bb45 (Port to 12 other Platforms., 2008-06-08).
I thought it was covered as well.
> Sign-off?
> 
> Boyd, does this make any of the earlier symbols you added redundant?

I have just tried this on 4 OpenServer 6.0 machines fresh installed and I do not need this added. I am trying to figure out what is different on his. It appears he is using the exact same version of the compiler as well.

My uname -a gives me this...
SCO_SV tech0 5 6.0.0 i386

and the gcc -V gives me the exact same compiler. So I do not know why he has to have the additional __OPENSERVER__. This does break my OpenServer 5.0.7 fresh install as well. So I would not use it. What I do not understand is why the !defined(__USLC__) does not catch it. It should.

Show 23 quoted lines
> >  git-compat-util.h |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/git-compat-util.h b/git-compat-util.h
> > index cf89cdf..42e3e0b 100644
> > --- a/git-compat-util.h
> > +++ b/git-compat-util.h
> > @@ -39,7 +39,7 @@
> >  /* Approximation of the length of the decimal representation of this type. */
> >  #define decimal_length(x)      ((int)(sizeof(x) * 2.56 + 0.5) + 1)
> >
> > -#if !defined(__APPLE__) && !defined(__FreeBSD__)  && !defined(__USLC__) && !defined(_M_UNIX)
> > +#if !defined(__APPLE__) && !defined(__FreeBSD__)  && !defined(__USLC__) && !defined(_M_UNIX) && !defined(__OPENSERVER__)
> >  #define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
> >  #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
> >  #endif
> > --
> > 1.6.0.rc1.dirty
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

-- Boyd Gerber <gerberb@zenez.com> ZENEZ 1042 East Fort Union #135, Midvale Utah 84047

Junio C Hamano· Jul 30, 2008, 20:18 UTC · re: Boyd Lynn Gerber · lore

Re: Compile fix for SCO OPenServer

Boyd Lynn Gerber <gerberb@zenez.com> writes:
Show 26 quoted lines
> On Wed, 30 Jul 2008, Junio C Hamano wrote:
>> Aidan Van Dyk <aidan@highrise.ca> writes:
>> > SCO OpenServer also hides the definitions of (at least) u_short and
>> > friends if _XOPEN_SOURCE is defined.
>> 
>> I thought that was covered by 457bb45 (Port to 12 other Platforms., 2008-06-08).
>
> I thought it was covered as well.
>
>> Sign-off?
>> 
>> Boyd, does this make any of the earlier symbols you added redundant?
>
> I have just tried this on 4 OpenServer 6.0 machines fresh installed and I 
> do not need this added.  I am trying to figure out what is different on 
> his.  It appears he is using the exact same version of the compiler as 
> well.
>
> My uname -a gives me this...
>
> SCO_SV tech0 5 6.0.0 i386
>
> and the gcc -V gives me the exact same compiler.  So I do not know why he 
> has to have the additional __OPENSERVER__.  This does break my OpenServer 
> 5.0.7 fresh install as well.  So I would not use it.  What I do not 
> understand is why the !defined(__USLC__) does not catch it.  It should.
Thanks for a prompt response.

Could you work with Aidan to come up with the optimal solution that does not break anybody? I won't queue this patch until the issue is sorted out.

Aidan Van Dyk· Jul 30, 2008, 20:43 UTC · re: Boyd Lynn Gerber · lore

Re: Compile fix for SCO OPenServer

* Boyd Lynn Gerber <gerberb@zenez.com> [080730 16:09]:
Show 13 quoted lines
> I have just tried this on 4 OpenServer 6.0 machines fresh installed and I 
> do not need this added.  I am trying to figure out what is different on 
> his.  It appears he is using the exact same version of the compiler as 
> well.
> 
> My uname -a gives me this...
> 
> SCO_SV tech0 5 6.0.0 i386
> 
> and the gcc -V gives me the exact same compiler.  So I do not know why he 
> has to have the additional __OPENSERVER__.  This does break my OpenServer 
> 5.0.7 fresh install as well.  So I would not use it.  What I do not 
> understand is why the !defined(__USLC__) does not catch it.  It should.
Sorry, a bit premature on my end...
I tried a "default" gmake, and hit an error right away:
	UX:cc: ERROR: Invalid subargument: -Wall
And immediately pulled my changes from last january into the fix it.  My
changes included a local config.mak CFLAGS override which was the real
fix.

To build with no source changes, I need: NO_MKDTEMP=1 SNPRINTF_RETURNS_BOGUS=1 CFLAGS=-g NO_POSIX_ONLY_PROGRAMS=1

How about something like this:
	diff --git a/Makefile b/Makefile
	index 798a2f2..c42040f 100644
	--- a/Makefile
	+++ b/Makefile
	@@ -602,6 +602,7 @@ ifeq ($(uname_S),SCO_SV)
		endif
		ifeq ($(uname_R),5)
			CC = cc
	+               CFLAGS = -g
			BASIC_CFLAGS += -Kthread
		endif
		NEEDS_SOCKET = YesPlease
	@@ -615,6 +616,8 @@ ifeq ($(uname_S),SCO_SV)
		BASIC_LDFLAGS += -L/usr/local/lib
		NO_STRCASESTR = YesPlease
		NO_MEMMEM = YesPlease
	+       NO_MKDTEMP = YesPlease
	+       SNPRINTF_RETURNS_BOGUS = YesPlease
		INSTALL = ginstall
		TAR = gtar
	 endif

Unfortunately, I have access to only that one SCO box, so I have no idea of mkdtemp and sprintf problems are on all SCO, or just R=5 ones.

That allows me to build with NO_POSIX_ONLY_PROGRAMS=1, because for some reason, the
linker complains on linking git-shell:
	Undefined                       first referenced
	symbol                              in file
	hexval_table                        abspath.o
	null_sha1                           abspath.o
	trust_executable_bit                abspath.o
	has_symlinks                        abspath.o
	UX:ld: ERROR: Symbol referencing errors. No output written to git-shell

These are all extern varualbes declared in cache.h, but no defined in any of the objects git-shell links, normally not a problem, but this is SCO.

-- 
Aidan Van Dyk                                             Create like a god,
aidan@highrise.ca                                       command like a king,
http://www.highrise.ca/                                   work like a slave.
Boyd Lynn Gerber· Jul 30, 2008, 21:28 UTC · re: Aidan Van Dyk · lore

Re: Compile fix for SCO OPenServer

On Wed, 30 Jul 2008, Aidan Van Dyk wrote:
Show 25 quoted lines
> * Boyd Lynn Gerber <gerberb@zenez.com> [080730 16:09]:
> > I have just tried this on 4 OpenServer 6.0 machines fresh installed and I 
> > do not need this added.  I am trying to figure out what is different on 
> > his.  It appears he is using the exact same version of the compiler as 
> > well.
> > 
> > My uname -a gives me this...
> > 
> > SCO_SV tech0 5 6.0.0 i386
> > 
> > and the gcc -V gives me the exact same compiler.  So I do not know why he 
> > has to have the additional __OPENSERVER__.  This does break my OpenServer 
> > 5.0.7 fresh install as well.  So I would not use it.  What I do not 
> > understand is why the !defined(__USLC__) does not catch it.  It should.
> 
> Sorry, a bit premature on my end...
> 
> I tried a "default" gmake, and hit an error right away:
> 	UX:cc: ERROR: Invalid subargument: -Wall
> And immediately pulled my changes from last january into the fix it.  My
> changes included a local config.mak CFLAGS override which was the real
> fix.
> 
> To build with no source changes, I need:
> NO_MKDTEMP=1 SNPRINTF_RETURNS_BOGUS=1 CFLAGS=-g NO_POSIX_ONLY_PROGRAMS=1
How about doing a fresh 
working directory.  And just for the fun of it try...
This

tech0 > CC=cc CXX=CC CFLAGS="-Kalloca -Kthread" CPPFLAGS="-Kalloca -Kthread" ./configure tech0 > gmake

and

tech0 > CC=cc CXX=CC ./configure tech0 > gmake

worked without any issues for me.
 
Show 22 quoted lines
> How about something like this:
> 	diff --git a/Makefile b/Makefile
> 	index 798a2f2..c42040f 100644
> 	--- a/Makefile
> 	+++ b/Makefile
> 	@@ -602,6 +602,7 @@ ifeq ($(uname_S),SCO_SV)
> 		endif
> 		ifeq ($(uname_R),5)
> 			CC = cc
> 	+               CFLAGS = -g
> 			BASIC_CFLAGS += -Kthread
> 		endif
> 		NEEDS_SOCKET = YesPlease
> 	@@ -615,6 +616,8 @@ ifeq ($(uname_S),SCO_SV)
> 		BASIC_LDFLAGS += -L/usr/local/lib
> 		NO_STRCASESTR = YesPlease
> 		NO_MEMMEM = YesPlease
> 	+       NO_MKDTEMP = YesPlease
> 	+       SNPRINTF_RETURNS_BOGUS = YesPlease
> 		INSTALL = ginstall
> 		TAR = gtar
> 	 endif
The above does work on OpenServer 6, UnixWare 7.1.4 and OpenServer 5.0.7
 
Show 15 quoted lines
> Unfortunately, I have access to only that one SCO box, so I have no idea
> of mkdtemp and sprintf problems are on all SCO, or just R=5 ones.
> 
> That allows me to build with NO_POSIX_ONLY_PROGRAMS=1, because for some reason, the
> linker complains on linking git-shell:
> 	Undefined                       first referenced
> 	symbol                              in file
> 	hexval_table                        abspath.o
> 	null_sha1                           abspath.o
> 	trust_executable_bit                abspath.o
> 	has_symlinks                        abspath.o
> 	UX:ld: ERROR: Symbol referencing errors. No output written to git-shell
> 
> These are all extern varualbes declared in cache.h, but no defined in
> any of the objects git-shell links, normally not a problem, but this is SCO.
I do not see the problem on my systems.

-- Boyd Gerber <gerberb@zenez.com> ZENEZ 1042 East Fort Union #135, Midvale Utah 84047

Aidan Van Dyk· Jul 30, 2008, 22:56 UTC · re: Boyd Lynn Gerber · lore

Re: Compile fix for SCO OPenServer

* Boyd Lynn Gerber <gerberb@zenez.com> [080730 17:28]:
 
> How about doing a fresh 
> 
> working directory.  And just for the fun of it try...

Unfortunately, I can't use configure, apparently that SCO box does'nt have a new enough toolc change for M4/autoconf/etc...

But I've never had to use configure before, I've always just built with make (gmake on boxes with borked make)

> tech0 > CC=cc CXX=CC CFLAGS="-Kalloca -Kthread" CPPFLAGS="-Kalloca 
> -Kthread" ./configure
> tech0 > gmake
So, with gmake, that "generally" works.  I still need to add:
	SNPRINTF_RETURNS_BOGUS=1 NO_MKDTEMP=1
> tech0 > CC=cc CXX=CC ./configure 
> tech0 > gmake
And here, until I rid CFLAGS of -Wall, it fails.
  
Show 17 quoted lines
> > Unfortunately, I have access to only that one SCO box, so I have no idea
> > of mkdtemp and sprintf problems are on all SCO, or just R=5 ones.
> > 
> > That allows me to build with NO_POSIX_ONLY_PROGRAMS=1, because for some reason, the
> > linker complains on linking git-shell:
> > 	Undefined                       first referenced
> > 	symbol                              in file
> > 	hexval_table                        abspath.o
> > 	null_sha1                           abspath.o
> > 	trust_executable_bit                abspath.o
> > 	has_symlinks                        abspath.o
> > 	UX:ld: ERROR: Symbol referencing errors. No output written to git-shell
> > 
> > These are all extern varualbes declared in cache.h, but no defined in
> > any of the objects git-shell links, normally not a problem, but this is SCO.
> 
> I do not see the problem on my systems.
	aidan@jpradley:~/git$ touch abspath.c
	aidan@jpradley:~/git$ gmake V=1 git-shell
	cc -o abspath.o -c -Kalloca  -Kthread -I/usr/local/include -DNO_IPV6 -DSHA1_HEADER='<openssl/sha.h>' -DSNPRINTF_RETURNS_BOGUS -DNO_STRCASESTR -DNO_MKDTEMP -DNO_HSTRERROR -DNO_MEMMEM abspath.c
	cc -g -Kalloca  -Kthread -I/usr/local/include -DNO_IPV6 -DSHA1_HEADER='<openssl/sha.h>' -DSNPRINTF_RETURNS_BOGUS -DNO_STRCASESTR -DNO_MKDTEMP -DNO_HSTRERROR -DNO_MEMMEM -o git-shell   -L/usr/local/lib abspath.o ctype.o exec_cmd.o quote.o strbuf.o usage.o wrapper.o shell.o compat/lib.a
	Undefined                       first referenced
	symbol                              in file
	hexval_table                        abspath.o
	null_sha1                           abspath.o
	trust_executable_bit                abspath.o
	has_symlinks                        abspath.o
	UX:ld: ERROR: Symbol referencing errors. No output written to git-shell
	gmake: *** [git-shell] Error 1
	aidan@jpradley:~/git$ cat config.mak
	NO_OENSSL=1
	NO_MKDTEMP=1
	SHELL=/bin/bash
	SNPRINTF_RETURNS_BOGUS=1
	CFLAGS=-Kalloca
	CPPFLAGS=-Kalloca
I've found that if I set CFLAGS to -O2, it links properly:
	aidan@jpradley:~/git$ touch abspath.c
	aidan@jpradley:~/git$ gmake V=1 git-shell
	cc -o abspath.o -c -Kalloca -O2  -Kthread -I/usr/local/include -DNO_IPV6 -DSHA1_HEADER='<openssl/sha.h>' -DSNPRINTF_RETURNS_BOGUS -DNO_STRCASESTR -DNO_MKDTEMP -DNO_HSTRERROR -DNO_MEMMEM abspath.c
	cc -Kalloca -O2  -Kthread -I/usr/local/include -DNO_IPV6 -DSHA1_HEADER='<openssl/sha.h>' -DSNPRINTF_RETURNS_BOGUS -DNO_STRCASESTR -DNO_MKDTEMP -DNO_HSTRERROR -DNO_MEMMEM -o git-shell   -L/usr/local/lib abspath.o ctype.o exec_cmd.o quote.o strbuf.o usage.o wrapper.o shell.o compat/lib.a
So I think it's "not inlining" stuff like:
	static inline unsigned int hexval(unsigned char c)
	{
		return hexval_table[c];
	}
 
So, finally, it pretty much works on SCO out of the box - here's my
settings, which which the test suite passed (well, is passing, I'm at
t5400, but I expect it to all pass again with these settings):
	aidan@jpradley:~/git$ cat config.mak
	NO_TCLTK=1
	NO_MKDTEMP=1
	SHELL=/bin/bash
	SNPRINTF_RETURNS_BOGUS=1
	CFLAGS=-O2
-- 
Aidan Van Dyk                                             Create like a god,
aidan@highrise.ca                                       command like a king,
http://www.highrise.ca/                                   work like a slave.
Boyd Lynn Gerber· Jul 30, 2008, 23:30 UTC · re: Aidan Van Dyk · lore

Re: Compile fix for SCO OPenServer

On Wed, 30 Jul 2008, Aidan Van Dyk wrote:
Show 10 quoted lines
> * Boyd Lynn Gerber <gerberb@zenez.com> [080730 17:28]:
> > How about doing a fresh 
> > 
> > working directory.  And just for the fun of it try...
> 
> Unfortunately, I can't use configure, apparently that SCO box does'nt
> have a new enough toolc change for M4/autoconf/etc...
> 
> But I've never had to use configure before, I've always just built with
> make (gmake on boxes with borked make)

I did have to install m4 and have /usr/local/bin before /usr/bin and /bin so it uses the gnu m4.

I have m4-1.4.3 at 
ftp://ftp.zenez.com/pub/zenez/prgms/m4-1.4.3-osr6-all.tar.gz

I really have to be able to use configure for most of my OpenSource Projects for SCO OS's.

I made the changes so that most things work with the auto tools.  
 
Show 11 quoted lines
> > tech0 > CC=cc CXX=CC CFLAGS="-Kalloca -Kthread" CPPFLAGS="-Kalloca 
> > -Kthread" ./configure
> > tech0 > gmake
> 
> So, with gmake, that "generally" works.  I still need to add:
> 	SNPRINTF_RETURNS_BOGUS=1 NO_MKDTEMP=1
> 
> > tech0 > CC=cc CXX=CC ./configure 
> > tech0 > gmake
> 
> And here, until I rid CFLAGS of -Wall, it fails.
I did a VM install of OpenServer 6 to try things out.  I was able to get 
your -Wall failure, but once I ran the CC=cc CXX=CC ./configure I was able 
to run gmake without any errors. I did have to install the M4 from above 
to get configure to work.  So, the straight out of the box install has to 
have gnu m4 to run configure. 
   
Show 60 quoted lines
> > > Unfortunately, I have access to only that one SCO box, so I have no idea
> > > of mkdtemp and sprintf problems are on all SCO, or just R=5 ones.
> > > 
> > > That allows me to build with NO_POSIX_ONLY_PROGRAMS=1, because for some reason, the
> > > linker complains on linking git-shell:
> > > 	Undefined                       first referenced
> > > 	symbol                              in file
> > > 	hexval_table                        abspath.o
> > > 	null_sha1                           abspath.o
> > > 	trust_executable_bit                abspath.o
> > > 	has_symlinks                        abspath.o
> > > 	UX:ld: ERROR: Symbol referencing errors. No output written to git-shell
> > > 
> > > These are all extern varualbes declared in cache.h, but no defined in
> > > any of the objects git-shell links, normally not a problem, but this is SCO.
> > 
> > I do not see the problem on my systems.
> 
> 	aidan@jpradley:~/git$ touch abspath.c
> 	aidan@jpradley:~/git$ gmake V=1 git-shell
> 	cc -o abspath.o -c -Kalloca  -Kthread -I/usr/local/include -DNO_IPV6 -DSHA1_HEADER='<openssl/sha.h>' -DSNPRINTF_RETURNS_BOGUS -DNO_STRCASESTR -DNO_MKDTEMP -DNO_HSTRERROR -DNO_MEMMEM abspath.c
> 	cc -g -Kalloca  -Kthread -I/usr/local/include -DNO_IPV6 -DSHA1_HEADER='<openssl/sha.h>' -DSNPRINTF_RETURNS_BOGUS -DNO_STRCASESTR -DNO_MKDTEMP -DNO_HSTRERROR -DNO_MEMMEM -o git-shell   -L/usr/local/lib abspath.o ctype.o exec_cmd.o quote.o strbuf.o usage.o wrapper.o shell.o compat/lib.a
> 	Undefined                       first referenced
> 	symbol                              in file
> 	hexval_table                        abspath.o
> 	null_sha1                           abspath.o
> 	trust_executable_bit                abspath.o
> 	has_symlinks                        abspath.o
> 	UX:ld: ERROR: Symbol referencing errors. No output written to git-shell
> 	gmake: *** [git-shell] Error 1
> 	aidan@jpradley:~/git$ cat config.mak
> 	NO_OENSSL=1
> 	NO_MKDTEMP=1
> 	SHELL=/bin/bash
> 	SNPRINTF_RETURNS_BOGUS=1
> 	CFLAGS=-Kalloca
> 	CPPFLAGS=-Kalloca
> 
> I've found that if I set CFLAGS to -O2, it links properly:
> 	aidan@jpradley:~/git$ touch abspath.c
> 	aidan@jpradley:~/git$ gmake V=1 git-shell
> 	cc -o abspath.o -c -Kalloca -O2  -Kthread -I/usr/local/include -DNO_IPV6 -DSHA1_HEADER='<openssl/sha.h>' -DSNPRINTF_RETURNS_BOGUS -DNO_STRCASESTR -DNO_MKDTEMP -DNO_HSTRERROR -DNO_MEMMEM abspath.c
> 	cc -Kalloca -O2  -Kthread -I/usr/local/include -DNO_IPV6 -DSHA1_HEADER='<openssl/sha.h>' -DSNPRINTF_RETURNS_BOGUS -DNO_STRCASESTR -DNO_MKDTEMP -DNO_HSTRERROR -DNO_MEMMEM -o git-shell   -L/usr/local/lib abspath.o ctype.o exec_cmd.o quote.o strbuf.o usage.o wrapper.o shell.o compat/lib.a
> 
> So I think it's "not inlining" stuff like:
> 	static inline unsigned int hexval(unsigned char c)
> 	{
> 		return hexval_table[c];
> 	}
>  
> So, finally, it pretty much works on SCO out of the box - here's my
> settings, which which the test suite passed (well, is passing, I'm at
> t5400, but I expect it to all pass again with these settings):
> 
> 	aidan@jpradley:~/git$ cat config.mak
> 	NO_TCLTK=1
> 	NO_MKDTEMP=1
> 	SHELL=/bin/bash
> 	SNPRINTF_RETURNS_BOGUS=1
> 	CFLAGS=-O2
-g and -O2 are mutually exclusive.  You can have either one but not both.
I do have tcl and tk

drwxr-xr-x 12 gerberb zenez 2048 Jun 10 17:30 tcl8.5.2 drwxr-xr-x 12 gerberb zenez 2048 Jun 10 17:30 tk8.5.2

So I am not sure what the best option should be. There is a patch for UnixWare 7 MP4 that has to be installed to MP4 for so failures, but it works even with ksh with it.

Also on UnixWare 7.1.4 I could not get any m4 greater than 1.4.9 to compile and work. I finally just used

drwxr-xr-x 8 gerberb zenez 2048 May 19 03:05 m4-1.4.9 drwxrwxrwx 9 gerberb zenez 4096 Apr 3 00:11 make-3.81 drwxr-xr-x 12 gerberb zenez 2048 Jun 10 16:43 tcl8.5.2 drwxr-xr-x 12 gerberb zenez 2048 Jun 10 16:44 tk8.5.2 drwxr-xr-x 9 gerberb zenez 4096 May 19 03:18 sed-4.1.4

On UnixWare 7.1.4 MP4 with ptf9055a.

-- Boyd Gerber <gerberb@zenez.com> ZENEZ 1042 East Fort Union #135, Midvale Utah 84047

Aidan Van Dyk· Jul 30, 2008, 23:44 UTC · re: Boyd Lynn Gerber · lore

Re: Compile fix for SCO OPenServer

* Boyd Lynn Gerber <gerberb@zenez.com> [080730 19:30]:
 
Show 8 quoted lines
> I have m4-1.4.3 at 
> 
> ftp://ftp.zenez.com/pub/zenez/prgms/m4-1.4.3-osr6-all.tar.gz
> 
> I really have to be able to use configure for most of my OpenSource 
> Projects for SCO OS's.
> 
> I made the changes so that most things work with the auto tools.  
I'm not a SCO guru by any means...

I'm just a user on someone else's SCO machine, just trying to make sure that the software I write is "fairly portable"...

I'm willing to carry a good and useful tool (like git) in my home directory in that endeavour, but I'm not carrying all of the GNU stack in my home directory so I can run configure git is a bit much ;-)

Show 5 quoted lines
> I did a VM install of OpenServer 6 to try things out.  I was able to get 
> your -Wall failure, but once I ran the CC=cc CXX=CC ./configure I was able 
> to run gmake without any errors. I did have to install the M4 from above 
> to get configure to work.  So, the straight out of the box install has to 
> have gnu m4 to run configure. 
So configure.ac must have some magic in it that allows configure to
notice -Wall doesn't work.  You can see what it choose in
config.mak.autogen I think.  But I'm pretty glad for the kbuild style
Makefile in git not requiring autoconf/automake/etc.
 
> -g and -O2 are mutually exclusive.  You can have either one but not both.

Yes, and I think the default to cc matches -g, not -O2, hence my failures unless setting -O2.

> I do have tcl and tk

I'm sure... I might even find it burried somewhere on this machine too, but I have no real need for it.

a.
-- 
Aidan Van Dyk                                             Create like a god,
aidan@highrise.ca                                       command like a king,
http://www.highrise.ca/                                   work like a slave.
Boyd Lynn Gerber· Jul 31, 2008, 00:00 UTC · re: Aidan Van Dyk · lore

Re: Compile fix for SCO OPenServer

On Wed, 30 Jul 2008, Aidan Van Dyk wrote:
Show 18 quoted lines
> * Boyd Lynn Gerber <gerberb@zenez.com> [080730 19:30]:
> > I have m4-1.4.3 at 
> > 
> > ftp://ftp.zenez.com/pub/zenez/prgms/m4-1.4.3-osr6-all.tar.gz
> > 
> > I really have to be able to use configure for most of my OpenSource 
> > Projects for SCO OS's.
> > 
> > I made the changes so that most things work with the auto tools.  
> 
> I'm not a SCO guru by any means...
> 
> I'm just a user on someone else's SCO machine, just trying to make sure
> that the software I write is "fairly portable"...
> 
> I'm willing to carry a good and useful tool (like git) in my home
> directory in that endeavour, but I'm not carrying all of the GNU stack
> in my home directory so I can run configure git is a bit much ;-)
That make sense.  All though m4 is

test5 > l /usr/local/bin/m4 -rwxr-xr-x 1 gerberb zenez 280524 Jul 23 2005 /usr/local/bin/m4

Which is not that big. I have it in my ~/.bin/ on my clients machines. You really need a good m4 for most things. Sendmail expecially. Also for the latest bind with the DNS security fix. I some times need bc as well.

test5 > l /usr/local/bin/bc -rwxr-xr-x 1 bin bin 85088 May 19 17:20 /usr/local/bin/bc

Show 10 quoted lines
> > I did a VM install of OpenServer 6 to try things out.  I was able to get 
> > your -Wall failure, but once I ran the CC=cc CXX=CC ./configure I was able 
> > to run gmake without any errors. I did have to install the M4 from above 
> > to get configure to work.  So, the straight out of the box install has to 
> > have gnu m4 to run configure. 
> 
> So configure.ac must have some magic in it that allows configure to
> notice -Wall doesn't work.  You can see what it choose in
> config.mak.autogen I think.  But I'm pretty glad for the kbuild style
> Makefile in git not requiring autoconf/automake/etc.
I do not see anything really obvious, but below is config.mak.autogen

test5 > cat config.mak.autogen # git Makefile configuration, included in main Makefile # config.mak.autogen. Generated from config.mak.in:config.mak.append by configure.

CC = cc CFLAGS = -Kalloca -Kthread AR = gar TAR = gtar #INSTALL = @INSTALL@ # needs install-sh or install.sh in sources TCLTK_PATH = wish

prefix = /usr/local exec_prefix = ${prefix} bindir = ${exec_prefix}/bin #gitexecdir = ${exec_prefix}/libexec/git-core/ datarootdir = @datarootdir@ template_dir = ${prefix}/share/git-core/templates/

mandir=${prefix}/man
srcdir = .

export exec_prefix mandir export srcdir VPATH

ASCIIDOC8= NEEDS_SSL_WITH_CRYPTO= NO_OPENSSL= NO_CURL= NO_EXPAT= NEEDS_LIBICONV= NEEDS_SOCKET=YesPlease NO_SYS_SELECT_H= NO_D_INO_IN_DIRENT= NO_D_TYPE_IN_DIRENT=YesPlease NO_SOCKADDR_STORAGE= NO_IPV6= NO_C99_FORMAT= NO_STRCASESTR=YesPlease NO_MEMMEM=YesPlease NO_STRLCPY= NO_STRTOUMAX= NO_SETENV= NO_UNSETENV= NO_MKDTEMP=YesPlease NO_ICONV= OLD_ICONV= NO_DEFLATE_BOUND= FREAD_READS_DIRECTORIES=UnfortunatelyYes SNPRINTF_RETURNS_BOGUS=UnfortunatelyYes # config.mak.append. Generated by configure.

Show 9 quoted lines
> > -g and -O2 are mutually exclusive.  You can have either one but not both.
> 
> Yes, and I think the default to cc matches -g, not -O2, hence my
> failures unless setting -O2.
> 
> > I do have tcl and tk
> 
> I'm sure... I might even find it burried somewhere on this machine too,
> but I have no real need for it.
OK.

So what do you think we need to have. I really do not see the need for __OPENSERVER__. Do you?

-- Boyd Gerber <gerberb@zenez.com> ZENEZ 1042 East Fort Union #135, Midvale Utah 84047

Aidan Van Dyk· Jul 31, 2008, 00:11 UTC · re: Boyd Lynn Gerber · lore

Re: Compile fix for SCO OPenServer

* Boyd Lynn Gerber <gerberb@zenez.com> [080730 20:00]:
 
> So what do you think we need to have.  I really do not see the need for 
> __OPENSERVER__.  Do you?
No, I think I saw that long ago, when I said:
> Sorry, a bit premature on my end...    

With SNPRINTF_RETURNS_BOGUS and NO_MKDTEMP and CFLAGS set for make, I don't need any source code changes to compile on SCO.

And as long as I have GNU bash and diff available, the test suite passes
as well.  Well, all except for t9500-gitweb-standalone-no-errors.sh:
	[Thu Jul 31 00:08:46 2008] gitweb.perl: -T and -B not implemented on filehandles at /u/aidan/git/t/trash directory/../../gitweb/gitweb.perl line 2444.
Perl claims:
	This is perl, v5.8.8 built for i586-pc-sysv5
But again, I don't plan on running gitweb on this SCO box either...
a.
-- 
Aidan Van Dyk                                             Create like a god,
aidan@highrise.ca                                       command like a king,
http://www.highrise.ca/                                   work like a slave.
Boyd Lynn Gerber· Jul 31, 2008, 00:32 UTC · re: Aidan Van Dyk · lore

Re: Compile fix for SCO OPenServer

On Wed, 30 Jul 2008, Aidan Van Dyk wrote:
Show 18 quoted lines
> * Boyd Lynn Gerber <gerberb@zenez.com> [080730 20:00]:
> > So what do you think we need to have.  I really do not see the need for 
> > __OPENSERVER__.  Do you?
> 
> No, I think I saw that long ago, when I said:
> > Sorry, a bit premature on my end...    
> 
> With SNPRINTF_RETURNS_BOGUS and NO_MKDTEMP and CFLAGS set for make, I
> don't need any source code changes to compile on SCO.
> 
> And as long as I have GNU bash and diff available, the test suite passes
> as well.  Well, all except for t9500-gitweb-standalone-no-errors.sh:
> 	[Thu Jul 31 00:08:46 2008] gitweb.perl: -T and -B not implemented on filehandles at /u/aidan/git/t/trash directory/../../gitweb/gitweb.perl line 2444.
> 
> Perl claims:
> 	This is perl, v5.8.8 built for i586-pc-sysv5
> 
> But again, I don't plan on running gitweb on this SCO box either...
OK, thanks, I did not want to not respond if things were needed.
Thanks,

-- Boyd Gerber <gerberb@zenez.com> ZENEZ 1042 East Fort Union #135, Midvale Utah 84047

Boyd Lynn Gerber· Jul 30, 2008, 20:13 UTC · re: Junio C Hamano · lore

Re: Compile fix for SCO OPenServer

On Wed, 30 Jul 2008, Junio C Hamano wrote:
Show 8 quoted lines
> Aidan Van Dyk <aidan@highrise.ca> writes:
> 
> > SCO OpenServer also hides the definitions of (at least) u_short and
> > friends if _XOPEN_SOURCE is defined.
> 
> I thought that was covered by 457bb45 (Port to 12 other Platforms., 2008-06-08).
> 
> Boyd, does this make any of the earlier symbols you added redundant?

On my machine !defined(__USLC__) covers both UnixWare 7.1.4 and OpenServer 6.0.0. !defined(_M_UNIX) covers my OpenServer 5.0.7 machine. The !defined(__USLC__) also covers my Novell OS's and others that use the USLC (Unix System Labotories Compiler).

Show 19 quoted lines
> >  git-compat-util.h |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/git-compat-util.h b/git-compat-util.h
> > index cf89cdf..42e3e0b 100644
> > --- a/git-compat-util.h
> > +++ b/git-compat-util.h
> > @@ -39,7 +39,7 @@
> >  /* Approximation of the length of the decimal representation of this type. */
> >  #define decimal_length(x)      ((int)(sizeof(x) * 2.56 + 0.5) + 1)
> >
> > -#if !defined(__APPLE__) && !defined(__FreeBSD__)  && !defined(__USLC__) && !defined(_M_UNIX)
> > +#if !defined(__APPLE__) && !defined(__FreeBSD__)  && !defined(__USLC__) && !defined(_M_UNIX) && !defined(__OPENSERVER__)
> >  #define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
> >  #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
> >  #endif
> > --
> > 1.6.0.rc1.dirty
> 

-- Boyd Gerber <gerberb@zenez.com> ZENEZ 1042 East Fort Union #135, Midvale Utah 84047

← back to recent threads