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 fails on Ubuntu 16.04.1: lldb issue #293

Closed fusion809 closed 7 years ago

fusion809 commented 7 years ago

Hi,

I followed the docs/install.md guide for Ubuntu but the sudo apt-get install command failed, as lldb-3.6 doesn't exist so installing lldb-3.6-dev fails as it attempts to install lldb-3.6, which as I previously said doesn't exist. As a work-around I tried installing lldb-3.7-dev but when I tried building jucii++ it failed, giving the error message:

/lib/x86_64-linux-gnu/giomm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/lib/x86_64-linux-gnu/pangomm-1.4/include -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/mirclient -I/usr/include/mircommon -I/usr/include/mircookie -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/cairomm-1.0 -I/usr/lib/x86_64-linux-gnu/cairomm-1.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gtksourceviewmm-3.0 -I/usr/lib/x86_64-linux-gnu/gtksourceviewmm-3.0/include -I/usr/include/gtksourceview-3.0 -I/usr/include/libxml2 -I/usr/lib/llvm-3.6/include -I/home/fusion809/GitHub/others/jucipp/libclangmm/src -I/home/fusion809/GitHub/others/jucipp/tiny-process-library -I/home/fusion809/GitHub/others/jucipp/src  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -DJUCI_VERSION=\"1.2.2\" -std=c++1y -pthread -Wall -Wextra -Wno-unused-parameter -Wno-reorder -DJUCI_ENABLE_DEBUG   -o CMakeFiles/project_shared.dir/git.cc.o -c /home/fusion809/GitHub/others/jucipp/src/git.cc
[ 14%] Building CXX object src/CMakeFiles/project_shared.dir/project_build.cc.o
cd /home/fusion809/GitHub/others/jucipp/obj-x86_64-linux-gnu/src && /usr/bin/x86_64-linux-gnu-g++    -I/usr/include/gtkmm-3.0 -I/usr/lib/x86_64-linux-gnu/gtkmm-3.0/include -I/usr/include/atkmm-1.6 -I/usr/include/gtk-3.0/unix-print -I/usr/include/gdkmm-3.0 -I/usr/lib/x86_64-linux-gnu/gdkmm-3.0/include -I/usr/include/giomm-2.4 -I/usr/lib/x86_64-linux-gnu/giomm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/lib/x86_64-linux-gnu/pangomm-1.4/include -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/mirclient -I/usr/include/mircommon -I/usr/include/mircookie -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/cairomm-1.0 -I/usr/lib/x86_64-linux-gnu/cairomm-1.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gtksourceviewmm-3.0 -I/usr/lib/x86_64-linux-gnu/gtksourceviewmm-3.0/include -I/usr/include/gtksourceview-3.0 -I/usr/include/libxml2 -I/usr/lib/llvm-3.6/include -I/home/fusion809/GitHub/others/jucipp/libclangmm/src -I/home/fusion809/GitHub/others/jucipp/tiny-process-library -I/home/fusion809/GitHub/others/jucipp/src  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -DJUCI_VERSION=\"1.2.2\" -std=c++1y -pthread -Wall -Wextra -Wno-unused-parameter -Wno-reorder -DJUCI_ENABLE_DEBUG   -o CMakeFiles/project_shared.dir/project_build.cc.o -c /home/fusion809/GitHub/others/jucipp/src/project_build.cc
[ 16%] Building CXX object src/CMakeFiles/project_shared.dir/source.cc.o
cd /home/fusion809/GitHub/others/jucipp/obj-x86_64-linux-gnu/src && /usr/bin/x86_64-linux-gnu-g++    -I/usr/include/gtkmm-3.0 -I/usr/lib/x86_64-linux-gnu/gtkmm-3.0/include -I/usr/include/atkmm-1.6 -I/usr/include/gtk-3.0/unix-print -I/usr/include/gdkmm-3.0 -I/usr/lib/x86_64-linux-gnu/gdkmm-3.0/include -I/usr/include/giomm-2.4 -I/usr/lib/x86_64-linux-gnu/giomm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/lib/x86_64-linux-gnu/pangomm-1.4/include -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/mirclient -I/usr/include/mircommon -I/usr/include/mircookie -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/cairomm-1.0 -I/usr/lib/x86_64-linux-gnu/cairomm-1.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gtksourceviewmm-3.0 -I/usr/lib/x86_64-linux-gnu/gtksourceviewmm-3.0/include -I/usr/include/gtksourceview-3.0 -I/usr/include/libxml2 -I/usr/lib/llvm-3.6/include -I/home/fusion809/GitHub/others/jucipp/libclangmm/src -I/home/fusion809/GitHub/others/jucipp/tiny-process-library -I/home/fusion809/GitHub/others/jucipp/src  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -DJUCI_VERSION=\"1.2.2\" -std=c++1y -pthread -Wall -Wextra -Wno-unused-parameter -Wno-reorder -DJUCI_ENABLE_DEBUG   -o CMakeFiles/project_shared.dir/source.cc.o -c /home/fusion809/GitHub/others/jucipp/src/source.cc
[ 19%] Building CXX object src/CMakeFiles/project_shared.dir/source_clang.cc.o
cd /home/fusion809/GitHub/others/jucipp/obj-x86_64-linux-gnu/src && /usr/bin/x86_64-linux-gnu-g++    -I/usr/include/gtkmm-3.0 -I/usr/lib/x86_64-linux-gnu/gtkmm-3.0/include -I/usr/include/atkmm-1.6 -I/usr/include/gtk-3.0/unix-print -I/usr/include/gdkmm-3.0 -I/usr/lib/x86_64-linux-gnu/gdkmm-3.0/include -I/usr/include/giomm-2.4 -I/usr/lib/x86_64-linux-gnu/giomm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/lib/x86_64-linux-gnu/pangomm-1.4/include -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/mirclient -I/usr/include/mircommon -I/usr/include/mircookie -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/cairomm-1.0 -I/usr/lib/x86_64-linux-gnu/cairomm-1.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gtksourceviewmm-3.0 -I/usr/lib/x86_64-linux-gnu/gtksourceviewmm-3.0/include -I/usr/include/gtksourceview-3.0 -I/usr/include/libxml2 -I/usr/lib/llvm-3.6/include -I/home/fusion809/GitHub/others/jucipp/libclangmm/src -I/home/fusion809/GitHub/others/jucipp/tiny-process-library -I/home/fusion809/GitHub/others/jucipp/src  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -DJUCI_VERSION=\"1.2.2\" -std=c++1y -pthread -Wall -Wextra -Wno-unused-parameter -Wno-reorder -DJUCI_ENABLE_DEBUG   -o CMakeFiles/project_shared.dir/source_clang.cc.o -c /home/fusion809/GitHub/others/jucipp/src/source_clang.cc
In file included from /home/fusion809/GitHub/others/jucipp/src/source_clang.cc:6:0:
/home/fusion809/GitHub/others/jucipp/src/debug_lldb.h:6:33: fatal error: lldb/API/SBDebugger.h: No such file or directory
compilation terminated.
src/CMakeFiles/project_shared.dir/build.make:233: recipe for target 'src/CMakeFiles/project_shared.dir/source_clang.cc.o' failed
make[3]: *** [src/CMakeFiles/project_shared.dir/source_clang.cc.o] Error 1
make[3]: Leaving directory '/home/fusion809/GitHub/others/jucipp/obj-x86_64-linux-gnu'
CMakeFiles/Makefile2:90: recipe for target 'src/CMakeFiles/project_shared.dir/all' failed
make[2]: *** [src/CMakeFiles/project_shared.dir/all] Error 2
make[2]: Leaving directory '/home/fusion809/GitHub/others/jucipp/obj-x86_64-linux-gnu'
Makefile:152: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/fusion809/GitHub/others/jucipp/obj-x86_64-linux-gnu'
dh_auto_build: make -j1 returned exit code 2
debian/rules:22: recipe for target 'binary' failed
make: *** [binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2

Thanks for your time, Brenton

fusion809 commented 7 years ago

I manually downloaded the lldb-3.6 Debian binary and installed it, along with lldb-3.6-dev and all other dependencies for Ubuntu mentioned in the docs/install.md file and I still got the aforementioned build error. I do clean builds, btw, removing the build directory and re-mkdir-ing it.

eidheim commented 7 years ago

Could you try install libclang-3.7-dev and rebuild from scratch. That is, the libclang and lldb dev files should be of the same version. Make sure cmake detects clang version 3.7.

eidheim commented 7 years ago

I mean from the Ubuntu repositories.

fusion809 commented 7 years ago

Thanks, your suggestion fixed this build error. By-the-way, is there any intention to ever provide binaries for juci++ on Debian and Red Hat platforms (i.e., .deb and .rpm binaries) attached to each tagged release? With how small a package this IDE is it shouldn't be too hard to do so and automate the process with Travis CI. It would make things a fair bit simpler. By-the-way I provide an up-to-date juci++ binary for 64-bit Arch Linux via my [pkgbuild-current] repo.

eidheim commented 7 years ago

Good to hear, and thank you for the arch linux aur package!

I have no plans for creating prebuild packages, but have added CPack arguments to the toplevel CMakeLists.txt that would make it easier for others to do so. Would be interesting if this could be done through Travis CI, and any help here would be much appreciated.

fusion809 commented 7 years ago

I've never used Travis CI for this purpose myself, but here's the official documentation on this https://docs.travis-ci.com/user/deployment/releases/.

eidheim commented 7 years ago

In my Ubuntu 16, liblldb-3.6-dev exists after apt-get update. Does this package not exist in your Ubuntu 16? Here is my output of apt-cache search lldb|grep dev:

liblldb-3.6-dev - Next generation, high-performance debugger - Header files
liblldb-3.8-dev - Next generation, high-performance debugger - Header files
libghc-haskelldb-dev - Haskell library for expressing database queries
libghc-haskelldb-hdbc-dev - HaskellDB support for HDBC
libghc-haskelldb-hdbc-odbc-dev - HaskellDB support for the HDBC ODBC driver
libghc-haskelldb-hdbc-postgresql-dev - HaskellDB support for the HDBC PostgreSQL driver
libghc-haskelldb-hdbc-sqlite3-dev - HaskellDB support for the HDBC SQLite driver
liblldb-3.5-dev - Next generation, high-performance debugger - Header files
liblldb-3.7-dev - Next generation, high-performance debugger - Header files
lldb-3.5-dev - transitional dummy package to liblldb-3.5-dev
lldb-3.6-dev - transitional dummy package to liblldb-3.6-dev
lldb-3.7-dev - transitional dummy package to liblldb-3.7-dev
lldb-3.8-dev - transitional dummy package to liblldb-3.8-dev

llvm 3.6 is still used in llvm-defaults in Debian testing, and this is the reason why we stick to this version for Debian based systems.

eidheim commented 7 years ago

llvm defaults in Debian unstable is actually now llvm 3.8. We'll probably update the install docs in a month or so, when this gets accepted in Debian testing, if llvm3.8/lldb3.8 works well.

fusion809 commented 7 years ago

For me it (lldb-3.6) doesn't exist. But it could just be my system.