awesomized / libmemcached

Resurrection of libmemcached
https://awesomized.github.io/libmemcached/
BSD 3-Clause "New" or "Revised" License
45 stars 26 forks source link

Build failure #113

Closed remicollet closed 3 years ago

remicollet commented 3 years ago

ON Fedora 35 using GCC 11.1 and glibc 2.33.9000

[ 78%] Building CXX object test/CMakeFiles/runtests.dir/tests/bin/memcp.cpp.o
cd /builddir/build/BUILD/libmemcached-0ff88be3322a493773956028d4022d995f3cb193/x86_64-redhat-linux-gnu/test && /usr/bin/g++ -DDEBUG=0 -D_GNU_SOURCE -I/builddir/build/BUILD/libmemcached-0ff88be3322a493773956028d4022d995f3cb193 -I/builddir/build/BUILD/libmemcached-0ff88be3322a493773956028d4022d995f3cb193/x86_64-redhat-linux-gnu -I/builddir/build/BUILD/libmemcached-0ff88be3322a493773956028d4022d995f3cb193/src -I/builddir/build/BUILD/libmemcached-0ff88be3322a493773956028d4022d995f3cb193/x86_64-redhat-linux-gnu/src -I/builddir/build/BUILD/libmemcached-0ff88be3322a493773956028d4022d995f3cb193/include -I/builddir/build/BUILD/libmemcached-0ff88be3322a493773956028d4022d995f3cb193/x86_64-redhat-linux-gnu/include -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -DNDEBUG -fPIE -fvisibility=hidden -std=gnu++17 -MD -MT test/CMakeFiles/runtests.dir/tests/bin/memcp.cpp.o -MF CMakeFiles/runtests.dir/tests/bin/memcp.cpp.o.d -o CMakeFiles/runtests.dir/tests/bin/memcp.cpp.o -c /builddir/build/BUILD/libmemcached-0ff88be3322a493773956028d4022d995f3cb193/test/tests/bin/memcp.cpp
In file included from /usr/include/signal.h:328,
                 from /builddir/build/BUILD/libmemcached-0ff88be3322a493773956028d4022d995f3cb193/test/lib/catch.hpp:8039,
                 from /builddir/build/BUILD/libmemcached-0ff88be3322a493773956028d4022d995f3cb193/test/main.cpp:17:
/builddir/build/BUILD/libmemcached-0ff88be3322a493773956028d4022d995f3cb193/test/lib/catch.hpp:10827:58: error: call to non-'constexpr' function 'long int sysconf(int)'
10827 |     static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
      |                                                          ^~~~~~~~~~~
In file included from /usr/include/bits/sigstksz.h:24,
                 from /usr/include/signal.h:328,
                 from /builddir/build/BUILD/libmemcached-0ff88be3322a493773956028d4022d995f3cb193/test/lib/catch.hpp:8039,
                 from /builddir/build/BUILD/libmemcached-0ff88be3322a493773956028d4022d995f3cb193/test/main.cpp:17:
/usr/include/unistd.h:635:17: note: 'long int sysconf(int)' declared here
  635 | extern long int sysconf (int __name) __THROW;
      |                 ^~~~~~~
In file included from /builddir/build/BUILD/libmemcached-0ff88be3322a493773956028d4022d995f3cb193/test/main.cpp:17:
/builddir/build/BUILD/libmemcached-0ff88be3322a493773956028d4022d995f3cb193/test/lib/catch.hpp:10886:45: error: size of array 'altStackMem' is not an integral constant-expression
10886 |     char FatalConditionHandler::altStackMem[sigStackSize] = {};
      |                                             ^~~~~~~~~~~~

Full log on scratch build https://koji.fedoraproject.org/koji/taskinfo?taskID=70729172

May be related to not stable version used in F35, so here for information (notice F34 build is OK, also using GCC 11.1)

remicollet commented 3 years ago

Using trivial fix (not using MINSIGSTKSZ, but always 32768) allow build to pass on x86_64, aarch64, armv7hl, i686, ppc64le and s390x https://koji.fedoraproject.org/koji/taskinfo?taskID=70730744

m6w6 commented 3 years ago

Thanks!

Gotta upgrade bundled Catch2: https://github.com/catchorg/Catch2/releases/tag/v2.13.5

omega13a commented 3 years ago

Using trivial fix (not using MINSIGSTKSZ, but always 32768) allow build to pass on x86_64, aarch64, armv7hl, i686, ppc64le and s390x https://koji.fedoraproject.org/koji/taskinfo?taskID=70730744

Do you have the patch to allow it to build?

remicollet commented 3 years ago

Do you have the patch to allow it to build?

Not really a patch (a sed command before the build)

-    static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
+    static constexpr std::size_t sigStackSize = 32768;
remicollet commented 3 years ago

Thanks!

Gotta upgrade bundled Catch2: https://github.com/catchorg/Catch2/releases/tag/v2.13.5

Indeed, from Changelog for 2.13.5

*MINSIGSTKSZwas no longer usable in constexpr context.

remicollet commented 3 years ago

I confirm, build passes using 2.13.5