Page MenuHome GnuPG

libgcrypt 1.9.0 does not compile on old Mac OS X, versions 10.5.8 (Leopard) and 10.4.11 (Tiger), both on PPC hardware
Closed, ResolvedPublic

Description

On both systems GCC 4.2 is the default compiler, but GCC 6 or 7 can also be used. The problem is like this

make[2]: Leaving directory
`/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libgcrypt/libgcrypt/work/libgcrypt-1.9.0/mpi'
Making all in cipher
make[2]: Entering directory
`/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libgcrypt/libgcrypt/work/libgcrypt-1.9.0/cipher'
/bin/sh ../libtool  --tag=CC   --mode=compile /usr/bin/gcc-4.2
-DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi
-I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc
-fno-delete-null-pointer-checks -Wall -MT cipher.lo -MD -MP -MF
.deps/cipher.Tpo -c -o cipher.lo cipher.c
libtool: compile:  /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src
-I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe
-Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT
cipher.lo -MD -MP -MF .deps/cipher.Tpo -c cipher.c  -fno-common -DPIC -o
.libs/cipher.o
In file included from cipher.c:31:
./cipher-internal.h:145: error: redefinition of typedef
'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of
'cipher_bulk_ops_t' was here
make[2]: *** [cipher.lo] Error 1
make[2]: Leaving directory

It is described in more detail in the external link.

Details

External Link
https://trac.macports.org/ticket/62132
Version
libgcrypt 1.9.0

Event Timeline

In "src/cipher-proto.h", try removing typedef and leaving just forward declaration of structure.

From:

124	/*
125	 *
126	 * Symmetric cipher related definitions.
127	 *
128	 */
129	
130	typedef struct cipher_bulk_ops cipher_bulk_ops_t;
131	
132	/* Type for the cipher_setkey function.  */
133	typedef gcry_err_code_t (*gcry_cipher_setkey_t) (void *c,
134							 const unsigned char *key,
135							 unsigned keylen,
136							 cipher_bulk_ops_t *bulk_ops);

To this:

124	/*
125	 *
126	 * Symmetric cipher related definitions.
127	 *
128	 */
129	
130	struct cipher_bulk_ops;
131	
132	/* Type for the cipher_setkey function.  */
133	typedef gcry_err_code_t (*gcry_cipher_setkey_t) (void *c,
134							 const unsigned char *key,
135							 unsigned keylen,
136							 struct cipher_bulk_ops *bulk_ops);

BTW, we should better get back to the classic/GNU-coding-style pattern:

struct foo_s { ... };
typedef struct foos_s foo_t;

It is more to write but all compiler should grok it.

Here's patch to try out:

Right now I am compiling with my old PowerBook in Tiger. In case a compilation fails I'll try this patch – on Tiger (Mac OS X 10.4.11)! It's a bit more primitive than Leopard.

Here's patch to try out:

This patch failed. I think MacPorts only accepts unified diff output. I'll try to translate it!

The translated bulk patch fails. Compilation still runs into this error:

make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libgcrypt/libgcrypt/work/libgcrypt-1.9.0/cipher'
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher.lo -MD -MP -MF .deps/cipher.Tpo -c -o cipher.lo cipher.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher.lo -MD -MP -MF .deps/cipher.Tpo -c cipher.c  -fno-common -DPIC -o .libs/cipher.o
In file included from cipher.c:31:
./cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here

GCC 4.2 runs with option -std=gnu89 – is this correct? Or is -std=gnu99 the apriopriate choice?

Do not use -fno-common

Could be this switch is introduced by configure:

checking for objdir... .libs
checking if /opt/local/bin/gcc-apple-4.2 supports -fno-rtti -fno-exceptions... no
checking for /opt/local/bin/gcc-apple-4.2 option to produce PIC... -fno-common -DPIC
checking if /opt/local/bin/gcc-apple-4.2 PIC flag -fno-common -DPIC works... yes
checking if /opt/local/bin/gcc-apple-4.2 static flag -static works... no
checking if /opt/local/bin/gcc-apple-4.2 supports -c -o file.o... yes
checking if /opt/local/bin/gcc-apple-4.2 supports -c -o file.o... (cached) yes
checking whether the /opt/local/bin/gcc-apple-4.2 linker (/opt/local/libexec/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/ld) supports shared libraries... yes

In "src/cipher-proto.h", try removing typedef and leaving just forward declaration of structure.

Performing only this change leads consistently to the well-known error of:

In file included from cipher.c:31:
./cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here

Here's patch to try out:

With your bulk patch applied

