Compile gnupg-1.0.7 on Compaq Tru64
David Shaw
dshaw@jabberwocky.com
Tue May 7 16:59:02 2002
--RnlQjJ0d97Da+TV1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Tue, May 07, 2002 at 04:48:23PM +0200, glauserj@post.ch wrote:
> Hello
>
> I tried to compile gnupg-1.0.7 on Comaq Tru64 and got the following error:
>
> cat ./../doc/HACKING \
> ./../doc/DETAILS \
> ./../doc/FAQ >plain-large
> ../g10/gpg --homedir . --quiet --yes --import ./pubdemo.asc
> gpg: out of memory while allocating 0 bytes
> make[2]: *** [prepared.stamp] Error 2
> make[2]: Leaving directory `/home/gnupg-1.0.7/checks'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/gnupg-1.0.7'
> make: *** [all] Error 2
>
> I tried it on different systems with more or less memory.
> I tried it with different OS-versions from 4.0G to 5.1.
> I tried to disable nls, dynload and asm.
> I tried it with gcc V. 3.0.4 and the original Compaq CC.
> The error is always the same.
>
> If anybody can give me a hint please send it to glauserj@post.ch
> <mailto:glauserj@post.ch> . I would be happy.
This is fixed in 1.0.8. In the meantime, you can apply the attached
patch to util/memory.c.
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. Anderson
--RnlQjJ0d97Da+TV1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch
Index: memory.c
===================================================================
RCS file: /cvs/gnupg/gnupg/util/Attic/memory.c,v
retrieving revision 1.18.2.7
retrieving revision 1.18.2.8
diff -u -r1.18.2.7 -r1.18.2.8
--- memory.c 22 Dec 2001 18:47:58 -0000 1.18.2.7
+++ memory.c 2 May 2002 07:48:39 -0000 1.18.2.8
@@ -415,6 +415,8 @@
char *p;
#ifdef M_GUARD
+ if(!n)
+ out_of_core(n,0); /* should never happen */
if( !(p = malloc( n + EXTRA_ALIGN+5 )) )
out_of_core(n,0);
store_len(p,n,0);
@@ -422,6 +424,10 @@
p[4+EXTRA_ALIGN+n] = MAGIC_END_BYTE;
return p+EXTRA_ALIGN+4;
#else
+ /* mallocing zero bytes is undefined by ISO-C, so we better make
+ sure that it won't happen */
+ if (!n)
+ n = 1;
if( !(p = malloc( n )) )
out_of_core(n,0);
return p;
--RnlQjJ0d97Da+TV1--