cppit / jucipp

A lightweight & cross-platform IDE supporting the most recent C++ standards. This project has moved to https://gitlab.com/cppit/jucipp.
https://gitlab.com/cppit/jucipp
MIT License
883 stars 98 forks source link

Build failed on OSX during make #296

Closed mukulrawat1986 closed 7 years ago

mukulrawat1986 commented 7 years ago

I have been trying to install jucipp on my macbook following the install instructions. Inside the jucipp/build directory on running cmake .. I get the following warnings.

CMake Warning at /usr/local/Cellar/cmake/3.6.2/share/cmake/Modules/FindBoost.cmake:743 (message):
  Imported targets not available for Boost version 106200
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.6.2/share/cmake/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/local/Cellar/cmake/3.6.2/share/cmake/Modules/FindBoost.cmake:1395 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:53 (find_package)

CMake Warning at /usr/local/Cellar/cmake/3.6.2/share/cmake/Modules/FindBoost.cmake:743 (message):
  Imported targets not available for Boost version 106200
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.6.2/share/cmake/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/local/Cellar/cmake/3.6.2/share/cmake/Modules/FindBoost.cmake:1395 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:53 (find_package)

-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   system
--   filesystem
-- Could NOT find plantuml (missing:  PLANTUML_JARFILE)
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)
-- Configuring done
WARNING: Target "juci" requests linking to directory "/usr/local/Cellar/llvm/3.9.0/include/clang-c".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "juci" requests linking to directory "/usr/local/Cellar/llvm/3.9.0/include/clang-c".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "juci" requests linking to directory "/usr/local/Cellar/llvm/3.9.0/include/clang-c".  Targets may link only to libraries.  CMake is dropping the item.
-- Generating done
-- Build files have been written to: /Users/mukulrawat/jucipp/build

I did a make after this and got the following error:

clang: warning: argument unused during compilation: '-undefined dynamic_lookup'
In file included from /Users/mukulrawat/jucipp/src/source_clang.cc:1:
In file included from /Users/mukulrawat/jucipp/src/source_clang.h:8:
In file included from /Users/mukulrawat/jucipp/libclangmm/src/clangmm.h:3:
/Users/mukulrawat/jucipp/libclangmm/src/TranslationUnit.h:3:10: fatal error:
      'clang-c/Index.h' file not found
#include <clang-c/Index.h>
         ^
1 error generated.
make[2]: *** [src/CMakeFiles/project_shared.dir/source_clang.cc.o] Error 1
make[1]: *** [src/CMakeFiles/project_shared.dir/all] Error 2
make: *** [all] Error 2

What should i do to get rid of the error?

Thank you Mukul

eidheim commented 7 years ago

Make sure you install llvm with clang when you install with brew. See installation document

mukulrawat1986 commented 7 years ago

Yes, i followed the installation document and have llvm-3.9.0 installed.

eidheim commented 7 years ago

What is the default llvm version? Have you tried with llvm 3.8?

mukulrawat1986 commented 7 years ago

I have not, I just followed the instructions in the installation document, and run

brew install --with-clang --with-lldb llvm

this installed llvm-3.9.0

When running cmake .. I was initially getting an error and had to set the clang include dir. At that time i ran the command

cmake -DLIBCLANG_INCLUDE_DIR=/usr/local/Cellar/llvm/3.9.0/include/clang-c ..
eidheim commented 7 years ago

Try that command but without /clang-c at the end before ..

mukulrawat1986 commented 7 years ago

Doing that gives another error

CMake Error at /usr/local/Cellar/cmake/3.6.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find LibClang (missing: LIBCLANG_LIBRARY)
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.6.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  cmake_modules/FindLibClang.cmake:89 (find_package_handle_standard_args)
  CMakeLists.txt:36 (find_package)

-- Configuring incomplete, errors occurred!
eidheim commented 7 years ago

We probably have to update our FindClang for the new version of llvm on homebrew. Ill look into it tomorrow when im home

mukulrawat1986 commented 7 years ago

Alright. Thank you.

eidheim commented 7 years ago

Thank you for reporting this, should be fixed now.

mukulrawat1986 commented 7 years ago

Thank you. Its working now.