patching file cipher/arcfour.c
patching file cipher/gost28147.c
patching file cipher/idea.c
patching file cipher/mac-cmac.c
patching file cipher/mac-gmac.c
patching file cipher/mac-hmac.c
patching file cipher/mac-internal.h
patching file cipher/mac-poly1305.c
patching file cipher/mac.c
patching file cipher/rfc2268.c
patching file cipher/salsa20.c
patching file cipher/seed.c
patching file src/cipher-proto.h

make -k shows problems with these files:

Making all in cipher
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher.lo -MD -MP -MF .deps/cipher.Tpo -c -o cipher.lo cipher.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher.lo -MD -MP -MF .deps/cipher.Tpo -c cipher.c  -fno-common -DPIC -o .libs/cipher.o
In file included from cipher.c:31:
./cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [cipher.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-cbc.lo -MD -MP -MF .deps/cipher-cbc.Tpo -c -o cipher-cbc.lo cipher-cbc.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-cbc.lo -MD -MP -MF .deps/cipher-cbc.Tpo -c cipher-cbc.c  -fno-common -DPIC -o .libs/cipher-cbc.o
In file included from cipher-cbc.c:29:
./cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [cipher-cbc.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-cfb.lo -MD -MP -MF .deps/cipher-cfb.Tpo -c -o cipher-cfb.lo cipher-cfb.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-cfb.lo -MD -MP -MF .deps/cipher-cfb.Tpo -c cipher-cfb.c  -fno-common -DPIC -o .libs/cipher-cfb.o
In file included from cipher-cfb.c:30:
./cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [cipher-cfb.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-ofb.lo -MD -MP -MF .deps/cipher-ofb.Tpo -c -o cipher-ofb.lo cipher-ofb.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-ofb.lo -MD -MP -MF .deps/cipher-ofb.Tpo -c cipher-ofb.c  -fno-common -DPIC -o .libs/cipher-ofb.o
In file included from cipher-ofb.c:30:
./cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [cipher-ofb.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-ctr.lo -MD -MP -MF .deps/cipher-ctr.Tpo -c -o cipher-ctr.lo cipher-ctr.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-ctr.lo -MD -MP -MF .deps/cipher-ctr.Tpo -c cipher-ctr.c  -fno-common -DPIC -o .libs/cipher-ctr.o
In file included from cipher-ctr.c:30:
./cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [cipher-ctr.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-aeswrap.lo -MD -MP -MF .deps/cipher-aeswrap.Tpo -c -o cipher-aeswrap.lo cipher-aeswrap.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-aeswrap.lo -MD -MP -MF .deps/cipher-aeswrap.Tpo -c cipher-aeswrap.c  -fno-common -DPIC -o .libs/cipher-aeswrap.o
In file included from cipher-aeswrap.c:29:
./cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [cipher-aeswrap.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-ccm.lo -MD -MP -MF .deps/cipher-ccm.Tpo -c -o cipher-ccm.lo cipher-ccm.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-ccm.lo -MD -MP -MF .deps/cipher-ccm.Tpo -c cipher-ccm.c  -fno-common -DPIC -o .libs/cipher-ccm.o
In file included from cipher-ccm.c:29:
./cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [cipher-ccm.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-cmac.lo -MD -MP -MF .deps/cipher-cmac.Tpo -c -o cipher-cmac.lo cipher-cmac.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-cmac.lo -MD -MP -MF .deps/cipher-cmac.Tpo -c cipher-cmac.c  -fno-common -DPIC -o .libs/cipher-cmac.o
In file included from cipher-cmac.c:27:
cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [cipher-cmac.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-gcm.lo -MD -MP -MF .deps/cipher-gcm.Tpo -c -o cipher-gcm.lo cipher-gcm.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-gcm.lo -MD -MP -MF .deps/cipher-gcm.Tpo -c cipher-gcm.c  -fno-common -DPIC -o .libs/cipher-gcm.o
In file included from cipher-gcm.c:30:
./cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [cipher-gcm.lo] Error 1
`echo /bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -c cipher-gcm-intel-pclmul.c | sed -e 's/-fsanitize[=,\-][=,a-z,A-Z,0-9,\,,\-]*//g' -e 's/-fprofile[=,\-][=,a-z,A-Z,0-9,\,,\-]*//g' -e 's/-fcoverage[=,\-][=,a-z,A-Z,0-9,\,,\-]*//g' `
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -c cipher-gcm-intel-pclmul.c  -fno-common -DPIC -o .libs/cipher-gcm-intel-pclmul.o
In file included from cipher-gcm-intel-pclmul.c:30:
./cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [cipher-gcm-intel-pclmul.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-poly1305.lo -MD -MP -MF .deps/cipher-poly1305.Tpo -c -o cipher-poly1305.lo cipher-poly1305.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-poly1305.lo -MD -MP -MF .deps/cipher-poly1305.Tpo -c cipher-poly1305.c  -fno-common -DPIC -o .libs/cipher-poly1305.o
In file included from cipher-poly1305.c:29:
./cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [cipher-poly1305.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-ocb.lo -MD -MP -MF .deps/cipher-ocb.Tpo -c -o cipher-ocb.lo cipher-ocb.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-ocb.lo -MD -MP -MF .deps/cipher-ocb.Tpo -c cipher-ocb.c  -fno-common -DPIC -o .libs/cipher-ocb.o
In file included from cipher-ocb.c:46:
./cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [cipher-ocb.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-xts.lo -MD -MP -MF .deps/cipher-xts.Tpo -c -o cipher-xts.lo cipher-xts.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-xts.lo -MD -MP -MF .deps/cipher-xts.Tpo -c cipher-xts.c  -fno-common -DPIC -o .libs/cipher-xts.o
In file included from cipher-xts.c:29:
./cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [cipher-xts.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-eax.lo -MD -MP -MF .deps/cipher-eax.Tpo -c -o cipher-eax.lo cipher-eax.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-eax.lo -MD -MP -MF .deps/cipher-eax.Tpo -c cipher-eax.c  -fno-common -DPIC -o .libs/cipher-eax.o
In file included from cipher-eax.c:29:
./cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [cipher-eax.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-selftest.lo -MD -MP -MF .deps/cipher-selftest.Tpo -c -o cipher-selftest.lo cipher-selftest.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher-selftest.lo -MD -MP -MF .deps/cipher-selftest.Tpo -c cipher-selftest.c  -fno-common -DPIC -o .libs/cipher-selftest.o
In file included from cipher-selftest.c:30:
cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [cipher-selftest.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT arcfour.lo -MD -MP -MF .deps/arcfour.Tpo -c -o arcfour.lo arcfour.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT arcfour.lo -MD -MP -MF .deps/arcfour.Tpo -c arcfour.c  -fno-common -DPIC -o .libs/arcfour.o
In file included from arcfour.c:33:
cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [arcfour.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT blowfish.lo -MD -MP -MF .deps/blowfish.Tpo -c -o blowfish.lo blowfish.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT blowfish.lo -MD -MP -MF .deps/blowfish.Tpo -c blowfish.c  -fno-common -DPIC -o .libs/blowfish.o
In file included from blowfish.c:40:
cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [blowfish.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cast5.lo -MD -MP -MF .deps/cast5.Tpo -c -o cast5.lo cast5.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cast5.lo -MD -MP -MF .deps/cast5.Tpo -c cast5.c  -fno-common -DPIC -o .libs/cast5.o
In file included from cast5.c:47:
cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [cast5.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT des.lo -MD -MP -MF .deps/des.Tpo -c -o des.lo des.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT des.lo -MD -MP -MF .deps/des.Tpo -c des.c  -fno-common -DPIC -o .libs/des.o
In file included from des.c:122:
cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [des.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT rijndael.lo -MD -MP -MF .deps/rijndael.Tpo -c -o rijndael.lo rijndael.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT rijndael.lo -MD -MP -MF .deps/rijndael.Tpo -c rijndael.c  -fno-common -DPIC -o .libs/rijndael.o
In file included from rijndael.c:51:
./cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [rijndael.lo] Error 1
`echo /bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall  -c rijndael-ppc.c | sed -e 's/-fsanitize[=,\-][=,a-z,A-Z,0-9,\,,\-]*//g' -e 's/-fprofile[=,\-][=,a-z,A-Z,0-9,\,,\-]*//g' -e 's/-fcoverage[=,\-][=,a-z,A-Z,0-9,\,,\-]*//g' `
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -c rijndael-ppc.c  -fno-common -DPIC -o .libs/rijndael-ppc.o
In file included from rijndael-ppc.c:29:
cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [rijndael-ppc.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT twofish.lo -MD -MP -MF .deps/twofish.Tpo -c -o twofish.lo twofish.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT twofish.lo -MD -MP -MF .deps/twofish.Tpo -c twofish.c  -fno-common -DPIC -o .libs/twofish.o
In file included from twofish.c:48:
cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [twofish.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT serpent.lo -MD -MP -MF .deps/serpent.Tpo -c -o serpent.lo serpent.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT serpent.lo -MD -MP -MF .deps/serpent.Tpo -c serpent.c  -fno-common -DPIC -o .libs/serpent.o
In file included from serpent.c:32:
cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [serpent.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT rfc2268.lo -MD -MP -MF .deps/rfc2268.Tpo -c -o rfc2268.lo rfc2268.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT rfc2268.lo -MD -MP -MF .deps/rfc2268.Tpo -c rfc2268.c  -fno-common -DPIC -o .libs/rfc2268.o
In file included from rfc2268.c:38:
cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [rfc2268.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT seed.lo -MD -MP -MF .deps/seed.Tpo -c -o seed.lo seed.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT seed.lo -MD -MP -MF .deps/seed.Tpo -c seed.c  -fno-common -DPIC -o .libs/seed.o
In file included from seed.c:33:
cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [seed.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT camellia-glue.lo -MD -MP -MF .deps/camellia-glue.Tpo -c -o camellia-glue.lo camellia-glue.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT camellia-glue.lo -MD -MP -MF .deps/camellia-glue.Tpo -c camellia-glue.c  -fno-common -DPIC -o .libs/camellia-glue.o
In file included from camellia-glue.c:66:
cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [camellia-glue.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT idea.lo -MD -MP -MF .deps/idea.Tpo -c -o idea.lo idea.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT idea.lo -MD -MP -MF .deps/idea.Tpo -c idea.c  -fno-common -DPIC -o .libs/idea.o
In file included from idea.c:51:
cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [idea.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT salsa20.lo -MD -MP -MF .deps/salsa20.Tpo -c -o salsa20.lo salsa20.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT salsa20.lo -MD -MP -MF .deps/salsa20.Tpo -c salsa20.c  -fno-common -DPIC -o .libs/salsa20.o
In file included from salsa20.c:42:
cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [salsa20.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT gost28147.lo -MD -MP -MF .deps/gost28147.Tpo -c -o gost28147.lo gost28147.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT gost28147.lo -MD -MP -MF .deps/gost28147.Tpo -c gost28147.c  -fno-common -DPIC -o .libs/gost28147.o
In file included from gost28147.c:38:
cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [gost28147.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT chacha20.lo -MD -MP -MF .deps/chacha20.Tpo -c -o chacha20.lo chacha20.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT chacha20.lo -MD -MP -MF .deps/chacha20.Tpo -c chacha20.c  -fno-common -DPIC -o .libs/chacha20.o
In file included from chacha20.c:39:
cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [chacha20.lo] Error 1
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT sm4.lo -MD -MP -MF .deps/sm4.Tpo -c -o sm4.lo sm4.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT sm4.lo -MD -MP -MF .deps/sm4.Tpo -c sm4.c  -fno-common -DPIC -o .libs/sm4.o
In file included from sm4.c:31:
cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here
make[2]: *** [sm4.lo] Error 1
make[2]: Target `all' not remade because of errors.
Making all in random
make[2]: Nothing to be done for `all'.
Making all in src
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..   -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT libgcrypt_la-global.lo -MD -MP -MF .deps/libgcrypt_la-global.Tpo -c -o libgcrypt_la-global.lo `test -f 'global.c' || echo './'`global.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT libgcrypt_la-global.lo -MD -MP -MF .deps/libgcrypt_la-global.Tpo -c global.c  -fno-common -DPIC -o .libs/libgcrypt_la-global.o
global.c: In function '_gcry_vcontrol':
global.c:714: error: #pragma GCC diagnostic not allowed inside functions
global.c:715: error: #pragma GCC diagnostic not allowed inside functions
global.c:742: error: #pragma GCC diagnostic not allowed inside functions
make[2]: *** [libgcrypt_la-global.lo] Error 1
make[2]: *** No rule to make target `../cipher/libcipher.la', needed by `libgcrypt.la'.
make[2]: Target `all' not remade because of errors.
Making all in doc
make  all-am
make[3]: Nothing to be done for `all-am'.
Making all in tests
make[2]: *** No rule to make target `../src/libgcrypt.la', needed by `version'.
/opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT random.o -MD -MP -MF .deps/random.Tpo -c -o random.o random.c
random.c:509:19: error: spawn.h: No such file or directory
random.c: In function 'run_all_rng_tests':
random.c:551: warning: implicit declaration of function 'posix_spawn'
make[2]: *** [random.o] Error 1
make[2]: Target `all' not remade because of errors.
make[2]: Nothing to be done for `all-am'.

Thanks for testing. However, I do not believe patch has been correctly applied.

After applying, src/cipher-proto.h line 132 does not have cipher_bulk_ops_t definition. Section of the file should look as this:

126 /*
127  *
128  * Symmetric cipher related definitions.
129  *
130  */
131
132 struct cipher_bulk_ops;
133
134 /* Type for the cipher_setkey function.  */
135 typedef gcry_err_code_t (*gcry_cipher_setkey_t) (void *c,
136                                                  const unsigned char *key,
137                                                  unsigned keylen,
138                                                  struct cipher_bulk_ops *bulk_ops);

I tested building on Ubuntu 8.04 (gcc-4.2) and got same error about cipher_bulk_ops_t. Applying patch fixed that problem.

I also needed this patch:

Thanks for testing. However, I do not believe patch has been correctly applied.

The "Portfile" that conducts the build process has the patch contained, I sent you the list of files being patched, and here is the end of my translated patch set:

--- src/cipher-proto.h~	2021-01-18 18:34:30.000000000 +0100
+++ src/cipher-proto.h	2021-01-26 14:48:26.000000000 +0100
@@ -135,7 +135,7 @@
 typedef gcry_err_code_t (*gcry_cipher_setkey_t) (void *c,
 						 const unsigned char *key,
 						 unsigned keylen,
-						 cipher_bulk_ops_t *bulk_ops);
+						 struct cipher_bulk_ops *bulk_ops);
 
 /* Type for the cipher_encrypt function.  */
 typedef unsigned int (*gcry_cipher_encrypt_t) (void *c,

Since I can see that this GUI has an upload function I am going to upload this file.

With your other patch I still get:

libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I../mpi -I../mpi -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT cipher.lo -MD -MP -MF .deps/cipher.Tpo -c cipher.c  -fno-common -DPIC -o .libs/cipher.o
In file included from cipher.c:31:
./cipher-internal.h:145: error: redefinition of typedef 'cipher_bulk_ops_t'
../src/cipher-proto.h:132: error: previous declaration of 'cipher_bulk_ops_t' was here

So I think I need another patch for cipher.c, which I thought has become useless because of the large set you supplied.

I see now my mistake: I also have to re-write line #132 which I did not see yet!

I tested building on Ubuntu 8.04 (gcc-4.2) and got same error about cipher_bulk_ops_t. Applying patch fixed that problem.

Thank you! The original bug is gone – and a new one appeared:

/bin/sh ../libtool  --tag=CC   --mode=link /opt/local/bin/gcc-apple-4.2 -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -no-install -L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc -o pkcs1v2 pkcs1v2.o ../src/libgcrypt.la ../compat/libcompat.la -L/opt/local/lib -lgpg-error  
libtool: link: warning: `-no-install' is ignored for powerpc-apple-darwin8.11.0
libtool: link: warning: assuming `-no-fast-install' instead
libtool: link: /opt/local/bin/gcc-apple-4.2 -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -Wl,-headerpad_max_install_names -arch ppc -o .libs/pkcs1v2 pkcs1v2.o  -L/opt/local/lib ../src/.libs/libgcrypt.dylib ../compat/.libs/libcompat.a /opt/local/lib/libgpg-error.dylib
/opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT random.o -MD -MP -MF .deps/random.Tpo -c -o random.o random.c
random.c:509:19: error: spawn.h: No such file or directory
random.c: In function 'run_all_rng_tests':
random.c:551: warning: implicit declaration of function 'posix_spawn'
make[2]: *** [random.o] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libgcrypt/libgcrypt/work/libgcrypt-1.9.0/tests'

I also needed this patch:

I am going to check whether I need it on Tiger!

I also needed this patch:

I am going to check whether I need it on Tiger!

The other patch is also needed:

global.c: In function '_gcry_vcontrol':
global.c:714: error: #pragma GCC diagnostic not allowed inside functions
global.c:715: error: #pragma GCC diagnostic not allowed inside functions
global.c:742: error: #pragma GCC diagnostic not allowed inside functions

May I upload both in "translated form" to MacPorts?

Jab changed the visibility from "Public (No Login Required)" to "Jab (Josh brown)".
Jab changed the edit policy from "All Users" to "Jab (Josh brown)".
Jab changed External Link from https://trac.macports.org/ticket/62132 to https://trac.macports.or.
gniibe raised the priority of this task from Low to Normal.Jan 28 2021, 9:13 AM
gniibe changed External Link from https://trac.macports.or to https://trac.macports.org/ticket/62132.
gniibe changed the visibility from "All Users" to "Public (No Login Required)".Jan 28 2021, 11:04 PM
werner claimed this task.

The mix up of external patches and commits makes it not easy to see what has been fixed. AFAICS rC3d095206c30d fixes the last bug mentioned by @ballapete on Jan 26.