Comments (13)
I haven't seen this error before.
Could you tell me what environment you're running? (os, compiler and version, boost version)
Thanks.
from luceneplusplus.
Build environment:
- openSUSE 13.1 / Tumbleweed
- boost 1.54.0
- GCC 4.8.2
- CMake 2.8.12.2-128.1
from luceneplusplus.
I can’t seem to reproduce this error on my ubuntu setup:
- ubuntu 13.10
- gcc 4.8.1
- boost 1.54.0
- cmake 2.8.11.2
which isn’t drastically different to what you’re running.
I’m not sure if I can do much more on my end, sorry.
On 28 April 2014 15:23, Markus Elfring [email protected] wrote:
Build environment:
- openSUSE 13.1 / Tumbleweed
- boost 1.54.0
- GCC 4.8.2
- CMake 2.8.12.2-128.1
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/55#issuecomment-41557045
.
from luceneplusplus.
How much does the software tool "cotire" matter here?
from luceneplusplus.
I’ve found it very useful for generating precompile headers which speeds up
compile time significantly. I’ve also found that it works very well for a
variety
of compilers, including Visual Studio which is nice.
If it’s causing you problems, you can simply disable it here:
https://github.com/luceneplusplus/LucenePlusPlus/blob/master/CMakeLists.txt#L21
cheers,
Alan.
On 28 April 2014 18:08, Markus Elfring [email protected] wrote:
How much does the software tool "cotire" https://github.com/sakra/cotirematter here?
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/55#issuecomment-41577683
.
from luceneplusplus.
The temporary deactivation of the tool "cotire" does not help here. How do you think about to control its reuse by a CMake option?
Would you like to try out the compiler "g++ 4.9" on your build system in the near future?
from luceneplusplus.
I can confirm this with both boost 1.54 and 1.55, gcc 4.9.1 and clang 3.5.0.
/usr/include/lucene++/Lucene.h:33:14: error: target of using declaration conflicts with declaration already in scope
using boost::int64_t;
^
/usr/local/include/boost/cstdint.hpp:308:50: note: target of using declaration
typedef ::boost::long_long_type int64_t;
^
/usr/include/x86_64-linux-gnu/sys/types.h:197:1: note: conflicting declaration
__intN_t (64, __DI__);
^
/usr/include/x86_64-linux-gnu/sys/types.h:188:15: note: expanded from macro '__intN_t'
typedef int int##N##_t __attribute__ ((__mode__ (MODE)))
from luceneplusplus.
p.s. Tested with both libstdc++ and libc++ when using clang :)
from luceneplusplus.
I'm not able to easily reproduce this error, however I've pushed a patch that might have fixed the issue:
Please re-open this issue if it's still a problem for you.
from luceneplusplus.
This does not fix the problem. Since the int16_t is not a macro, ifndef can not know that it exists.
int16_t (and friends) are defined by the C++11 standard (in the stdint.h header), in the global namespace. So, the 'using' code is dragging those from boost and making them collide with the standard definitions.
The proper fix for this would be to remove the using directives (it is really not advised to use 'using' in headers, especially in libraries), and write the types with boost:: everywhere. (or typedef them to something like b_uint8_t etc.)
I haven't found a macro in boost that detects these (it has for int128_t and char16_t, but not for the ints), and I haven't succeeded in making it work with a simple check of __cplusplus macro version. The test below worked with clang, but not with gcc (same versions as before).
#if __cplusplus <= 199711L
:::
#endif
from luceneplusplus.
Any reason to just not use the standard types from <cstdint>
, i.e., std::int64_t
and the like? Do current versions of the library truly still need to compile on non-C++11 compilers?
from luceneplusplus.
- gentoo
- boost 1.56.0
- gcc 4.8.4 + 4.9.2
- cmake 3.1.0
I would like to use lucene++ and also experience this issue. Any idea how to workaround this?
from luceneplusplus.
The compile error is still there, can't build lucene++ 3.0.7. I need it for the new poedit.
Specs:
- Linux oriongl64 4.1.0-gentoo #1 SMP Tue Jun 23 11:40:48 CEST 2015 x86_64 Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz GenuineIntel GNU/Linux
- boost 1.56.0 (also not working with 1.57.0)
- x86_64-pc-linux-gnu-4.9.3
- cmake 3.3.0
CFLAGS="-march=corei7 -O2 -mno-avx"
Current error is as follows.
[ 1%] Building CXX precompiled header src/core/cotire/lucene++_CXX_prefix.hxx.gch
cd /var/tmp/portage/dev-cpp/lucene++-3.0.7/work/LucenePlusPlus-rel_3.0.7/src/core && /usr/bin/cmake -DCOTIRE_BUILD_TYPE:STRING=Gentoo -DCOTIRE_VERBOSE:BOOL=1 -P /var/tmp/portage/dev-cpp/lucene++-3.0.7/work/LucenePlusPlus-rel_3.0.7/cmake/cotire.cmake precompile /var/tmp/portage/dev-cpp/lucene++-3.0.7/work/lucene++-3.0.7_build/src/core/lucene++_CXX_cotire.cmake /var/tmp/portage/dev-cpp/lucene++-3.0.7/work/lucene++-3.0.7_build/src/core/cotire/lucene++_CXX_prefix.hxx /var/tmp/portage/dev-cpp/lucene++-3.0.7/work/lucene++-3.0.7_build/src/core/cotire/lucene++_CXX_prefix.hxx.gch /var/tmp/portage/dev-cpp/lucene++-3.0.7/work/LucenePlusPlus-rel_3.0.7/src/core/search/BooleanClause.cpp
-- execute_process: /usr/bin/x86_64-pc-linux-gnu-gcc;-Dlucene___EXPORTS;-DLPP_BUILDING_LIB;-march=corei7;-O2;-mno-avx;-fPIC;-fPIC;-I/var/tmp/portage/dev-cpp/lucene++-3.0.7/work/lucene++-3.0.7_build/include;-I/var/tmp/portage/dev-cpp/lucene++-3.0.7/work/LucenePlusPlus-rel_3.0.7/include;-I/var/tmp/portage/dev-cpp/lucene++-3.0.7/work/LucenePlusPlus-rel_3.0.7/src/core/include;-I/usr/include/boost-1_51;-x;c-header;-c;/var/tmp/portage/dev-cpp/lucene++-3.0.7/work/lucene++-3.0.7_build/src/core/cotire/lucene++_C_prefix.h;-o;/var/tmp/portage/dev-cpp/lucene++-3.0.7/work/lucene++-3.0.7_build/src/core/cotire/lucene++_C_prefix.h.gch
-- execute_process: /usr/bin/x86_64-pc-linux-gnu-g++;-Dlucene___EXPORTS;-DLPP_BUILDING_LIB;-march=corei7;-O2;-mno-avx;-fPIC;-fPIC;-I/var/tmp/portage/dev-cpp/lucene++-3.0.7/work/lucene++-3.0.7_build/include;-I/var/tmp/portage/dev-cpp/lucene++-3.0.7/work/LucenePlusPlus-rel_3.0.7/include;-I/var/tmp/portage/dev-cpp/lucene++-3.0.7/work/LucenePlusPlus-rel_3.0.7/src/core/include;-I/usr/include/boost-1_51;-x;c++-header;-c;/var/tmp/portage/dev-cpp/lucene++-3.0.7/work/lucene++-3.0.7_build/src/core/cotire/lucene++_CXX_prefix.hxx;-o;/var/tmp/portage/dev-cpp/lucene++-3.0.7/work/lucene++-3.0.7_build/src/core/cotire/lucene++_CXX_prefix.hxx.gch
In file included from /var/tmp/portage/dev-cpp/lucene++-3.0.7/work/LucenePlusPlus-rel_3.0.7/src/core/include/LuceneInc.h:20:0,
from /var/tmp/portage/dev-cpp/lucene++-3.0.7/work/lucene++-3.0.7_build/src/core/cotire/lucene++_CXX_prefix.cxx:4,
from /var/tmp/portage/dev-cpp/lucene++-3.0.7/work/lucene++-3.0.7_build/src/core/cotire/lucene++_CXX_prefix.hxx:4:
/var/tmp/portage/dev-cpp/lucene++-3.0.7/work/LucenePlusPlus-rel_3.0.7/include/Lucene.h:43:14: error: 'int64_t' is already declared in this scope
using boost::int64_t;
^
CMake Error at /var/tmp/portage/dev-cpp/lucene++-3.0.7/work/LucenePlusPlus-rel_3.0.7/cmake/cotire.cmake:1622 (message):
cotire: error 1 precompiling
/var/tmp/portage/dev-cpp/lucene++-3.0.7/work/lucene++-3.0.7_build/src/core/cotire/lucene++_CXX_prefix.hxx.
Call Stack (most recent call first):
/var/tmp/portage/dev-cpp/lucene++-3.0.7/work/LucenePlusPlus-rel_3.0.7/cmake/cotire.cmake:3090 (cotire_precompile_prefix_header)
src/core/CMakeFiles/lucene++.dir/build.make:62: recipe for target 'src/core/cotire/lucene++_CXX_prefix.hxx.gch' failed
make[2]: *** [src/core/cotire/lucene++_CXX_prefix.hxx.gch] Error 1
make[2]: Leaving directory '/var/tmp/portage/dev-cpp/lucene++-3.0.7/work/lucene++-3.0.7_build'
CMakeFiles/Makefile2:220: recipe for target 'src/core/CMakeFiles/lucene++.dir/all' failed
make[1]: *** [src/core/CMakeFiles/lucene++.dir/all] Error 2
make[1]: Leaving directory '/var/tmp/portage/dev-cpp/lucene++-3.0.7/work/lucene++-3.0.7_build'
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
Full build log: http://pastebin.com/WDFjK9Rq
Please support us.
from luceneplusplus.
Related Issues (20)
- search in lucene++, most CPU resources are occupied by synclock HOT 2
- Ubuntu 18.04 doesn't work cmake HOT 6
- Facets search HOT 2
- Any example?
- Will the API remain compatible with the java version? HOT 1
- performance optimization HOT 6
- Uninitialized AttributeFactory instance HOT 22
- Tests failing on macOS HOT 6
- Multiple thread sanitizer hits when running the tests
- Errors When Compiling on Ubuntu 22.04 HOT 8
- more cmake options to configure and build LucenePlusPlus
- lucene posting list implementation
- filter cardinality estimation
- is multithreading supported?
- boost::iostreams:: error in compressionTools.cpp, Boost version-1.81 HOT 1
- search demo crash on windows
- Linking error due to boost::filesystem::detail::copy_file
- Can't compile own Analyzer with MSVC with wrong order of includes
- Build with tests fails on macOS 12–14: `gtest-internal.h: error: use of undeclared identifier 'FLT_MAX'`
- Add list of changes between versions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luceneplusplus.