luceneplusplus / LucenePlusPlus

Lucene++ is an up to date C++ port of the popular Java Lucene library, a high-performance, full-featured text search engine.
luceneplusplus@googlegroups.com
Other
738 stars 232 forks source link

Ubuntu 18.04 doesn't work cmake #170

Closed sonic182 closed 3 years ago

sonic182 commented 3 years ago
cmake --configure ..
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- cotire 1.8.0 loaded.
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   date_time
--   filesystem
--   iostreams
--   regex
--   system
--   thread
--   chrono
--   atomic
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
You have called ADD_LIBRARY for library lucene++ without any source files. This typically indicates a problem with your CMakeLists.txt file
-- C CXX target lucene++ cotired.
CMake Error at src/core/CMakeLists.txt:85 (install):
  install TARGETS given no LIBRARY DESTINATION for shared library target
  "lucene++".

You have called ADD_LIBRARY for library lucene++-contrib without any source files. This typically indicates a problem with your CMakeLists.txt file
-- C CXX target lucene++-contrib cotired.
CMake Error at src/contrib/CMakeLists.txt:90 (install):
  install TARGETS given no LIBRARY DESTINATION for shared library target
  "lucene++-contrib".

CMake Error at src/test/CMakeLists.txt:7 (add_executable):
  add_executable called with incorrect number of arguments

-- Found PythonInterp: /home/johanderson/.asdf/shims/python (found version "2.7.17")
CMake Error at src/test/CMakeLists.txt:37 (target_sources):
  Cannot specify sources for target "lucene++-tester" which is not built by
  this project.

CMake Error at src/test/CMakeLists.txt:45 (target_include_directories):
  Cannot specify include directories for target "lucene++-tester" which is
  not built by this project.

CMake Error at src/test/CMakeLists.txt:59 (target_link_libraries):
  Cannot specify link libraries for target "lucene++-tester" which is not
  built by this project.

-- Configuring incomplete, errors occurred!
See also "/home/johanderson/work/sandbox/samples/samples2/LucenePlusPlus/build/CMakeFiles/CMakeOutput.log".
See also "/home/johanderson/work/sandbox/samples/samples2/LucenePlusPlus/build/CMakeFiles/CMakeError.log".

With a ubuntu/focal64 vagrant vm works ok, It may be for some specific requirement of newer cmake, libbost or something? Would be nice to have in docs =)

p01arst0rm commented 3 years ago

@sonic182 please give all commands you used to build, starting with cloning the repo :)

p01arst0rm commented 3 years ago

@sonic182 could you also provide

Ubuntu distribution version cmake version gcc version boost version ninja version

sonic182 commented 3 years ago

Ubuntu distribution version: Ubuntu 18.04.5 LTS cmake version: 3.10.2-1ubuntu2.18.04.1 gcc version: 7.5.0-3ubuntu1~18.04 boost version: 1.65.1+dfsg-0ubuntu5 ninja version: I don't know

I updated my ubuntu to 20 but I repeated the test with a vagrant vm

# clone repo
git clone git@github.com:luceneplusplus/LucenePlusPlus.git
cd LucenePlusPlus
vagrant init ubuntu/bionic64
# you can update vagrantfile to set more cpus and ram to the vm, eg
#
#  config.vm.provider "virtualbox" do |vb|
#    vb.cpus = 4
#   vb.memory = "2048"
#  end

vagrant up
vagrant ssh

# inside machine
sudo apt-get install -y zlib1g-dev  libboost-date-time-dev  libboost-filesystem-dev  libboost-regex-dev  libboost-thread-dev  libboost-iostreams-dev
sudo apt-get install build-essential cmake -y
cd /vagrant
mkdir build && cd build
cmake ..

error happens

p01arst0rm commented 3 years ago

@sonic182 is there any reason you're using an out of date version of ubuntu LTS? can you try on an updated version or is that not possible

sonic182 commented 3 years ago

@sonic182 is there any reason you're using an out of date version of ubuntu LTS? can you try on an updated version or is that not possible

I were lazy to update my ubuntu, but I did and it works ok in Ubuntu 20. I just did report this issue because ubuntu 18 is not old, and it's LTS, will be there until 2023

p01arst0rm commented 3 years ago

@sonic182 is there any reason you're using an out of date version of ubuntu LTS? can you try on an updated version or is that not possible

I were lazy to update my ubuntu, but I did and it works ok in Ubuntu 20. I just did report this issue because ubuntu 18 is not old, and it's LTS, will be there until 2023

fair enough :)

you're right though, thanks for raising the ticket. the issue should be fixed by #172