Mailing List Archive

compile problems, AIX 4.3.2
Trying to compile gnupg 0.9.6 on AIX 4.3.2 (PowerPC) with gcc 2.8.1, I
get the following:

gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -g -O2 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -c mpih-div.c
mpih-div.c: In function `mpihelp_mod_1':
mpih-div.c:86: warning: implicit declaration of function `__udiv_w_sdiv'
mpih-div.c:189: fixed or forbidden register was spilled.
This may be due to a compiler bug or to impossible asm
statements or clauses.
make[2]: *** [mpih-div.o] Error 1
make[2]: Leaving directory `/home/ic5035/gnupg-0.9.6/mpi'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ic5035/gnupg-0.9.6'
make: *** [all-recursive-am] Error 2


I get that both with and without --disable-asm in the configuration.

If I configure and build with the native AIX cc, I get this:

cc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../intl -O -c memory.c
"memory.c", line 51.12: 1506-120 (S) Function cannot return a const qualified type.
"memory.c", line 324.1: 1506-120 (S) Function cannot return a const qualified type.
make[2]: *** [memory.o] Error 1
make[2]: Leaving directory `/home/ic5035/gnupg-0.9.6/util'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ic5035/gnupg-0.9.6'
make: *** [all-recursive-am] Error 2


Removing the "const" before "void" at the indicated places allows the build
to proceed to this point:

cc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../intl -O -c random.c
"random.c", line 310.37: 1506-025 (S) Operand must be a modifiable lvalue.
make[2]: *** [random.o] Error 1
make[2]: Leaving directory `/home/ic5035/gnupg-0.9.6/cipher'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ic5035/gnupg-0.9.6'
make: *** [all-recursive-am] Error 2


I moved the ++ on the right hand side of line 310 inside the parens:

rndpool[pool_writepos++] = *((byte*)buffer++);

which seemed to make the compiler happy.

Later the build blew up when it tried to call "cc ... -shared ...".
The compiler front-end passed "-shared" on to the linker, which
complained that -h and -a weren't recognized options. So I reconfigured
with --disable-dynload, which gives this:

cc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../intl -O -c misc.c
"misc.c", line 45.1: 1506-120 (S) Function cannot return a volatile qualified type.
make[2]: *** [misc.o] Error 1
make[2]: Leaving directory `/home/ic5035/gnupg-0.9.6/g10'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ic5035/gnupg-0.9.6'
make: *** [all-recursive-am] Error 2


I removed the "volatile", and the build finished. "make check" gave
good (albeit *very* slow) results -- all tests passed. (AIX has no
/dev/random, but "ps" showed a rather fascinating set of processes
running on that pseudoterminal for my amusement while I waited for the
test results. ;-) )
Re: compile problems, AIX 4.3.2 [ In reply to ]
Greg Wooledge <ic5035%tss1crs.amgreetings.com@rose.amgreetings.com> writes:

> mpih-div.c:86: warning: implicit declaration of function `__udiv_w_sdiv'
> mpih-div.c:189: fixed or forbidden register was spilled.
> This may be due to a compiler bug or to impossible asm

Try egcs

> cc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../intl -O -c memory.c
> "memory.c", line 51.12: 1506-120 (S) Function cannot return a const qualified type.
> "memory.c", line 324.1: 1506-120 (S) Function cannot return a const qualified type.

Oops, s/const/static/

> rndpool[pool_writepos++] = *((byte*)buffer++);

Okay, I fixed this (after running gcc witz -pedantic)

> cc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../intl -O -c misc.c
> "misc.c", line 45.1: 1506-120 (S) Function cannot return a volatile qualified type.

Fixed.

> /dev/random, but "ps" showed a rather fascinating set of processes
> running on that pseudoterminal for my amusement while I waited for the

You may want to try out EGD.



--
Werner Koch at guug.de www.gnupg.org keyid 621CC013
Re: compile problems, AIX 4.3.2 [ In reply to ]
Werner Koch (wk@isil.d.shuttle.de) wrote:

> > mpih-div.c:86: warning: implicit declaration of function `__udiv_w_sdiv'
> > mpih-div.c:189: fixed or forbidden register was spilled.
> > This may be due to a compiler bug or to impossible asm
>
> Try egcs

Gnupg 0.9.7 still blows up on AIX, even with egcs:

egcs -DHAVE_CONFIG_H -I. -I. -I.. -I../include -g -O2 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -c mpih-div.c
mpih-div.c: In function `mpihelp_mod_1':
mpih-div.c:86: warning: implicit declaration of function `__udiv_w_sdiv'
mpih-div.c:189: fixed or forbidden register 64 (mq) was spilled for class MQ_REGS.
This may be due to a compiler bug or to impossible asm
statements or clauses.
make[2]: *** [mpih-div.o] Error 1
make[2]: Leaving directory `/home/ic5035/gnupg-0.9.7/mpi'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ic5035/gnupg-0.9.7'
make: *** [all-recursive-am] Error 2
tss1crs:~/gnupg-0.9.7$

tss1crs:~/gnupg-0.9.7$ egcs -v
Reading specs from /usr/local/egcs/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)