Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 917795 - dev-cpp/lucene++-3.0.7* error: no template named 'unary_function' in namespace 'std'
Summary: dev-cpp/lucene++-3.0.7* error: no template named 'unary_function' in namespac...
Status: UNCONFIRMED
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:
Depends on:
Blocks:
 
Reported: 2023-11-23 08:54 UTC by David Carlos Manuelda
Modified: 2023-11-23 12:10 UTC (History)
0 users

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


Attachments
build log (build.log,157.40 KB, text/x-log)
2023-11-23 08:54 UTC, David Carlos Manuelda
Details
emerge --info (emergeinfo.txt,20.70 KB, text/plain)
2023-11-23 08:55 UTC, David Carlos Manuelda
Details
lucene++-3.0.8.ebuild (lucene++-3.0.8.ebuild,751 bytes, application/vnd.gentoo.ebuild)
2023-11-23 08:56 UTC, David Carlos Manuelda
Details
remove-unary-function.patch (remove-unary-function.patch,601 bytes, patch)
2023-11-23 12:10 UTC, David Carlos Manuelda
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Carlos Manuelda 2023-11-23 08:54:58 UTC
Created attachment 875412 [details]
build log

Since c++17 std::unary_function is removed and clang/gcc changing to >c++17 standard nowadays then lucene++ 3.0.7 now fails to compile (tested with clang 17.0.5) with error (full log is attached):

(...)
FAILED: src/core/CMakeFiles/lucene++.dir/analysis/Token.cpp.o 
/usr/lib/ccache/bin/clang++ -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_DATE_TIME_DYN_LINK -DBOOST_DATE_TIME_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_IOSTREAMS_NO_LIB -DBOOST_REGEX_DYN_LINK -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB -DLPP_BUILDING_LIB -Dlucene___EXPORTS -I/tmp/portage/dev-cpp/lucene++-3.0.7-r3/work/LucenePlusPlus-rel_3.0.7_build/include -I/tmp/portage/dev-cpp/lucene++-3.0.7-r3/work/LucenePlusPlus-rel_3.0.7/include -I/tmp/portage/dev-cpp/lucene++-3.0.7-r3/work/LucenePlusPlus-rel_3.0.7/src/core/include  -O2 -pipe -march=native -Wno-unused-command-line-argument -fcf-protection=full -fPIC   -fPIC  -Qunused-arguments -include "/tmp/portage/dev-cpp/lucene++-3.0.7-r3/work/LucenePlusPlus-rel_3.0.7_build/src/core/cotire/lucene++_CXX_prefix.hxx" -MD -MT src/core/CMakeFiles/lucene++.dir/analysis/Token.cpp.o -MF src/core/CMakeFiles/lucene++.dir/analysis/Token.cpp.o.d -o src/core/CMakeFiles/lucene++.dir/analysis/Token.cpp.o -c /tmp/portage/dev-cpp/lucene++-3.0.7-r3/work/LucenePlusPlus-rel_3.0.7/src/core/analysis/Token.cpp
In file included from <built-in>:3:
In file included from /tmp/portage/dev-cpp/lucene++-3.0.7-r3/work/LucenePlusPlus-rel_3.0.7_build/src/core/cotire/lucene++_CXX_prefix.hxx:4:
In file included from /tmp/portage/dev-cpp/lucene++-3.0.7-r3/work/LucenePlusPlus-rel_3.0.7_build/src/core/cotire/lucene++_CXX_prefix.cxx:4:
In file included from /tmp/portage/dev-cpp/lucene++-3.0.7-r3/work/LucenePlusPlus-rel_3.0.7/src/core/include/LuceneInc.h:20:
/tmp/portage/dev-cpp/lucene++-3.0.7-r3/work/LucenePlusPlus-rel_3.0.7/include/Lucene.h:131:26: error: no template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
  131 | struct luceneHash : std::unary_function<TYPE, std::size_t> {
      |                     ~~~~~^~~~~~~~~~~~~~
      |                          __unary_function
/usr/include/c++/v1/__functional/unary_function.h:46:1: note: '__unary_function' declared here
   46 | using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>;
      | ^
In file included from <built-in>:3:
In file included from /tmp/portage/dev-cpp/lucene++-3.0.7-r3/work/LucenePlusPlus-rel_3.0.7_build/src/core/cotire/lucene++_CXX_prefix.hxx:4:
In file included from /tmp/portage/dev-cpp/lucene++-3.0.7-r3/work/LucenePlusPlus-rel_3.0.7_build/src/core/cotire/lucene++_CXX_prefix.cxx:4:
In file included from /tmp/portage/dev-cpp/lucene++-3.0.7-r3/work/LucenePlusPlus-rel_3.0.7/src/core/include/LuceneInc.h:20:
/tmp/portage/dev-cpp/lucene++-3.0.7-r3/work/LucenePlusPlus-rel_3.0.7/include/Lucene.h:138:30: error: no template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
  138 | struct luceneWeakHash : std::unary_function<TYPE, std::size_t> {
      |                         ~~~~~^~~~~~~~~~~~~~
      |                              __unary_function
/usr/include/c++/v1/__functional/unary_function.h:46:1: note: '__unary_function' declared here
   46 | using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>;
      | ^
2 errors generated.
(...)
Comment 1 David Carlos Manuelda 2023-11-23 08:55:15 UTC
Created attachment 875413 [details]
emerge --info
Comment 2 David Carlos Manuelda 2023-11-23 08:56:40 UTC
Created attachment 875414 [details]
lucene++-3.0.8.ebuild

I manually modified current ebuild to the latest version (3.0.8) and it compiles fine so my advise is to just update dev-cpp/lucene++ to 3.0.8 version.
Comment 3 David Carlos Manuelda 2023-11-23 12:10:09 UTC
Created attachment 875421 [details, diff]
remove-unary-function.patch

Alternatively to version update, feel free to add this patch to current version so it just removed this deleted feature