#63667 closed defect (fixed)
lighttpd @1.4.60 does not build on PPC Leopard because ‘for’ loop initial declaration used outside C99 mode
Reported by: | ballapete (Peter "Pete" Dyballa) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.1 |
Keywords: | leopard | Cc: | mascguy (Christopher Nielsen) |
Port: | lighttpd |
Description
make[3]: Entering 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.60/src' depbase=`echo t/test_array.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ /usr/bin/gcc-4.2 -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 -I/opt/local/include -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -pipe -Os -I/opt/local/include/LegacySupport -arch ppc -pipe -Wall -W -Wshadow -pedantic -MT t/test_array.o -MD -MP -MF $depbase.Tpo -c -o t/test_array.o t/test_array.c &&\ mv -f $depbase.Tpo $depbase.Po depbase=`echo array.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ /usr/bin/gcc-4.2 -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 -I/opt/local/include -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -pipe -Os -I/opt/local/include/LegacySupport -arch ppc -pipe -Wall -W -Wshadow -pedantic -MT array.o -MD -MP -MF $depbase.Tpo -c -o array.o array.c &&\ mv -f $depbase.Tpo $depbase.Po array.c: In function ‘array_free_data’: array.c:138: warning: ISO C90 forbids mixed declarations and code array.c:140: error: ‘for’ loop initial declaration used outside C99 mode array.c: In function ‘array_copy_array’: array.c:155: error: ‘for’ loop initial declaration used outside C99 mode array.c: In function ‘array_reset_data_strings’: array.c:169: warning: ISO C90 forbids mixed declarations and code array.c:172: error: ‘for’ loop initial declaration used outside C99 mode array.c: In function ‘array_caseless_compare’: array.c:197: error: ‘for’ loop initial declaration used outside C99 mode array.c: In function ‘array_extract_element_klen’: array.c:308: warning: ISO C90 forbids mixed declarations and code array.c: In function ‘array_insert_data_at_pos’: array.c:366: warning: ISO C90 forbids mixed declarations and code array.c:371: warning: ISO C90 forbids mixed declarations and code array.c: In function ‘array_get_buf_ptr_ext’: array.c:400: warning: ISO C90 forbids mixed declarations and code array.c: In function ‘array_get_int_ptr’: array.c:411: warning: ISO C90 forbids mixed declarations and code array.c: In function ‘array_get_buf_ptr’: array.c:421: warning: ISO C90 forbids mixed declarations and code array.c: In function ‘array_find_or_insert’: array.c:445: warning: ISO C90 forbids mixed declarations and code array.c: In function ‘array_replace’: array.c:457: warning: ISO C90 forbids mixed declarations and code array.c:459: warning: ISO C90 forbids mixed declarations and code array.c:463: warning: ISO C90 forbids mixed declarations and code array.c: In function ‘array_is_vlist’: array.c:484: error: ‘for’ loop initial declaration used outside C99 mode array.c: In function ‘array_is_kvany’: array.c:492: error: ‘for’ loop initial declaration used outside C99 mode array.c: In function ‘array_is_kvarray’: array.c:500: error: ‘for’ loop initial declaration used outside C99 mode array.c: In function ‘array_is_kvstring’: array.c:508: error: ‘for’ loop initial declaration used outside C99 mode array.c: In function ‘array_match_key_prefix_klen’: array.c:524: error: ‘for’ loop initial declaration used outside C99 mode array.c: In function ‘array_match_key_prefix_nc_klen’: array.c:536: error: ‘for’ loop initial declaration used outside C99 mode array.c: In function ‘array_match_value_prefix’: array.c:565: error: ‘for’ loop initial declaration used outside C99 mode array.c: In function ‘array_match_value_prefix_nc’: array.c:579: error: ‘for’ loop initial declaration used outside C99 mode array.c: In function ‘array_match_key_suffix’: array.c:594: error: ‘for’ loop initial declaration used outside C99 mode array.c: In function ‘array_match_key_suffix_nc’: array.c:609: error: ‘for’ loop initial declaration used outside C99 mode array.c: In function ‘array_match_value_suffix’: array.c:624: error: ‘for’ loop initial declaration used outside C99 mode array.c: In function ‘array_match_value_suffix_nc’: array.c:639: error: ‘for’ loop initial declaration used outside C99 mode array.c: In function ‘array_match_path_or_ext’: array.c:653: error: ‘for’ loop initial declaration used outside C99 mode make[3]: *** [array.o] 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.60/src'
Attachments (1)
Change History (15)
Changed 3 years ago by ballapete (Peter "Pete" Dyballa)
comment:1 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)
array.c
can be compiled with GCC7
.
comment:2 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)
The port
builds with GCC7
. make -k check
fails here:
Testing in build directory: '..' and cwd: '/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.60/tests' preparing infrastructure PASS: prepare.sh ./core-condition.t .. ok ./mod-fastcgi.t ..... ok ./mod-scgi.t ........ ok ./request.t ......... 129/179 # # empty response # Failed test 'cgi-env: SCRIPT_NAME' # at ./request.t line 1361. # # empty response # Failed test 'broken header via perl cgi' # at ./request.t line 1408. ./request.t ......... 154/179 # Looks like you failed 2 tests of 179. ./request.t ......... Dubious, test returned 2 (wstat 512, 0x200) Failed 2/179 subtests (less 1 skipped subtest: 176 okay) Test Summary Report ------------------- ./request.t (Wstat: 512 Tests: 179 Failed: 2) Failed tests: 130, 136 Non-zero exit status: 2 Files=4, Tests=238, 22 wallclock secs ( 0.27 usr 0.08 sys + 2.81 cusr 1.60 csys = 4.76 CPU) Result: FAIL Failed 1/4 test programs. 2/238 subtests failed. FAIL: run-tests.pl cleaning up PASS: cleanup.sh ======================================================================== 1 of 3 tests failed Please report to https://redmine.lighttpd.net/projects/lighttpd/boards/2 ======================================================================== make[3]: *** [Makefile:658: check-TESTS] Fehler 1 make[2]: *** [Makefile:810: check-am] Fehler 2 make[1]: *** [Makefile:565: check-recursive] Fehler 1 make[1]: Das Ziel „check“ wurde wegen Fehlern nicht aktualisiert. make[1]: Für das Ziel „check-am“ ist nichts zu tun. make: *** [Makefile:470: check-recursive] Fehler 1 make: Das Ziel „check“ wurde wegen Fehlern nicht aktualisiert. 6.138u 3.367s 0:38.26 24.8% 0+0k 37+155io 968pf+0w Compilation exited abnormally with code 2 at Sun Oct 24 19:13:34
To me this looks like a failure that has to happen because Apache is not running here.
comment:3 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… removed |
---|---|
Owner: | set to ryandesign |
Status: | new → accepted |
comment:4 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
comment:5 follow-up: 10 Changed 3 years ago by gstrauss (Glenn Strauss)
lighttpd perl-based tests do not require Apache.
For at least the 'cgi-env: SCRIPT_NAME' test, subsequent tests which use the same script do pass, so this seems like a spurious failure. Is it repeatable and does it fail on exactly the same test? If you manually run the tests, is there anything interesting in the error log?
cd tests ./prepare.sh ./request.t less tmp/lighttpd/logs/lighttpd.error.log
I am a lighttpd developer and am happy to make (reasonable) accommodations to assist in backporting. Since I do not frequent macports.org, you're welcome to tag me on github @gstrauss or to post on the lighttpd forums https://redmine.lighttpd.net/projects/lighttpd/boards
comment:6 follow-up: 9 Changed 3 years ago by gstrauss (Glenn Strauss)
BTW, which was the last version of lighttpd that successfully compiled with the ancient compilers? The 'for' loop initial declaration use in array.c (and all over lighttpd code) is not new:
array.c:140: error: ‘for’ loop initial declaration used outside C99 mode
comment:7 Changed 3 years ago by mascguy (Christopher Nielsen)
Cc: | mascguy added |
---|
comment:8 Changed 3 years ago by gstrauss (Glenn Strauss)
@ryandesign Somewhat related, I posted some patches to https://github.com/macports/macports-ports/pull/12658 to address the compiler error for fdlog_st redefinition.
The first patch should be all you need to backport if you want to compile lighttpd using older gcc compilers:
https://git.lighttpd.net/lighttpd/lighttpd1.4/commit/d361f9cca01a815951340a8d6a541d68f3800fb2
and this subsequent patch does a little more cleanup:
https://git.lighttpd.net/lighttpd/lighttpd1.4/commit/563eaea00d22157fe6d539efddd543560eac5ece
comment:9 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)
Replying to gstrauss:
BTW, which was the last version of lighttpd that successfully compiled with the ancient compilers?
lighttpd @1.4.59_0+ssl
? I could not find a bug report, so presumingly it is this one.
comment:10 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)
Replying to gstrauss:
I could run the test manually. Interesting failures might be these:
(connections.c.1707) chunked header invalid chars -> 400 (connections.c.1716) chunked header line too long -> 400 (connections.c.1819) chunked data missing end CRLF -> 400 (connections.c.722) invalid request-line -> sending Status 400 (mod_access.c.90) url denied as we match access_deny /empty-ref.noref (mod_access.c.90) url denied as we match access_deny /image.JPG (mod_access.c.90) url denied as we match access_deny /image.jpg (mod_access.c.90) url denied as we match access_deny /nofile (mod_auth.c.1257) digest: missing field (mod_auth.c.1263) digest: realm mismatch (mod_auth.c.394) warning parsing auth.require 'require' field: 'host' not implemented; field value: group=www|user=jan|host=192.168.2.10 (mod_auth.c.789) decoding base64-string failed = (mod_auth.c.789) decoding base64-string failed \x80mFuOmphb (mod_auth.c.840) password doesn't match for /server-config username: apr-md5 IP: 127.0.0.1 (mod_auth.c.840) password doesn't match for /server-config username: md5 IP: 127.0.0.1 (mod_auth.c.840) password doesn't match for /server-config username: not IP: 127.0.0.1 (mod_auth.c.840) password doesn't match for /server-config username: sha IP: 127.0.0.1 (mod_extforward.c.1110) no forward header found or remote address 127.0.0.1 is NOT a trusted proxy, skipping (request.c.248) invalid character in URI -> 400 (request.c.248) unknown protocol -> 400
or those?
(response.c.164) fd:7 resp: HTTP/1.0 301 Moved Permanently (response.c.164) fd:7 resp: HTTP/1.0 302 Found (response.c.164) fd:7 resp: HTTP/1.0 304 Not Modified (response.c.164) fd:7 resp: HTTP/1.0 400 Bad Request (response.c.164) fd:7 resp: HTTP/1.0 401 Unauthorized (response.c.164) fd:7 resp: HTTP/1.0 403 Forbidden (response.c.164) fd:7 resp: HTTP/1.0 404 Not Found (response.c.164) fd:7 resp: HTTP/1.0 410 Gone (response.c.164) fd:7 resp: HTTP/1.0 413 Payload Too Large (response.c.164) fd:7 resp: HTTP/1.0 502 Bad Gateway (response.c.164) fd:7 resp: HTTP/1.1 206 Partial Content (response.c.164) fd:7 resp: HTTP/1.1 400 Bad Request (response.c.164) fd:7 resp: HTTP/1.1 403 Forbidden (response.c.164) fd:7 resp: HTTP/1.1 416 Range Not Satisfiable
I removed the time stamps from the output lines and ran the remainder through sort -u
in order to have a few thousand repeated lines less zu read. (All in GNU Emacs.)
I am a lighttpd developer and am happy to make (reasonable) accommodations to assist in backporting. Since I do not frequent macports.org, you're welcome to tag me on github @gstrauss or to post on the lighttpd forums https://redmine.lighttpd.net/projects/lighttpd/boards
I really do not know how to tag someone… I usually see tags at products. OK, some people wear products without removing the tags before.
comment:11 Changed 3 years ago by gstrauss (Glenn Strauss)
Well, the output of the tests includes those that are exercising (expected) error cases. The output for the specific tests that are failing might help narrow things down, but if you are really interested in helping to identify how to fix the test, that will require quite a bit more effort. I'll work with you if you open an discussion on https://redmine.lighttpd.net/projects/lighttpd/boards but I think continuing here is off-topic for the original topic of this ticket.
BTW, to tag someone on github is to use the string "@gstrauss" with "@" in front of a username. They get a notification, such as an email, depending on their notification settings.
comment:12 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)
I registered myself – how do I start a discussion? And where? There are four fields available, three too much.
comment:13 Changed 3 years ago by gstrauss (Glenn Strauss)
I'll work with you if you open an discussion on https://redmine.lighttpd.net/projects/lighttpd/boards
comment:14 Changed 3 years ago by gstrauss (Glenn Strauss)
BTW, for the C90 errors in this ticket, autoconf macro AC_PROG_CC_C99 was added back in lighttpd 1.4.62 to assist older systems whose ancient compilers might not default to C99. Reference: https://redmine.lighttpd.net/issues/3116
Main.log from PPC Leopard