compile problems, AIX 4.3.2

Greg Wooledge ic5035%tss1crs.amgreetings.com at rose.amgreetings.com
Fri May 14 16:44:41 CEST 1999


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. ;-) )



More information about the Gnupg-devel mailing list