Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 862195 - dev-cpp/clucene: fails to build with libcxx
Summary: dev-cpp/clucene: fails to build with libcxx
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: systemwide-libcxx
  Show dependency tree
 
Reported: 2022-07-29 23:32 UTC by asdfg
Modified: 2022-07-30 02:29 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Failed build (build.log,82.86 KB, text/plain)
2022-07-29 23:32 UTC, asdfg
Details
Modifications to VoidMap.h file (VoidMap.patch,798 bytes, patch)
2022-07-29 23:33 UTC, asdfg
Details | Diff
Modifications to DocumentsWriter.cpp file (DocumentsWriter.patch,442 bytes, patch)
2022-07-29 23:34 UTC, asdfg
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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:

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.
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-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);
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):

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(+)