Opened 3 months ago

Closed 2 months ago

#69432 closed defect (fixed)

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

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.9.1
Keywords: leopard ppc Cc: gstrauss (Glenn Strauss)
Port: lighttpd

Description

Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_www_lighttpd/lighttpd/work/lighttpd-1.4.74" && ./configure --prefix=/opt/local CC_FOR_BUILD="/usr/bin/gcc-4.2" CFLAGS_FOR_BUILD="-Os -I/opt/local/include/LegacySupport" --with-brotli --with-lua=lua --with-pcre2 --with-xxhash --with-zlib --with-zstd ac_cv_prog_AWK=/usr/bin/awk --with-openssl 
.
.
.
depbase=`echo h2.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
	/bin/sh ../libtool  --tag=CC   --mode=compile /usr/bin/gcc-4.2 -std=gnu99 -DHAVE_CONFIG_H -DHAVE_VERSIONSTAMP_H -DLIBRARY_DIR="\"/opt/local/lib\"" -DSBIN_DIR="\"/opt/local/sbin\"" -I. -I..   -I/opt/local/include -I/opt/local/include/LegacySupport -D_REENTRANT  -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_DEFAULT_SOURCE   -pipe -Os -I/opt/local/include/LegacySupport -arch ppc -pipe -Wall -W -Wshadow -pedantic -MT h2.lo -MD -MP -MF $depbase.Tpo -c -o h2.lo h2.c &&\
	mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  /usr/bin/gcc-4.2 -std=gnu99 -DHAVE_CONFIG_H -DHAVE_VERSIONSTAMP_H -DLIBRARY_DIR=\"/opt/local/lib\" -DSBIN_DIR=\"/opt/local/sbin\" -I. -I.. -I/opt/local/include -I/opt/local/include/LegacySupport -D_REENTRANT -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_DEFAULT_SOURCE -pipe -Os -I/opt/local/include/LegacySupport -arch ppc -pipe -Wall -W -Wshadow -pedantic -MT h2.lo -MD -MP -MF .deps/h2.Tpo -c h2.c  -fno-common -DPIC -o .libs/h2.o
In file included from ls-hpack/lshpack.h:34,
                 from h2.h:10,
                 from h2.c:8:
ls-hpack/lsxpack_header.h:60: warning: type of bit-field 'flags' is a GCC extension
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
In file included from h2.h:10,
                 from h2.c:8:
ls-hpack/lshpack.h:259: warning: data definition has no type or storage class
ls-hpack/lshpack.h:259: warning: type defaults to 'int' in declaration of 'STAILQ_HEAD'
ls-hpack/lshpack.h:259: warning: parameter names (without types) in function declaration
ls-hpack/lshpack.h:280: error: field 'hpe_all_entries' has incomplete type
make[3]: *** [h2.lo] Error 1
make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_www_lighttpd/lighttpd/work/lighttpd-1.4.74/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_www_lighttpd/lighttpd/work/lighttpd-1.4.74/src'
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_www_lighttpd/lighttpd/work/lighttpd-1.4.74'
make: *** [all] Error 2

The mentioend directory, …/lighttpd/work/lighttpd-1.4.74/src/compat, conatains here only the file fastcgi.h.

Attachments (1)

main.log (154.2 KB) - added by ballapete (Peter "Pete" Dyballa) 3 months ago.
Main.log from PPC Leopard, Mac OS X 10.5.8

Download all attachments as: .zip

Change History (7)

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

Attachment: main.log added

Main.log from PPC Leopard, Mac OS X 10.5.8

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

Inclusion of ../compat/sys/queue.h comes from this code in ls-hpack/lshpack.h:

  228	#ifndef STAILQ_FOREACH
  229	
  230	#ifndef SIMPLEQ_FOREACH
  231	#include "../compat/sys/queue.h"
  232	#endif

With GCC7 all builds fine!

comment:2 Changed 3 months ago by ryandesign (Ryan Carsten Schmidt)

Cc: gstrauss added; ryandesign@… removed
Owner: set to ryandesign
Status: newassigned

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

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 #defined. I Think GCC7 should be used… (I have saved the pre-processed output from both compilers.)

comment:4 Changed 3 months ago by gstrauss (Glenn Strauss)

Fixed upstream in lighttpd git.

This works on FreeBSD, Cygwin, and modern MacOS https://git.lighttpd.net/lighttpd/lighttpd1.4/commit/106c4b147b7bc357d8764cddd0bf30fa9e8c0bf9

This fixes the file missing from the release tarball, but won't help you until the next lighttpd release, which is scheduled this month (March). https://git.lighttpd.net/lighttpd/lighttpd1.4/commit/47db644874aab1ade7951e4d78aec589276abe07

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

Replying to gstrauss:

This fixes the file missing from the release tarball, but won't help you until the next lighttpd release, which is scheduled this month (March).

That's alright with me!

comment:6 Changed 2 months ago by gstrauss (Glenn Strauss)

Resolution: fixed
Status: assignedclosed

In 9b9b871dc0e561f3a26ecdff1d555707d71102a1/macports-ports (master):

lighttpd: Update to 1.4.75

Closes: #69432

Note: See TracTickets for help on using tickets.