(no subject)
David Pham
david@davidvupham.com
Tue Mar 25 20:01:02 2003
Hi,
So what is the fix for this? Is it to remove the inline keyword or remove
the typedef?
Does anyone have a working gnupg on hpux 11.11?
Thanks
From dshaw@jabberwocky.com Tue Feb 11 01:40:49 2003
Received: from kerckhoffs.g10code.com ([217.69.77.222])
by trithemius.gnupg.org with esmtp (Exim 3.35 #1 (Debian))
id 18iOTX-000327-00
for <mm.gnupg-users@trithemius.gnupg.org>; Tue, 11 Feb 2003 01:40:39 +0100
Received: from walrus.ne.client2.attbi.com ([24.60.130.129]
helo=claude.jabberwocky.com)
by kerckhoffs.g10code.com with esmtp (Exim 3.35 #1 (Debian))
id 18iOOG-0004P3-00
for <gnupg-users@gnupg.org>; Tue, 11 Feb 2003 01:35:13 +0100
Received: (from dshaw@localhost)
by claude.jabberwocky.com (8.11.6/8.11.6) id h1AJj6V01789;
Mon, 10 Feb 2003 14:45:06 -0500
From: David Shaw <dshaw@jabberwocky.com>
To: gnupg-users@gnupg.org
Cc: bug-autoconf@gnu.org
Subject: Re: inline problem
Message-ID: <20030210194505.GB1646@jabberwocky.com>
Mail-Followup-To: gnupg-users@gnupg.org, bug-autoconf@gnu.org
References: <20030210041325.20616.qmail@web13401.mail.yahoo.com>
<D78039D1-3CB2-11D7-B18B-003065B1243E@earthlink.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <D78039D1-3CB2-11D7-B18B-003065B1243E@earthlink.net>
X-PGP-Key: 99242560 / 7D92 FD31 3AB6 F373 4CC5 9CA1 DB69 8D71 9924 2560
X-URL: http://www.jabberwocky.com/
X-Phase-Of-Moon: The Moon is Waxing Gibbous (62% of Full)
User-Agent: Mutt/1.5.3i
Sender: gnupg-users-admin@gnupg.org
Errors-To: gnupg-users-admin@gnupg.org
X-BeenThere: gnupg-users@gnupg.org
X-Mailman-Version: 2.0.11
Precedence: bulk
List-Help: <mailto:gnupg-users-request@gnupg.org?subject=help>
List-Post: <mailto:gnupg-users@gnupg.org>
List-Subscribe: <http://lists.gnupg.org/mailman/listinfo/gnupg-users>,
<mailto:gnupg-users-request@gnupg.org?subject=subscribe>
List-Id: Help and discussion among users of GnuPG <gnupg-users.gnupg.org>
List-Unsubscribe: <http://lists.gnupg.org/mailman/listinfo/gnupg-users>,
<mailto:gnupg-users-request@gnupg.org?subject=unsubscribe>
List-Archive: <http://lists.gnupg.org/pipermail/gnupg-users/>
Date: Tue Feb 11 01:41:24 2003
X-Original-Date: Mon, 10 Feb 2003 14:45:06 -0500
On Sun, Feb 09, 2003 at 09:48:04PM -0700, Joseph Bruni wrote:
> I figured it out. It turns out to be a bug in HP's C compiler.
> Following are the details of my discovery.
>
> First, when I ran configure, the only option I gave it was
> --prefix=/opt/gnu.
>
> Make then dies on the first file, ./intl/intl-compat.c. Below is the
> transcript from "make".
> =========
> Making all in intl
> cc -c -DLOCALEDIR=\"/opt/gnu/share/locale\"
> -DLOCALE_ALIAS_PATH=\"/opt/gnu/share/locale\"
> -DLIBDIR=\"/opt/gnu/lib\" -DHAVE_CONFIG_H -I.. -I. -I../intl -g -Ae
> -D_HPUX_SOURCE intl-compat.c
> cc: "gettextP.h", line 67: error 1000: Unexpected symbol: "SWAP".
> cc: panic 2017: Cannot recover from earlier errors, terminating.
> *** Error exit code 1
> =========
>
> Searching through config.h for references to "inline" turns up the
> following:
>
> =========
> /* Define as `__inline' if that's what the C compiler calls it, or to
> nothing
> if it is not supported. */
> /* #undef inline */
> =========
>
> Nothing more.
>
> Looking through config.log shows this:
>
> =========
> configure:5264: checking for inline
> configure:5281: cc -c -g -Ae -D_HPUX_SOURCE conftest.c >&5
> configure:5284: $? = 0
> configure:5287: test -s conftest.o
> configure:5290: $? = 0
> configure:5301: result: inline
> ...
> configure:8008: checking for inline
> configure:8045: result: inline
> ...
> ac_cv_c_inline=inline
> =========
>
> I then boiled this down to a test case to find out why autoconf senses
> a working "inline" keyword, but having it die when you try to use it.
> Suppose you try to compile this:
>
> static inline unsigned foo(unsigned bar)
> {
> return bar;
> }
>
> This will compile just fine. However, if you try to compile this:
>
> typedef unsigned UINT;
> static inline UINT foo(UINT bar)
> {
> return bar;
> }
>
> You get this:
> cc: "bozo.c", line 2: error 1000: Unexpected symbol: "foo".
> cc: panic 2017: Cannot recover from earlier errors, terminating.
>
> If you remove the "inline" keyword, it compiles just fine. So, we have
> a choice. We can either remove the inline keyword, or remove the
> typedef. I tell you, there is nothing I hate worse than bugs in one's
> tools. I'll need to report this to HP. In the meantime, perhaps some of
> the GnuPG programmers can add a work-around for HP's broken compiler. ;)
Good catch there. I think it would be good to report this to the
autoconf people (cc'd). They can then improve the "inline" testing
code to catch this case, and all autoconfed software can benefit.
For the autoconf folks: GnuPG uses autoconf 2.54.
David
--
David Shaw | dshaw@jabberwocky.com | WWW http://www.jabberwocky.com/
+---------------------------------------------------------------------------
+
"There are two major products that come out of Berkeley: LSD and UNIX.
We don't believe this to be a coincidence." - Jeremy S. Anders