[MacPorts] #69432: lighttpd @1.4.74 does not build on PPC Leopard, Mac OS X 10.5.8, because of error: ../compat/sys/queue.h: No such file or directory

MacPorts noreply at macports.org
Sat Mar 2 18:24:47 UTC 2024


#69432: lighttpd @1.4.74 does not build on PPC Leopard, Mac OS X 10.5.8, because of
error: ../compat/sys/queue.h: No such file or directory
------------------------+-------------------------
  Reporter:  ballapete  |      Owner:  ryandesign
      Type:  defect     |     Status:  assigned
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:  2.9.1
Resolution:             |   Keywords:  leopard ppc
      Port:  lighttpd   |
------------------------+-------------------------

Comment (by ballapete):

 When `Apple's GCC 4.2` pre-processes `h2.c` with option `-H` it gives:

 {{{
 /opt/local/include/LegacySupport/assert.h:3:2: warning: #include_next is a
 GCC extension
 ..... /usr/include/assert.h
 .... /opt/local/include/LegacySupport/string.h
 In file included from ls-hpack/lsxpack_header.h:10,
                  from ls-hpack/lshpack.h:34,
                  from h2.h:10,
                  from h2.c:8:
 /opt/local/include/LegacySupport/string.h:25:2: warning: #include_next is
 a GCC extension
 ..... /usr/include/string.h
 In file included from h2.h:10,
                  from h2.c:8:
 ls-hpack/lshpack.h:231:33: error: ../compat/sys/queue.h: No such file or
 directory
 . /usr/include/arpa/inet.h
 .. /usr/include/netinet/in.h
 ... /usr/include/sys/socket.h
 .... /usr/include/machine/_param.h
 ..... /usr/include/ppc/_param.h
 ... /usr/include/netinet6/in6.h
 . /opt/local/include/LegacySupport/stdlib.h
 In file included from h2.c:16:
 }}}

 With `GCC7` I get:

 {{{
 /opt/local/include/LegacySupport/assert.h:3:2: warning: #include_next is a
 GCC extension
  #include_next <assert.h>
   ^~~~~~~~~~~~
 ..... /usr/include/assert.h
 .... /opt/local/include/LegacySupport/string.h
 In file included from ls-hpack/lsxpack_header.h:10:0,
                  from ls-hpack/lshpack.h:34,
                  from h2.h:10,
                  from h2.c:8:
 /opt/local/include/LegacySupport/string.h:25:2: warning: #include_next is
 a GCC extension
  #include_next <string.h>
   ^~~~~~~~~~~~
 ..... /usr/include/string.h
 ... /opt/local/include/LegacySupport/sys/queue.h
 In file included from ls-hpack/lshpack.h:224:0,
                  from h2.h:10,
                  from h2.c:8:
 /opt/local/include/LegacySupport/sys/queue.h:25:2: warning: #include_next
 is a GCC extension
  #include_next <sys/queue.h>
   ^~~~~~~~~~~~
 .... /usr/include/sys/queue.h      <<<<<============
 . /usr/include/arpa/inet.h
 .. /usr/include/netinet/in.h
 ... /usr/include/sys/socket.h
 .... /usr/include/machine/_param.h
 ..... /usr/include/ppc/_param.h
 ... /usr/include/netinet6/in6.h
 . /opt/local/include/LegacySupport/stdlib.h
 In file included from h2.c:16:0:
 }}}

 This is because I should have cited from `h2.c`:

 {{{
   222   #ifdef __has_include
   223   #if __has_include(<sys/queue.h>)
   224   #include <sys/queue.h>
   225   #endif
   226   #endif
   227
   228   #ifndef STAILQ_FOREACH
   229
   230   #ifndef SIMPLEQ_FOREACH
   231   #include "../compat/sys/queue.h"
   232   #endif
 }}}

 Then follows

 {{{
   233
   234   /* OpenBSD and older MacOSX might not define STAILQ,
   235    * but ls-hpack usage could use SIMPLEQ as alternative */
   236   #if defined(SIMPLEQ_FOREACH) && !defined(STAILQ_FOREACH)
   237   #define STAILQ_HEAD             SIMPLEQ_HEAD
   238   #define STAILQ_ENTRY            SIMPLEQ_ENTRY
   239   #define STAILQ_INIT             SIMPLEQ_INIT
   240   #define STAILQ_INSERT_TAIL      SIMPLEQ_INSERT_TAIL
   241   #define STAILQ_EMPTY            SIMPLEQ_EMPTY
   242   #define STAILQ_FIRST            SIMPLEQ_FIRST
   243   #define STAILQ_NEXT             SIMPLEQ_NEXT
   244   #define STAILQ_REMOVE_HEAD      SIMPLEQ_REMOVE_HEAD
   245   #define STAILQ_FOREACH          SIMPLEQ_FOREACH
   246   #endif
   247
   248   #endif
 }}}

 On `Leopard SIMPLEQ_FOREACH is not #define`d. I Think `GCC7` should be
 used… (I have saved the pre-processed output from both compilers.)

-- 
Ticket URL: <https://trac.macports.org/ticket/69432#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list