pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
folly: update to latest, still doesn't build
Module Name: pkgsrc-wip
Committed By: Thomas Klausner <wiz%NetBSD.org@localhost>
Pushed By: wiz
Date: Mon Aug 19 22:05:45 2024 +0200
Changeset: c910f5d2cdb2325fe265864df936ac85e9c33dc9
Modified Files:
folly/Makefile
folly/TODO
folly/distinfo
folly/patches/patch-folly_Memory.h
Added Files:
folly/patches/patch-folly_debugging_symbolizer_Elf.cpp
folly/patches/patch-folly_debugging_symbolizer_SignalHandler.cpp
folly/patches/patch-folly_io_async_AsyncUDPSocket.cpp
folly/patches/patch-folly_portability_Stdlib.cpp
folly/patches/patch-folly_system_MemoryMapping.h
Removed Files:
folly/patches/patch-folly_experimental_EnvUtil.cpp
Log Message:
folly: update to latest, still doesn't build
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=c910f5d2cdb2325fe265864df936ac85e9c33dc9
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
folly/Makefile | 2 +-
folly/TODO | 78 +++++++++++++-
folly/distinfo | 14 ++-
folly/patches/patch-folly_Memory.h | 17 +--
.../patch-folly_debugging_symbolizer_Elf.cpp | 15 +++
...ch-folly_debugging_symbolizer_SignalHandler.cpp | 114 +++++++++++++++++++++
folly/patches/patch-folly_experimental_EnvUtil.cpp | 17 ---
.../patch-folly_io_async_AsyncUDPSocket.cpp | 22 ++++
folly/patches/patch-folly_portability_Stdlib.cpp | 17 +++
folly/patches/patch-folly_system_MemoryMapping.h | 17 +++
10 files changed, 281 insertions(+), 32 deletions(-)
diffs:
diff --git a/folly/Makefile b/folly/Makefile
index 283a586c35..b8ca1f3202 100644
--- a/folly/Makefile
+++ b/folly/Makefile
@@ -1,6 +1,6 @@
# $NetBSD$
-DISTNAME= folly-2023.11.20.00
+DISTNAME= folly-2024.08.19.00
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GITHUB:=facebook/}
GITHUB_TAG= v${PKGVERSION_NOREV}
diff --git a/folly/TODO b/folly/TODO
index 6e40eb09b4..4a160899df 100644
--- a/folly/TODO
+++ b/folly/TODO
@@ -1 +1,77 @@
-Doesn't build on NetBSD.
+In file included from /scratch/wip/folly/work/folly-2024.08.19.00/folly/system/ThreadId.cpp:21:
+/scratch/wip/folly/work/folly-2024.08.19.00/folly/system/ThreadId.cpp: In function 'uint64_t folly::detail::getOSThreadIDSlow()':
+/scratch/wip/folly/work/folly-2024.08.19.00/folly/portability/SysSyscall.h:35:26: error: '__NR_gettid' was not declared in this scope
+ 35 | #define FOLLY_SYS_gettid __NR_gettid
+ | ^~~~~~~~~~~
+/scratch/wip/folly/work/folly-2024.08.19.00/folly/system/ThreadId.cpp:55:27: note: in expansion of macro 'FOLLY_SYS_gettid'
+ 55 | return uint64_t(syscall(FOLLY_SYS_gettid));
+ | ^~~~~~~~~~~~~~~~
+/scratch/wip/folly/work/folly-2024.08.19.00/folly/net/NetOps.cpp:44:27: error: 'int (* recvmmsg)(...)' redeclared as different kind of entity
+ 44 | static int (*recvmmsg)(...) = nullptr;
+ | ^
+In file included from /usr/include/netinet6/in6.h:73,
+ from /usr/include/netinet/in.h:377,
+ from /usr/include/arpa/inet.h:69,
+ from /scratch/wip/folly/work/folly-2024.08.19.00/folly/net/NetOps.h:94,
+ from /scratch/wip/folly/work/folly-2024.08.19.00/folly/net/NetOps.cpp:17:
+/usr/include/sys/socket.h:653:9: note: previous declaration 'int recvmmsg(int, mmsghdr*, unsigned int, unsigned int, timespec*)'
+ 653 | int recvmmsg(int, struct mmsghdr *, unsigned int, unsigned int,
+ | ^~~~~~~~
+/scratch/wip/folly/work/folly-2024.08.19.00/folly/net/NetOps.cpp:45:27: error: 'int (* sendmmsg)(...)' redeclared as different kind of entity
+ 45 | static int (*sendmmsg)(...) = nullptr;
+ | ^
+/usr/include/sys/socket.h:651:9: note: previous declaration 'int sendmmsg(int, mmsghdr*, unsigned int, unsigned int)'
+ 651 | int sendmmsg(int, struct mmsghdr *, unsigned int, unsigned int);
+ | ^~~~~~~~
+/scratch/wip/folly/work/folly-2024.08.19.00/folly/net/NetOps.cpp: In function 'int folly::netops::sendmmsg(folly::NetworkSocket, mmsghdr*, unsigned int, int)':
+/scratch/wip/folly/work/folly-2024.08.19.00/folly/net/NetOps.cpp:547:43: warning: the address of 'int sendmmsg(int, mmsghdr*, unsigned int, unsigned int)' will never be NULL [-Waddress]
+ 547 | if (reinterpret_cast<void*>(::sendmmsg) != nullptr) {
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
+/usr/include/sys/socket.h:651:9: note: 'int sendmmsg(int, mmsghdr*, unsigned int, unsigned int)' declared here
+ 651 | int sendmmsg(int, struct mmsghdr *, unsigned int, unsigned int);
+ | ^~~~~~~~
+--- CMakeFiles/folly_base.dir/folly/system/ThreadId.cpp.o ---
+*** [CMakeFiles/folly_base.dir/folly/system/ThreadId.cpp.o] Error code 1
+
+make[2]: stopped making "CMakeFiles/folly_base.dir/build" in /scratch/wip/folly/work/folly-2024.08.19.00/cmake-pkgsrc-build
+--- CMakeFiles/folly_base.dir/folly/net/NetOps.cpp.o ---
+*** [CMakeFiles/folly_base.dir/folly/net/NetOps.cpp.o] Error code 1
+
+make[2]: stopped making "CMakeFiles/folly_base.dir/build" in /scratch/wip/folly/work/folly-2024.08.19.00/cmake-pkgsrc-build
+/scratch/wip/folly/work/folly-2024.08.19.00/folly/debugging/symbolizer/Elf.cpp: In member function 'folly::symbolizer::ElfFile::OpenResult folly::symbolizer::ElfFile::init()':
+/scratch/wip/folly/work/folly-2024.08.19.00/folly/debugging/symbolizer/Elf.cpp:249:27: error: unable to find numeric literal operator 'operator""FOLLY_ELF_NATIVE_CLASS'
+ 249 | #define EXPECTED_CLASS P1(ELFCLASS, FOLLY_ELF_NATIVE_CLASS)
+ | ^~~~~~~~
+/scratch/wip/folly/work/folly-2024.08.19.00/folly/debugging/symbolizer/Elf.cpp:251:18: note: in definition of macro 'P2'
+ 251 | #define P2(a, b) a##b
+ | ^
+/scratch/wip/folly/work/folly-2024.08.19.00/folly/debugging/symbolizer/Elf.cpp:249:24: note: in expansion of macro 'P1'
+ 249 | #define EXPECTED_CLASS P1(ELFCLASS, FOLLY_ELF_NATIVE_CLASS)
+ | ^~
+/scratch/wip/folly/work/folly-2024.08.19.00/folly/debugging/symbolizer/Elf.cpp:253:38: note: in expansion of macro 'EXPECTED_CLASS'
+ 253 | if (elfHeader.e_ident[EI_CLASS] != EXPECTED_CLASS) {
+ | ^~~~~~~~~~~~~~
+/scratch/wip/folly/work/folly-2024.08.19.00/folly/system/EnvUtil.cpp: In static member function 'static folly::experimental::EnvironmentState folly::experimental::EnvironmentState::fromCurrentEnvironment()':
+/scratch/wip/folly/work/folly-2024.08.19.00/folly/system/EnvUtil.cpp:30:18: error: 'environ' was not declared in this scope; did you mean 'union'?
+ 30 | for (auto it = environ; it && *it; ++it) {
+ | ^~~~~~~
+ | union
+--- CMakeFiles/folly_base.dir/folly/debugging/symbolizer/Elf.cpp.o ---
+*** [CMakeFiles/folly_base.dir/folly/debugging/symbolizer/Elf.cpp.o] Error code 1
+
+make[2]: stopped making "CMakeFiles/folly_base.dir/build" in /scratch/wip/folly/work/folly-2024.08.19.00/cmake-pkgsrc-build
+--- CMakeFiles/folly_base.dir/folly/system/EnvUtil.cpp.o ---
+*** [CMakeFiles/folly_base.dir/folly/system/EnvUtil.cpp.o] Error code 1
+
+make[2]: stopped making "CMakeFiles/folly_base.dir/build" in /scratch/wip/folly/work/folly-2024.08.19.00/cmake-pkgsrc-build
+In file included from /usr/include/stdio.h:40,
+ from /scratch/wip/folly/work/.buildlink/include/fmt/base.h:17,
+ from /scratch/wip/folly/work/.buildlink/include/fmt/format.h:41,
+ from /scratch/wip/folly/work/.buildlink/include/fmt/core.h:5,
+ from /scratch/wip/folly/work/folly-2024.08.19.00/folly/io/async/fdsock/AsyncFdSocket.cpp:18:
+/scratch/wip/folly/work/folly-2024.08.19.00/folly/io/async/fdsock/AsyncFdSocket.cpp: In function 'bool folly::{anonymous}::receiveFdsFromCMSG(const cmsghdr&, std::vector<folly::File>*)':
+/scratch/wip/folly/work/folly-2024.08.19.00/folly/io/async/fdsock/AsyncFdSocket.cpp:286:59: error: invalid 'static_cast' from type 'const cmsghdr*' to type 'void*'
+ 286 | const auto* data = reinterpret_cast<const int*>((void *)CMSG_DATA(&cmsg));
+ | ^~~~~~~~~
+--- CMakeFiles/folly_base.dir/folly/io/async/fdsock/AsyncFdSocket.cpp.o ---
+*** [CMakeFiles/folly_base.dir/folly/io/async/fdsock/AsyncFdSocket.cpp.o] Error code 1
diff --git a/folly/distinfo b/folly/distinfo
index 9d9e9b0295..27b41adb2b 100644
--- a/folly/distinfo
+++ b/folly/distinfo
@@ -1,9 +1,13 @@
$NetBSD$
-BLAKE2s (folly-2023.11.20.00.tar.gz) = 1b75f0452a75aca70e2a97d224bab657eed4b52264c89a2459c270fbedd35a7e
-SHA512 (folly-2023.11.20.00.tar.gz) = 3b2f8a32065c7867a46cd14983029808ad578bc38153e55674ffd965eece84836b4ee58034c33b33cac6f6b966d13331dc309ad45e2b7e9edb5a47c146781043
-Size (folly-2023.11.20.00.tar.gz) = 3945184 bytes
+BLAKE2s (folly-2024.08.19.00.tar.gz) = 375a3ed3030dc26df11daeba2aec4a1b5b3846a321e1d71d60d739e472848448
+SHA512 (folly-2024.08.19.00.tar.gz) = 1637fe98a16b44d2be68357b1b07b3d95f7950dbc807158ac82ec935c79d8423e6ed24ebaeb99cc6a8505f301819d3c77a04ba818528d2df84e92c42309fd5f5
+Size (folly-2024.08.19.00.tar.gz) = 4169912 bytes
SHA1 (patch-CMake_folly-deps.cmake) = 3b6aad5f0f1b1cd223b9f5c25cee65c7001097dd
-SHA1 (patch-folly_Memory.h) = c5faa5ff1652ab1d206e466841a0ad71818d2b84
+SHA1 (patch-folly_Memory.h) = 5e7ec6c15ec98398b7d30df0319eb0547ae42b21
SHA1 (patch-folly_Subprocess.cpp) = eade5cb85ecb73ffa1232252ce2a99bc2df44cd2
-SHA1 (patch-folly_experimental_EnvUtil.cpp) = 2017f085ebd8b59148bca3df1418891d4c973af1
+SHA1 (patch-folly_debugging_symbolizer_Elf.cpp) = 218668c477b7860f7dc6a7f6c64d3aa77d7ca3a1
+SHA1 (patch-folly_debugging_symbolizer_SignalHandler.cpp) = 64d425efc14a2ef9a4a99b72042478d2a4e22ee9
+SHA1 (patch-folly_io_async_AsyncUDPSocket.cpp) = 1692003c915c73b2ad8bab97549a5d2574c26d03
+SHA1 (patch-folly_portability_Stdlib.cpp) = 25b8641647217447c646f0dfcbb5fe9fb8f593c1
+SHA1 (patch-folly_system_MemoryMapping.h) = fc823c2e47bd862cbbc988e4fe7a6f60f17e7b95
diff --git a/folly/patches/patch-folly_Memory.h b/folly/patches/patch-folly_Memory.h
index 212a7dcabc..8edcc89c77 100644
--- a/folly/patches/patch-folly_Memory.h
+++ b/folly/patches/patch-folly_Memory.h
@@ -1,15 +1,16 @@
$NetBSD$
-Use posix_memalign on NetBSD too.
+NetBSD support.
---- folly/Memory.h.orig 2023-11-19 20:05:55.000000000 +0000
+--- folly/Memory.h.orig 2024-08-17 18:59:35.000000000 +0000
+++ folly/Memory.h
-@@ -48,7 +48,7 @@ namespace folly {
- (defined(__APPLE__) && \
- (__MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_6 || \
- __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_3_0)) || \
-- defined(__FreeBSD__) || defined(__wasm32__)
-+ defined(__FreeBSD__) || defined(__NetBSD__) || defined(__wasm32__)
+@@ -45,7 +45,8 @@ namespace folly {
+ #if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || \
+ (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600) || \
+ (defined(__ANDROID__) && (__ANDROID_API__ > 16)) || \
+- (defined(__APPLE__)) || defined(__FreeBSD__) || defined(__wasm32__)
++ (defined(__APPLE__)) || defined(__FreeBSD__) || \
++ defined(__NetBSD__) || defined(__wasm32__)
inline void* aligned_malloc(size_t size, size_t align) {
// use posix_memalign, but mimic the behaviour of memalign
diff --git a/folly/patches/patch-folly_debugging_symbolizer_Elf.cpp b/folly/patches/patch-folly_debugging_symbolizer_Elf.cpp
new file mode 100644
index 0000000000..d9c4c069ea
--- /dev/null
+++ b/folly/patches/patch-folly_debugging_symbolizer_Elf.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+NetBSD support.
+
+--- folly/debugging/symbolizer/Elf.cpp.orig 2024-08-19 19:44:58.370813805 +0000
++++ folly/debugging/symbolizer/Elf.cpp
+@@ -40,7 +40,7 @@
+
+ #if defined(__ELF_NATIVE_CLASS)
+ #define FOLLY_ELF_NATIVE_CLASS __ELF_NATIVE_CLASS
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__NetBSD_)
+ #if defined(__LP64__)
+ #define FOLLY_ELF_NATIVE_CLASS 64
+ #else
diff --git a/folly/patches/patch-folly_debugging_symbolizer_SignalHandler.cpp b/folly/patches/patch-folly_debugging_symbolizer_SignalHandler.cpp
new file mode 100644
index 0000000000..903e9db48a
--- /dev/null
+++ b/folly/patches/patch-folly_debugging_symbolizer_SignalHandler.cpp
@@ -0,0 +1,114 @@
+$NetBSD$
+
+NetBSD support.
+
+--- folly/debugging/symbolizer/SignalHandler.cpp.orig 2024-08-19 19:38:02.775838120 +0000
++++ folly/debugging/symbolizer/SignalHandler.cpp
+@@ -197,8 +197,8 @@ void dumpTimeInfo() {
+ print("') ***\n");
+ }
+
+-const char* sigill_reason(int si_code) {
+- switch (si_code) {
++const char* sigill_reason(int folly_si_code) {
++ switch (folly_si_code) {
+ case ILL_ILLOPC:
+ return "illegal opcode";
+ case ILL_ILLOPN:
+@@ -221,8 +221,8 @@ const char* sigill_reason(int si_code) {
+ }
+ }
+
+-const char* sigfpe_reason(int si_code) {
+- switch (si_code) {
++const char* sigfpe_reason(int folly_si_code) {
++ switch (folly_si_code) {
+ case FPE_INTDIV:
+ return "integer divide by zero";
+ case FPE_INTOVF:
+@@ -245,8 +245,8 @@ const char* sigfpe_reason(int si_code) {
+ }
+ }
+
+-const char* sigsegv_reason(int si_code) {
+- switch (si_code) {
++const char* sigsegv_reason(int folly_si_code) {
++ switch (folly_si_code) {
+ case SEGV_MAPERR:
+ return "address not mapped to object";
+ case SEGV_ACCERR:
+@@ -257,8 +257,8 @@ const char* sigsegv_reason(int si_code)
+ }
+ }
+
+-const char* sigbus_reason(int si_code) {
+- switch (si_code) {
++const char* sigbus_reason(int folly_si_code) {
++ switch (folly_si_code) {
+ case BUS_ADRALN:
+ return "invalid address alignment";
+ case BUS_ADRERR:
+@@ -273,8 +273,8 @@ const char* sigbus_reason(int si_code) {
+ }
+ }
+
+-const char* sigtrap_reason(int si_code) {
+- switch (si_code) {
++const char* sigtrap_reason(int folly_si_code) {
++ switch (folly_si_code) {
+ case TRAP_BRKPT:
+ return "process breakpoint";
+ case TRAP_TRACE:
+@@ -287,8 +287,8 @@ const char* sigtrap_reason(int si_code)
+ }
+ }
+
+-const char* sigchld_reason(int si_code) {
+- switch (si_code) {
++const char* sigchld_reason(int folly_si_code) {
++ switch (folly_si_code) {
+ case CLD_EXITED:
+ return "child has exited";
+ case CLD_KILLED:
+@@ -307,8 +307,8 @@ const char* sigchld_reason(int si_code)
+ }
+ }
+
+-const char* sigio_reason(int si_code) {
+- switch (si_code) {
++const char* sigio_reason(int folly_si_code) {
++ switch (folly_si_code) {
+ case POLL_IN:
+ return "data input available";
+ case POLL_OUT:
+@@ -327,22 +327,22 @@ const char* sigio_reason(int si_code) {
+ }
+ }
+
+-const char* signal_reason(int signum, int si_code) {
++const char* signal_reason(int signum, int folly_si_code) {
+ switch (signum) {
+ case SIGILL:
+- return sigill_reason(si_code);
++ return sigill_reason(folly_si_code);
+ case SIGFPE:
+- return sigfpe_reason(si_code);
++ return sigfpe_reason(folly_si_code);
+ case SIGSEGV:
+- return sigsegv_reason(si_code);
++ return sigsegv_reason(folly_si_code);
+ case SIGBUS:
+- return sigbus_reason(si_code);
++ return sigbus_reason(folly_si_code);
+ case SIGTRAP:
+- return sigtrap_reason(si_code);
++ return sigtrap_reason(folly_si_code);
+ case SIGCHLD:
+- return sigchld_reason(si_code);
++ return sigchld_reason(folly_si_code);
+ case SIGIO:
+- return sigio_reason(si_code); // aka SIGPOLL
++ return sigio_reason(folly_si_code); // aka SIGPOLL
+
+ default:
+ return nullptr;
diff --git a/folly/patches/patch-folly_experimental_EnvUtil.cpp b/folly/patches/patch-folly_experimental_EnvUtil.cpp
deleted file mode 100644
index 29bfbda828..0000000000
--- a/folly/patches/patch-folly_experimental_EnvUtil.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD$
-
-NetBSD fixes.
-
---- folly/experimental/EnvUtil.cpp.orig 2023-11-22 17:54:59.165151934 +0000
-+++ folly/experimental/EnvUtil.cpp
-@@ -22,6 +22,10 @@
- #include <folly/portability/Stdlib.h>
- #include <folly/portability/Unistd.h>
-
-+#ifdef __NetBSD__
-+extern char **environ;
-+#endif
-+
- using namespace folly;
- using namespace folly::experimental;
-
diff --git a/folly/patches/patch-folly_io_async_AsyncUDPSocket.cpp b/folly/patches/patch-folly_io_async_AsyncUDPSocket.cpp
new file mode 100644
index 0000000000..82e097b7ee
--- /dev/null
+++ b/folly/patches/patch-folly_io_async_AsyncUDPSocket.cpp
@@ -0,0 +1,22 @@
+$NetBSD$
+
+NetBSD support.
+
+--- folly/io/async/AsyncUDPSocket.cpp.orig 2024-08-19 19:46:57.582431959 +0000
++++ folly/io/async/AsyncUDPSocket.cpp
+@@ -263,6 +263,7 @@ void AsyncUDPSocket::init(sa_family_t fa
+ errno);
+ }
+ } else if (family == AF_INET) {
++#ifdef IP_RECVTOS
+ if (netops::setsockopt(
+ socket, IPPROTO_IP, IP_RECVTOS, &flag, sizeof(flag)) != 0) {
+ throw AsyncSocketException(
+@@ -270,6 +271,7 @@ void AsyncUDPSocket::init(sa_family_t fa
+ "failed to set IP_RECVTOS on the socket",
+ errno);
+ }
++#endif
+ }
+ }
+
diff --git a/folly/patches/patch-folly_portability_Stdlib.cpp b/folly/patches/patch-folly_portability_Stdlib.cpp
new file mode 100644
index 0000000000..8348e72a1b
--- /dev/null
+++ b/folly/patches/patch-folly_portability_Stdlib.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+NetBSD support.
+
+--- folly/portability/Stdlib.cpp.orig 2024-08-19 19:49:07.896669823 +0000
++++ folly/portability/Stdlib.cpp
+@@ -147,6 +147,10 @@ int unsetenv(const char* name) {
+ #include <string>
+ #include <vector>
+
++extern "C" {
++extern char **environ;
++}
++
+ extern "C" int clearenv() {
+ std::vector<std::string> data;
+ for (auto it = environ; it && *it; ++it) {
diff --git a/folly/patches/patch-folly_system_MemoryMapping.h b/folly/patches/patch-folly_system_MemoryMapping.h
new file mode 100644
index 0000000000..83bb74300f
--- /dev/null
+++ b/folly/patches/patch-folly_system_MemoryMapping.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+NetBSD support.
+
+--- folly/system/MemoryMapping.h.orig 2024-08-19 19:40:08.467927907 +0000
++++ folly/system/MemoryMapping.h
+@@ -22,6 +22,10 @@
+ #include <folly/Range.h>
+ #include <folly/portability/Unistd.h>
+
++#ifndef off64_t
++#define off64_t off_t
++#endif
++
+ namespace folly {
+
+ /**
Home |
Main Index |
Thread Index |
Old Index