Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 862195

Summary: dev-cpp/clucene: fails to build with libcxx
Product: Gentoo Linux Reporter: asdfg <andrschwarz>
Component: Current packagesAssignee: No maintainer - Look at if you want to take care of it <maintainer-needed>
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 836220    
Attachments: Failed build
Modifications to VoidMap.h file
Modifications to DocumentsWriter.cpp file

Description asdfg 2022-07-29 23:32:37 UTC
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:

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.
Comment 1 asdfg 2022-07-29 23:33:49 UTC
Created attachment 795595 [details, diff]
Modifications to VoidMap.h file
Comment 2 asdfg 2022-07-29 23:34:29 UTC
Created attachment 795598 [details, diff]
Modifications to DocumentsWriter.cpp file
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-29 23:35:04 UTC
[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- -I/tmp/portage/dev-cpp/clucene- -I/tmp/portage/dev-cpp/clucene-  -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-
/tmp/portage/dev-cpp/clucene- 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);
Comment 4 Larry the Git Cow gentoo-dev 2022-07-30 02:29:18 UTC
The bug has been closed via the following commit(s):

commit fe27109c7a1359fd22d5f9f0cbe9d76919e2cea0
Author:     Sam James <>
AuthorDate: 2022-07-30 02:29:06 +0000
Commit:     Sam James <>
CommitDate: 2022-07-30 02:29:06 +0000

    dev-cpp/clucene: fix build w/ libcxx
    Use FreeBSD's patches.
    Signed-off-by: Sam James <>

 dev-cpp/clucene/clucene-          | 66 ++++++++++++++++++++++
 dev-cpp/clucene/files/clucene- | 48 ++++++++++++++++
 2 files changed, 114 insertions(+)