[MacPorts] #63547: gnupg2 @2.3.2 does not build on PPC Tiger, Mac OS X 10.4.11, because of redefinition of typedef 'KEYBOX_HANDLE'

MacPorts noreply at macports.org
Wed Sep 29 18:55:30 UTC 2021


#63547: gnupg2 @2.3.2 does not build on PPC Tiger, Mac OS X 10.4.11, because of
redefinition of typedef 'KEYBOX_HANDLE'
-----------------------+--------------------
 Reporter:  ballapete  |      Owner:  (none)
     Type:  defect     |     Status:  new
 Priority:  Normal     |  Milestone:
Component:  ports      |    Version:  2.7.1
 Keywords:  tiger      |       Port:  gnupg2
-----------------------+--------------------
 {{{
 /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..
 -DLOCALEDIR=\"/opt/local/share/locale\"
 -DGNUPG_BINDIR="\"/opt/local/bin\""
 -DGNUPG_LIBEXECDIR="\"/opt/local/libexec\""
 -DGNUPG_LIBDIR="\"/opt/local/lib/gnupg\""
 -DGNUPG_DATADIR="\"/opt/local/share/gnupg\""
 -DGNUPG_SYSCONFDIR="\"/opt/local/etc/gnupg\""
 -DGNUPG_LOCALSTATEDIR="\"/opt/local/var\""
 -DGNUPG_DEFAULT_PINENTRY="\"/opt/local/bin/pinentry\""
 -I/opt/local/include -I/opt/local/include -I/opt/local/include
 -DKEYBOX_WITH_X509=1 -I/opt/local/include -I/opt/local/include   -Wall
 -Wno-pointer-sign -Wpointer-arith -pipe -Os -arch ppc -MT keyboxd-backend-
 support.o -MD -MP -MF .deps/keyboxd-backend-support.Tpo -c -o keyboxd-
 backend-support.o `test -f 'backend-support.c' || echo './'`backend-
 support.c
 In file included from keybox-defs.h:37,
                  from backend-support.c:32:
 keybox.h:36: error: redefinition of typedef 'KEYBOX_HANDLE'
 backend.h:28: error: previous declaration of 'KEYBOX_HANDLE' was here
 make[2]: *** [keyboxd-backend-support.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_mail_gnupg2/gnupg2/work/gnupg-2.3.2/kbx'
 make[1]: *** [all-recursive] Error 1
 make[1]: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_mail_gnupg2/gnupg2/work/gnupg-2.3.2'
 make: *** [all] Error 2
 make: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_mail_gnupg2/gnupg2/work/gnupg-2.3.2'
 Command failed:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_mail_gnupg2/gnupg2/work/gnupg-2.3.2"
 && /usr/bin/make -j1 -w all
 Exit code: 2
 Error: Failed to build gnupg2: command execution failed
 }}}

 Pre-compiling the C source file I get:

 {{{
 # 25 "backend.h" 2


 struct keybox_handle;
 typedef struct keybox_handle *KEYBOX_HANDLE;

 .
 .
 .

 # 30 "keybox.h" 2






 typedef struct keybox_handle *KEYBOX_HANDLE;

 }}}

 gnupg-2.3.2/kbx/keybox.h has:

 {{{
     1   /* keybox.h - Keybox operations
     2    * Copyright (C) 2001, 2003, 2012 Free Software Foundation, Inc.
     3    *
     4    * This file is part of GnuPG.
     5    *
     6    * GnuPG is free software; you can redistribute it and/or modify
     7    * it under the terms of the GNU General Public License as
 published by
     8    * the Free Software Foundation; either version 3 of the License,
 or
     9    * (at your option) any later version.
    10    *
    11    * GnuPG is distributed in the hope that it will be useful,
    12    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    13    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    14    * GNU General Public License for more details.
    15    *
    16    * You should have received a copy of the GNU General Public
 License
    17    * along with this program; if not, see
 <https://www.gnu.org/licenses/>.
    18    */
    19
    20   #ifndef KEYBOX_H
    21   #define KEYBOX_H 1
    22   #ifdef __cplusplus
    23   extern "C" {
    24   #if 0
    25    }
    26   #endif
    27   #endif
    28
    29   #include "../common/iobuf.h"
    30   #include "keybox-search-desc.h"
    31
    32   #ifdef KEYBOX_WITH_X509
    33   # include <ksba.h>
    34   #endif
    35
    36   typedef struct keybox_handle *KEYBOX_HANDLE;
    37
 }}}

 and gnupg-2.3.2/kbx/backend.c has:

 {{{
     1   /* backend.h - Definitions for keyboxd backends
     2    * Copyright (C) 2019 g10 Code GmbH
     3    *
     4    * This file is part of GnuPG.
     5    *
     6    * GnuPG is free software; you can redistribute it and/or modify
     7    * it under the terms of the GNU General Public License as
 published by
     8    * the Free Software Foundation; either version 3 of the License,
 or
     9    * (at your option) any later version.
    10    *
    11    * GnuPG is distributed in the hope that it will be useful,
    12    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    13    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    14    * GNU General Public License for more details.
    15    *
    16    * You should have received a copy of the GNU General Public
 License
    17    * along with this program; if not, see
 <https://www.gnu.org/licenses/>.
    18    */
    19
    20   #ifndef KBX_BACKEND_H
    21   #define KBX_BACKEND_H
    22
    23   #include <ksba.h>
    24   #include "keybox-search-desc.h"
    25
    26   /* Forward declaration of the keybox handle type.  */
    27   struct keybox_handle;
    28   typedef struct keybox_handle *KEYBOX_HANDLE;
    29
 }}}

 They both are included from gnupg-2.3.2/kbx/backend-support.c

 {{{
     1   /* backend-support.c - Supporting functions for the backend.
     2    * Copyright (C) 2019 g10 Code GmbH
     3    *
     4    * This file is part of GnuPG.
     5    *
     6    * GnuPG is free software; you can redistribute it and/or modify
     7    * it under the terms of the GNU General Public License as
 published by
     8    * the Free Software Foundation; either version 3 of the License,
 or
     9    * (at your option) any later version.
    10    *
    11    * GnuPG is distributed in the hope that it will be useful,
    12    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    13    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    14    * GNU General Public License for more details.
    15    *
    16    * You should have received a copy of the GNU General Public
 License
    17    * along with this program; if not, see
 <https://www.gnu.org/licenses/>.
    18    * SPDX-License-Identifier: GPL-3.0+
    19    */
    20
    21   #include <config.h>
    22   #include <stdio.h>
    23   #include <stdlib.h>
    24   #include <stddef.h>
    25   #include <string.h>
    26
    27   #include "keyboxd.h"
    28   #include "../common/i18n.h"
    29   #include "../common/asshelp.h"
    30   #include "../common/tlv.h"
    31   #include "backend.h"
    32   #include "keybox-defs.h"
    33
 }}}

 and gnupg-2.3.2/kbx/keybox-defs.h

 {{{
     1   /* keybox-defs.h - internal Keybox definitions
     2    *      Copyright (C) 2001, 2004 Free Software Foundation, Inc.
     3    *
     4    * This file is part of GnuPG.
     5    *
     6    * GnuPG is free software; you can redistribute it and/or modify
     7    * it under the terms of the GNU General Public License as
 published by
     8    * the Free Software Foundation; either version 3 of the License,
 or
     9    * (at your option) any later version.
    10    *
    11    * GnuPG is distributed in the hope that it will be useful,
    12    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    13    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    14    * GNU General Public License for more details.
    15    *
    16    * You should have received a copy of the GNU General Public
 License
    17    * along with this program; if not, see
 <https://www.gnu.org/licenses/>.
    18    */
    19
    20   #ifndef KEYBOX_DEFS_H
    21   #define KEYBOX_DEFS_H 1
    22
    23   #ifdef GPG_ERR_SOURCE_DEFAULT
    24   # if GPG_ERR_SOURCE_DEFAULT != GPG_ERR_SOURCE_KEYBOX
    25   #  error GPG_ERR_SOURCE_DEFAULT already defined
    26   # endif
    27   #else
    28   # define GPG_ERR_SOURCE_DEFAULT  GPG_ERR_SOURCE_KEYBOX
    29   #endif
    30   #include <gpg-error.h>
    31   #define map_assuan_err(a) \
    32           map_assuan_err_with_source (GPG_ERR_SOURCE_DEFAULT, (a))
    33
    34   #include <sys/types.h> /* off_t */
    35
    36   #include "../common/util.h"
    37   #include "keybox.h"
    38
 }}}

 The one `typedef` too much can simply be omitted from `keybox.h`, I think…

-- 
Ticket URL: <https://trac.macports.org/ticket/63547>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list