[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1026755: aws-crt-python FTBFS and wrongly checks hard for MADV_WIPEONFORK==18



Package: aws-crt-python
Version: 0.15.3+dfsg-1
Tags: hppa, patch, ftbfs

Package fails to build like this:
 cd /<<PKGBUILDDIR>>/build/temp.linux-hppa-cpython-311/deps/s2n && /usr/bin/cc -D_POSIX_C_SOURCE=200809L -I/<<PKGBUILDDIR>>/crt/s2n -I/<<PKGBUILDDIR>>/crt/s2n/api -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -g -DNDEBUG -pedantic -std=gnu99 -Wall -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-align -Wwrite-strings -Wno-deprecated-declarations -Wno-unknown-pragmas -Wformat-security -Wno-missing-braces -Wa,--noexecstack -fvisibility=hidden -DS2N_EXPORTS -DS2N_STACKTRACE -DS2N_FEATURES_AVAILABLE -fPIC -DS2N_FALL_THROUGH_SUPPORTED -DS2N___RESTRICT__SUPPORTED -DS2N_MADVISE_SUPPORTED -DS2N_CLONE_SUPPORTED -DS2N_LIBCRYPTO_SUPPORTS_EVP_MD5_SHA1_HASH -DS2N_LIBCRYPTO_SUPPORTS_EVP_RC4 -DS2N_LIBCRYPTO_SUPPORTS_EVP_MD_CTX_SET_PKEY_CTX -MD -MT s2n/CMakeFiles/s2n.dir/utils/s2n_map.c.o -MF CMakeFiles/s2n.dir/utils/s2n_map.c.o.d -o CMakeFiles/s2n.dir/utils/s2n_map.c.o -c /<<PKGBUILDDIR>>/crt/s2n/utils/s2n_map.c
/<<PKGBUILDDIR>>/crt/s2n/utils/s2n_fork_detection.c:51:2: error: #error "MADV_WIPEONFORK is not 18"
   51 | #error "MADV_WIPEONFORK is not 18"
Full log is here:
https://buildd.debian.org/status/fetch.php?pkg=aws-crt-python&arch=hppa&ver=0.15.3%2Bdfsg-1&stamp=1671539403&raw=0

This is the code in: crt/s2n/utils/s2n_fork_detection.c:
#if defined(S2N_MADVISE_SUPPORTED) && defined(MADV_WIPEONFORK)
#if (MADV_WIPEONFORK != 18)
#error "MADV_WIPEONFORK is not 18"
#endif
#else /* defined(S2N_MADVISE_SUPPORTED) && defined(MADV_WIPEONFORK) */
#define MADV_WIPEONFORK 18
#endif

There is no reason to check against 18. parisc is the only arch where
MADV_WIPEONFORK has the value 71.

Can you please drop this patch, or change it to:
#if !((MADV_WIPEONFORK == 18) || (MADV_WIPEONFORK == 71))
#error "MADV_WIPEONFORK has strange number"
#endif

Thanks,
Helge

Reply to: