Open barracuda156 opened 2 months ago
Also fails with gcc14
:
[ 7%] Building C object src/bin/tools/CMakeFiles/mimegen.dir/mimegen.c.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build/src/bin/tools && /opt/local/bin/ccache /opt/local/bin/ccache /opt/local/bin/gcc-mp-14 -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing -I/opt/local/include/lua5.1 -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib -pipe -Os -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -fstack-protector-explicit -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -Wdouble-promotion -Wno-unused-parameter -Wstringop-truncation -Wvla -Wno-free-nonheap-object -Wall -Wextra -Wshadow -Wconversion -std=gnu99 -O3 -DNDEBUG -mtune=native -falign-functions=32 -fno-semantic-interposition -fno-asynchronous-unwind-tables -flto=jobserver -ffat-lto-objects -arch ppc -mmacosx-version-min=10.6 -include /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build/lwan-build-config.h -MD -MT src/bin/tools/CMakeFiles/mimegen.dir/mimegen.c.o -MF CMakeFiles/mimegen.dir/mimegen.c.o.d -o CMakeFiles/mimegen.dir/mimegen.c.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/bin/tools/mimegen.c
[ 8%] Linking C executable bin2hex
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build/src/bin/tools && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/bin2hex.dir/link.txt --verbose=ON
[ 10%] Building C object src/bin/tools/CMakeFiles/configdump.dir/__/__/lib/hash.c.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build/src/bin/tools && /opt/local/bin/ccache /opt/local/bin/ccache /opt/local/bin/gcc-mp-14 -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing -I/opt/local/include/lua5.1 -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib -pipe -Os -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -fstack-protector-explicit -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -Wdouble-promotion -Wno-unused-parameter -Wstringop-truncation -Wvla -Wno-free-nonheap-object -Wall -Wextra -Wshadow -Wconversion -std=gnu99 -O3 -DNDEBUG -mtune=native -falign-functions=32 -fno-semantic-interposition -fno-asynchronous-unwind-tables -flto=jobserver -ffat-lto-objects -arch ppc -mmacosx-version-min=10.6 -include /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build/lwan-build-config.h -MD -MT src/bin/tools/CMakeFiles/configdump.dir/__/__/lib/hash.c.o -MF CMakeFiles/configdump.dir/__/__/lib/hash.c.o.d -o CMakeFiles/configdump.dir/__/__/lib/hash.c.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/hash.c
[ 11%] Building C object src/bin/tools/CMakeFiles/configdump.dir/__/__/lib/murmur3.c.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build/src/bin/tools && /opt/local/bin/ccache /opt/local/bin/ccache /opt/local/bin/gcc-mp-14 -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing -I/opt/local/include/lua5.1 -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib -pipe -Os -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -fstack-protector-explicit -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -Wdouble-promotion -Wno-unused-parameter -Wstringop-truncation -Wvla -Wno-free-nonheap-object -Wall -Wextra -Wshadow -Wconversion -std=gnu99 -O3 -DNDEBUG -mtune=native -falign-functions=32 -fno-semantic-interposition -fno-asynchronous-unwind-tables -flto=jobserver -ffat-lto-objects -arch ppc -mmacosx-version-min=10.6 -include /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build/lwan-build-config.h -MD -MT src/bin/tools/CMakeFiles/configdump.dir/__/__/lib/murmur3.c.o -MF CMakeFiles/configdump.dir/__/__/lib/murmur3.c.o.d -o CMakeFiles/configdump.dir/__/__/lib/murmur3.c.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/murmur3.c
/opt/local/bin/ccache /opt/local/bin/gcc-mp-14 -pipe -Os -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -fstack-protector-explicit -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -Wdouble-promotion -Wno-unused-parameter -Wstringop-truncation -Wvla -Wno-free-nonheap-object -Wall -Wextra -Wshadow -Wconversion -std=gnu99 -O3 -DNDEBUG -mtune=native -falign-functions=32 -fno-semantic-interposition -fno-asynchronous-unwind-tables -flto=jobserver -ffat-lto-objects -arch ppc -mmacosx-version-min=10.6 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -Wl,-bind_at_load CMakeFiles/bin2hex.dir/bin2hex.c.o -o bin2hex -Wl,-rpath,/opt/local/lib
[ 12%] Building C object src/bin/tools/CMakeFiles/mimegen.dir/__/__/lib/hash.c.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build/src/bin/tools && /opt/local/bin/ccache /opt/local/bin/ccache /opt/local/bin/gcc-mp-14 -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing -I/opt/local/include/lua5.1 -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib -pipe -Os -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -fstack-protector-explicit -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -Wdouble-promotion -Wno-unused-parameter -Wstringop-truncation -Wvla -Wno-free-nonheap-object -Wall -Wextra -Wshadow -Wconversion -std=gnu99 -O3 -DNDEBUG -mtune=native -falign-functions=32 -fno-semantic-interposition -fno-asynchronous-unwind-tables -flto=jobserver -ffat-lto-objects -arch ppc -mmacosx-version-min=10.6 -include /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build/lwan-build-config.h -MD -MT src/bin/tools/CMakeFiles/mimegen.dir/__/__/lib/hash.c.o -MF CMakeFiles/mimegen.dir/__/__/lib/hash.c.o.d -o CMakeFiles/mimegen.dir/__/__/lib/hash.c.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/hash.c
[ 13%] Building C object src/bin/tools/CMakeFiles/configdump.dir/__/__/lib/missing.c.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build/src/bin/tools && /opt/local/bin/ccache /opt/local/bin/ccache /opt/local/bin/gcc-mp-14 -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing -I/opt/local/include/lua5.1 -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib -pipe -Os -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -fstack-protector-explicit -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -Wdouble-promotion -Wno-unused-parameter -Wstringop-truncation -Wvla -Wno-free-nonheap-object -Wall -Wextra -Wshadow -Wconversion -std=gnu99 -O3 -DNDEBUG -mtune=native -falign-functions=32 -fno-semantic-interposition -fno-asynchronous-unwind-tables -flto=jobserver -ffat-lto-objects -arch ppc -mmacosx-version-min=10.6 -include /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build/lwan-build-config.h -MD -MT src/bin/tools/CMakeFiles/configdump.dir/__/__/lib/missing.c.o -MF CMakeFiles/configdump.dir/__/__/lib/missing.c.o.d -o CMakeFiles/configdump.dir/__/__/lib/missing.c.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing.c
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/hash.c:169:1: error: constructor priorities are not supported
169 | {
| ^
make[2]: *** [src/bin/tools/CMakeFiles/configdump.dir/__/__/lib/hash.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 15%] Building C object src/bin/tools/CMakeFiles/mimegen.dir/__/__/lib/murmur3.c.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build/src/bin/tools && /opt/local/bin/ccache /opt/local/bin/ccache /opt/local/bin/gcc-mp-14 -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing -I/opt/local/include/lua5.1 -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib -pipe -Os -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -fstack-protector-explicit -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -Wdouble-promotion -Wno-unused-parameter -Wstringop-truncation -Wvla -Wno-free-nonheap-object -Wall -Wextra -Wshadow -Wconversion -std=gnu99 -O3 -DNDEBUG -mtune=native -falign-functions=32 -fno-semantic-interposition -fno-asynchronous-unwind-tables -flto=jobserver -ffat-lto-objects -arch ppc -mmacosx-version-min=10.6 -include /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build/lwan-build-config.h -MD -MT src/bin/tools/CMakeFiles/mimegen.dir/__/__/lib/murmur3.c.o -MF CMakeFiles/mimegen.dir/__/__/lib/murmur3.c.o.d -o CMakeFiles/mimegen.dir/__/__/lib/murmur3.c.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/murmur3.c
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/hash.c:169:1: error: constructor priorities are not supported
169 | {
| ^
make[2]: *** [src/bin/tools/CMakeFiles/mimegen.dir/__/__/lib/hash.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 16%] Building C object src/bin/tools/CMakeFiles/mimegen.dir/__/__/lib/missing.c.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build/src/bin/tools && /opt/local/bin/ccache /opt/local/bin/ccache /opt/local/bin/gcc-mp-14 -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing -I/opt/local/include/lua5.1 -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib -pipe -Os -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -fstack-protector-explicit -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -Wdouble-promotion -Wno-unused-parameter -Wstringop-truncation -Wvla -Wno-free-nonheap-object -Wall -Wextra -Wshadow -Wconversion -std=gnu99 -O3 -DNDEBUG -mtune=native -falign-functions=32 -fno-semantic-interposition -fno-asynchronous-unwind-tables -flto=jobserver -ffat-lto-objects -arch ppc -mmacosx-version-min=10.6 -include /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build/lwan-build-config.h -MD -MT src/bin/tools/CMakeFiles/mimegen.dir/__/__/lib/missing.c.o -MF CMakeFiles/mimegen.dir/__/__/lib/missing.c.o.d -o CMakeFiles/mimegen.dir/__/__/lib/missing.c.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing.c
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build'
[ 16%] Built target bin2hex
/usr/bin/make -f src/lib/CMakeFiles/generate_auto_index_icons.dir/build.make src/lib/CMakeFiles/generate_auto_index_icons.dir/depend
make[2]: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build'
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build && /opt/local/bin/cmake -E cmake_depends "Unix Makefiles" /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build/src/lib /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build/src/lib/CMakeFiles/generate_auto_index_icons.dir/DependInfo.cmake "--color="
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build'
/usr/bin/make -f src/lib/CMakeFiles/generate_auto_index_icons.dir/build.make src/lib/CMakeFiles/generate_auto_index_icons.dir/build
make[2]: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build'
[ 17%] Bundling auto-index icons
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build/src/lib && ../bin/tools/bin2hex /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/wwwroot/icons/back.gif back_gif /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/wwwroot/icons/file.gif file_gif /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/wwwroot/icons/folder.gif folder_gif > /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build/auto-index-icons.h
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing.c: In function 'epoll_ctl':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing.c:173:9: warning: conversion to 'uintptr_t' {aka 'long unsigned int'} from 'int' may change the sign of the result [-Wsign-conversion]
173 | EV_SET(&ev, fd, events, flags, 0, 0, udata);
| ^~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing.c:173:9: warning: conversion from 'int' to 'int16_t' {aka 'short int'} may change value [-Wconversion]
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing.c:173:9: warning: conversion from 'int' to 'uint16_t' {aka 'short unsigned int'} may change value [-Wconversion]
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing.c:178:9: warning: conversion to 'uintptr_t' {aka 'long unsigned int'} from 'int' may change the sign of the result [-Wsign-conversion]
178 | EV_SET(&ev, fd, 0, EV_DELETE, 0, 0, 0);
| ^~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing.c: In function 'epoll_wait':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing.c:203:12: warning: ISO C90 forbids variable length array 'evs' [-Wvla]
203 | struct kevent evs[maxevents];
| ^~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing.c: In function 'rawmemchr':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing.c:470:51: warning: 'memchr' specified bound 4294967295 exceeds maximum object size 2147483647 [-Wstringop-overread]
470 | void *rawmemchr(const void *ptr, char c) { return memchr(ptr, c, SIZE_MAX); }
| ^~~~~~~~~~~~~~~~~~~~~~~~
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build'
make[1]: *** [src/bin/tools/CMakeFiles/configdump.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 17%] Built target generate_auto_index_icons
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing.c: In function 'epoll_ctl':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing.c:173:9: warning: conversion to 'uintptr_t' {aka 'long unsigned int'} from 'int' may change the sign of the result [-Wsign-conversion]
173 | EV_SET(&ev, fd, events, flags, 0, 0, udata);
| ^~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing.c:173:9: warning: conversion from 'int' to 'int16_t' {aka 'short int'} may change value [-Wconversion]
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing.c:173:9: warning: conversion from 'int' to 'uint16_t' {aka 'short unsigned int'} may change value [-Wconversion]
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing.c:178:9: warning: conversion to 'uintptr_t' {aka 'long unsigned int'} from 'int' may change the sign of the result [-Wsign-conversion]
178 | EV_SET(&ev, fd, 0, EV_DELETE, 0, 0, 0);
| ^~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing.c: In function 'epoll_wait':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing.c:203:12: warning: ISO C90 forbids variable length array 'evs' [-Wvla]
203 | struct kevent evs[maxevents];
| ^~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing.c: In function 'rawmemchr':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-0.3/src/lib/missing.c:470:51: warning: 'memchr' specified bound 4294967295 exceeds maximum object size 2147483647 [-Wstringop-overread]
470 | void *rawmemchr(const void *ptr, char c) { return memchr(ptr, c, SIZE_MAX); }
| ^~~~~~~~~~~~~~~~~~~~~~~~
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build'
make[1]: *** [src/bin/tools/CMakeFiles/mimegen.dir/all] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build'
make: *** [all] Error 2
It's been a while I've seen someone running Snow Leopard! I unfortunately don't have a Mac anymore (let alone one this old) to maintain Lwan for it. I'll gladly accept patches to ensure it works there, though.
In this case, the fix should be straightforward (probably implementing a LWAN_CONSTRUCTOR_ATTRIBUTE(...)
macro that expands to __attribute__((constructor))
on Darwin, and __attribute__((constructor(arg[0]))
anywhere else, and replacing every __attribute__((constructor))
in the code with that macro. Since I don't have a way to test this (and there might be other errors when building for this 15-year old platform), I can wait for patches that have been tested.
(Also, yes, GCC 4.x is too old and I'm not going to support it, even with patches.)
Thank you for responding.
(Also, yes, GCC 4.x is too old and I'm not going to support it, even with patches.)
This is no problem at all, since we have the modern GCC (and Clang on Intel) on every system from 10.4 up. gcc-4.2 was picked initially, since the code does not ask for any specific C/C++ standard. But since it is expected to fail anyway, we can force using a newer gcc regardless.
af47365ca should have a patch that probably fixes this issue. Eventually this should be fixed a bit better by implementing priorities ourselves, but for now this should be sufficient to unblock you. Please let me know if it works for you.
@lpereira Thank you for following up on this.
Is libucontext
a new requirement? On 0.3 the patch did not apply, and building from master I get this:
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-af47365cab2f638f6beabd0c70cd4beabb4e4dbf/src/3rdparty/libucontext && /opt/local/bin/cmake -E touch /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build/src/lib/libucontext-prefix/src/libucontext-stamp/libucontext-configure
In file included from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-af47365cab2f638f6beabd0c70cd4beabb4e4dbf/src/lib/lwan-array.h:27,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-af47365cab2f638f6beabd0c70cd4beabb4e4dbf/src/lib/lwan.h:36,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-af47365cab2f638f6beabd0c70cd4beabb4e4dbf/src/lib/missing.c:35:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-af47365cab2f638f6beabd0c70cd4beabb4e4dbf/src/lib/lwan-coro.h:32:10: fatal error: libucontext/libucontext.h: No such file or directory
32 | #include <libucontext/libucontext.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-af47365cab2f638f6beabd0c70cd4beabb4e4dbf/src/lib/lwan-array.h:27,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-af47365cab2f638f6beabd0c70cd4beabb4e4dbf/src/lib/lwan.h:36,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-af47365cab2f638f6beabd0c70cd4beabb4e4dbf/src/lib/lwan-private.h:25,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-af47365cab2f638f6beabd0c70cd4beabb4e4dbf/src/lib/lwan-status.c:31:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-af47365cab2f638f6beabd0c70cd4beabb4e4dbf/src/lib/lwan-coro.h:32:10: fatal error: libucontext/libucontext.h: No such file or directory
32 | #include <libucontext/libucontext.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/bin/tools/CMakeFiles/mimegen.dir/__/__/lib/missing.c.o] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build'
make[1]: *** [src/bin/tools/CMakeFiles/mimegen.dir/all] Error 2
Looks like libucontext
is not there in MacPorts, but I can try making a port for it. No idea if it supports macOS though: it refers to glibc in README.
UPD. Well, no, libucontext
is completely broken, and looks like needs assembler to be fixed, as the very minimum.
libucontext is now bundled with lwan, it should work. I've only tested with x86 (by forcing it to build with libucontext), and it worked. We might need to look into this.
Are you building a release version or HEAD?
On Wed, Aug 28, 2024, at 8:54 AM, Sergey Fedorov wrote:
@lpereira https://github.com/lpereira Thank you for following up on this.
Is
libucontext
a new requirement? On 0.3 the patch did not apply, and building from master I get this:
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-af47365cab2f638f6beabd0c70cd4beabb4e4dbf/src/3rdparty/libucontext && /opt/local/bin/cmake -E touch /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build/src/lib/libucontext-prefix/src/libucontext-stamp/libucontext-configure In file included from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-af47365cab2f638f6beabd0c70cd4beabb4e4dbf/src/lib/lwan-array.h:27, from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-af47365cab2f638f6beabd0c70cd4beabb4e4dbf/src/lib/lwan.h:36, from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-af47365cab2f638f6beabd0c70cd4beabb4e4dbf/src/lib/missing.c:35: /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-af47365cab2f638f6beabd0c70cd4beabb4e4dbf/src/lib/lwan-coro.h:32:10: fatal error: libucontext/libucontext.h: No such file or directory 32 | #include <libucontext/libucontext.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-af47365cab2f638f6beabd0c70cd4beabb4e4dbf/src/lib/lwan-array.h:27, from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-af47365cab2f638f6beabd0c70cd4beabb4e4dbf/src/lib/lwan.h:36, from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-af47365cab2f638f6beabd0c70cd4beabb4e4dbf/src/lib/lwan-private.h:25, from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-af47365cab2f638f6beabd0c70cd4beabb4e4dbf/src/lib/lwan-status.c:31: /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/lwan-af47365cab2f638f6beabd0c70cd4beabb4e4dbf/src/lib/lwan-coro.h:32:10: fatal error: libucontext/libucontext.h: No such file or directory 32 | #include <libucontext/libucontext.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [src/bin/tools/CMakeFiles/mimegen.dir/__/__/lib/missing.c.o] Error 1 make[2]: Leaving directory
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_lwan/lwan/work/build' make[1]: *** [src/bin/tools/CMakeFiles/mimegen.dir/all] Error 2Looks like
libucontext` is not there in MacPorts, but I can try making a port for it. No idea if it supports macOS though: it refers to glibc in README.— Reply to this email directly, view it on GitHub https://github.com/lpereira/lwan/issues/369#issuecomment-2315121252, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAADVGI37LR6LVJJAENHXQLZTW27RAVCNFSM6AAAAABNFKMXEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJVGEZDCMRVGI. You are receiving this because you were mentioned.Message ID: @.***>
Try "make libucontext lwan" or something of the sort. The build dependencies seem to be broken, and this should help at least get the includes/libraries right. If the PPC assembly version isn't working, we'll need to open a upstream report with libucontext.
@lpereira It uses ELF ABI unconditionally here: https://github.com/lpereira/lwan/tree/master/src/3rdparty/libucontext/arch/ppc That will not work: https://github.com/kaniini/libucontext/issues/65
It should be fixable, but not something I can do in a few minutes. (It is not just registers defs are incompatible; ucontext functions should be changed, assembler opcodes fixed, and I do not know if it will work in result – obviously, this was never tested outside of Linux and maybe some BSD.)
Won't something like Boost libcontext
possibly work?
P. S. I understand that libucontext
bugs are completely unrelated to this issue, this is just to explain why I cannot test the build straighaway now.
Ahhh, it's an ABI issue. Yeah, I imagine libucontext
has been primarily tested on ELF systems. I know nothing about PPC and I don't have one any longer, so I can't help you there.
On the other hand, I just pushed a fix that should get the build dependencies correct when using ninja
and libucontext
.