Created attachment 795592 [details] Failed build One of these components make clucene fail to build due to multiple problems, mostly related to NULL. FreeBSD solved this problem by changing NULL to 0 in some instances and adding or subtracting a few lines of code. I solved this problem by applying the following patches, with minor modifications: https://cgit.freebsd.org/ports/tree/textproc/clucene/files/patch-src__core__CLucene__index__DocumentsWriter.cpp https://cgit.freebsd.org/ports/tree/textproc/clucene/files/patch-src__core__CLucene__util__VoidMap.h Please find the modified versions attached. Build.log is for a failed build after I tried patching only VoidMap.h by myself. It needed further modifications. As such, affected users might initially stumble upon a different error.
Created attachment 795595 [details, diff] Modifications to VoidMap.h file
Created attachment 795598 [details, diff] Modifications to DocumentsWriter.cpp file
[31mFAILED: [0msrc/core/CMakeFiles/clucene-core.dir/CLucene/index/DocumentsWriter.o /usr/lib/llvm/14/bin/clang++ -DMAKE_CLUCENE_CORE_LIB -Dclucene_core_EXPORTS -I/tmp/portage/dev-cpp/clucene-2.3.3.4-r7/work/clucene-core-2.3.3.4/src/shared -I/tmp/portage/dev-cpp/clucene-2.3.3.4-r7/work/clucene-2.3.3.4_build/src/shared -I/tmp/portage/dev-cpp/clucene-2.3.3.4-r7/work/clucene-core-2.3.3.4/src/core -march=native -O3 -pipe -mllvm -polly -flto=thin -fPIC -D_REENTRANT -D_UCS2 -D_UNICODE -MD -MT src/core/CMakeFiles/clucene-core.dir/CLucene/index/DocumentsWriter.o -MF src/core/CMakeFiles/clucene-core.dir/CLucene/index/DocumentsWriter.o.d -o src/core/CMakeFiles/clucene-core.dir/CLucene/index/DocumentsWriter.o -c /tmp/portage/dev-cpp/clucene-2.3.3.4-r7/work/clucene-core-2.3.3.4/src/core/CLucene/index/DocumentsWriter.cpp /tmp/portage/dev-cpp/clucene-2.3.3.4-r7/work/clucene-core-2.3.3.4/src/core/CLucene/index/DocumentsWriter.cpp:128:11: error: no matching function for call to 'memset' memset(this->postingsFreeListDW.values + this->postingsFreeCountDW ^~~~~~ /usr/include/sched.h:83:7: note: candidate function not viable: no known conversion from 'std::nullptr_t' to 'int' for 2nd argument void *memset (void *, int, size_t);
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe27109c7a1359fd22d5f9f0cbe9d76919e2cea0 commit fe27109c7a1359fd22d5f9f0cbe9d76919e2cea0 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-07-30 02:29:06 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-07-30 02:29:06 +0000 dev-cpp/clucene: fix build w/ libcxx Use FreeBSD's patches. Closes: https://bugs.gentoo.org/862195 Signed-off-by: Sam James <sam@gentoo.org> dev-cpp/clucene/clucene-2.3.3.4-r8.ebuild | 66 ++++++++++++++++++++++ dev-cpp/clucene/files/clucene-2.3.3.4-libcxx.patch | 48 ++++++++++++++++ 2 files changed, 114 insertions(+)