bug-coreutils
[Top][All Lists]
Advanced

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

Re: Coreutils for HP UX 11.11 64-bit


From: Bob Proulx
Subject: Re: Coreutils for HP UX 11.11 64-bit
Date: Tue, 23 Nov 2004 23:28:02 -0700
User-agent: Mutt/1.5.6+20040907i

Tinsley, Scott S. (ManTech) CTR wrote:
> We are receiving the following error on HP trying to compile with
> HP's ANSI C compiler. I was curious if there is any fix.

[...What Paul said about gcc not being HP ANSI C...]

> if gcc -DHAVE_CONFIG_H -I. -I. -I..  -I.. -I. -I../lib -I../lib   -g -O2 -MT 
> cp-hash.o -MD -MP -MF ".deps/cp-hash.Tpo" -c -o cp-hash.o cp-hash.c; \

But gcc will use the native /usr/include files.

> gcc  -g -O2   -o dd  dd.o ../lib/libfetish.a  ../lib/libfetish.a -lsec -lgen
> ld: Unsatisfied symbol "__strtoull" in file ../lib/libfetish.a[xstrtoumax.o]

There is a very long standing bug in the HP /usr/include/inttypes.h
file that reverses the sense of the 32 and 64 bit cases.  This affects
the definition of strtoumax.  The archives will have this recorded
previous postings about this.  strtoull is only valid in the 32-bit
space so this looks like the signature of this problem.

The following patch fixes that problem.  I will guess that is the
problem you are seeing here too.  (Even if the gcc command line above
does not look like that is the problem because you won't see this in
32-bit mode.)  Regardless if you are trying to compile in 64-bit mode
then this is a good fix to perform.

By the way, coreutils does build fine using the native HP ANSI C
compiler on HP-UX 11.11 in 32-bit mode.  To build 64-bit versions you
must apply the patch at the end of this message.  After doing so it
will build fine using the native compiler in 64-bit mode.

Bob

--- inttypes.h.original Fri Apr 20 10:42:14 2001
+++ inttypes.h  Tue Jan 15 02:17:21 2002
@@ -496,7 +496,7 @@
 ** they may have.
 */
 
-#ifndef __STDC_32_MODE__
+#ifndef __LP64__
 
 #ifdef __cplusplus
 extern "C" { 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]