Opened 19 months ago

Closed 17 months ago

Last modified 17 months ago

#65877 closed defect (fixed)

gpgme @1.17.1 does not build on PPC Tiger, Mac OS X 10.4.11, because "ath.h:80:36: error: unknown type name 'fd_set'; did you mean 'nfds_t'?'"

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: kencu (Ken)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: tiger ppc Cc:
Port: gpgme

Description

ath.h:80:36: error: unknown type name 'fd_set'; did you mean 'nfds_t'?
 gpgme_ssize_t ath_select (int nfd, fd_set *rset, fd_set *wset, fd_set *eset,
                                    ^~~~~~
                                    nfds_t
ath.h:80:50: error: unknown type name 'fd_set'; did you mean 'nfds_t'?
 gpgme_ssize_t ath_select (int nfd, fd_set *rset, fd_set *wset, fd_set *eset,
                                                  ^~~~~~
                                                  nfds_t
ath.h:80:64: error: unknown type name 'fd_set'; did you mean 'nfds_t'?
 gpgme_ssize_t ath_select (int nfd, fd_set *rset, fd_set *wset, fd_set *eset,
                                                                ^~~~~~
                                                                nfds_t
In file included from assuan-support.c:35:0:
debug.h: In function '_trace_sysres_off_t':
debug.h:167:61: warning: format '%ld' expects argument of type 'long int', but argument 8 has type 'gpgme_off_t {aka long long int}' [-Wformat=]
     _gpgme_debug (NULL, lvl, 3, func, NULL, NULL, "result=%ld", res);
                                                           ~~^
                                                           %lld
assuan-support.c: At top level:
cc1: warning: unrecognized command line option '-Wno-sizeof-pointer-div'
make[1]: *** [assuan-support.lo] 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_devel_gpgme/gpgme/work/gpgme-1.17.1/src'

This struct seems to be defined in /usr/include/sys/select.h:

    119 typedef struct fd_set {
    120         __int32_t       fds_bits[__DARWIN_howmany(FD_SETSIZE, __DARWIN_NFDBITS)];
    121 } fd_set;
    122 
    123 #define FD_SET(n, p)    ((p)->fds_bits[(n)/__DARWIN_NFDBITS] |= (1<<((n) % __DARWIN_NFDBITS)))
    124 #define FD_CLR(n, p)    ((p)->fds_bits[(n)/__DARWIN_NFDBITS] &= ~(1<<((n) % __DARWIN_NFDBITS)))
    125 #define FD_ISSET(n, p)  ((p)->fds_bits[(n)/__DARWIN_NFDBITS] & (1<<((n) % __DARWIN_NFDBITS)))

Attachments (2)

main.log (296.8 KB) - added by ballapete (Peter "Pete" Dyballa) 19 months ago.
Main.log from Tiger PPC, Mac OS X 10.4.11
patch-src_ath.h-fd_set.diff (1.2 KB) - added by ballapete (Peter "Pete" Dyballa) 19 months ago.
Patch to remove the use of fd_set in src/ath.h, at least needed on Tiger, Mac OS X 10.4

Download all attachments as: .zip

Change History (8)

Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Main.log from Tiger PPC, Mac OS X 10.4.11

comment:1 Changed 19 months ago by jmroot (Joshua Root)

Probably introduced by this change: https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=commitdiff;h=8148237cb4ae20755c06a44d71761c7030973c3d

It looks like they forgot to wrap the declaration of ath_select in ath.h with if !defined(HAVE_POLL_H). Note that 10.8 and older have a buggy poll implementation which will potentially be a problem for this port. It may be best to disable use of poll on those OS versions and let it fall back to using select.

Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

Attachment: patch-src_ath.h-fd_set.diff added

Patch to remove the use of fd_set in src/ath.h, at least needed on Tiger, Mac OS X 10.4

comment:2 Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

The submitted patch allows to build gpgme here on PPC Tiger, Mac OS X 10.4.11.

comment:3 Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

Mac OS X 10.5.8, Leopard has the same error.

comment:4 in reply to:  3 Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

Replying to ballapete:

Sorry! I meant the version @1.18.0_0 which has the same failure and the same cure.

comment:5 Changed 17 months ago by kencu (Ken)

Owner: set to kencu
Resolution: fixed
Status: newclosed

In 008a3a69aa93ac53a081b80a4a325eb55b9ca8c6/macports-ports (master):

gpgme: fix build on Tiger

the <sys/select.h> header is not being pulled in on
Tiger as it is on newer systems. cf port:libassuan

closes: #65877

comment:6 Changed 17 months ago by kencu (Ken)

noted that POLL should be disabled on older system.

Note: See TracTickets for help on using tickets.