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
882 stars 98 forks source link

Unable to link on Linux Mint Debian Edition, boost 1.60: #156

Closed amit-jain-SBG closed 8 years ago

amit-jain-SBG commented 8 years ago

Followed the instructions to install dependencies (except boost, I already have 1.60 built and installed). Got link errors, as below. Part of the reason is probably the breaking change in boost.log, but I don't know what is the missing dependency for Glib:: symbols.

Thanks

Linking CXX executable juci CMakeFiles/juci.dir/juci.cc.o: In function Application::on_command_line(Glib::RefPtr<Gio::ApplicationCommandLine> const&)': /home/amit/jucipp/src/juci.cc:(.text+0x3b): undefined reference toGlib::set_prgname(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&)' CMakeFiles/juci.dir/juci.cc.o: In function void boost::log::v2_mt_posix::sinks::basic_formatting_sink_frontend<char>::feed_record<boost::log::v2_mt_posix::aux::fake_mutex, boost::log::v2_mt_posix::sinks::text_file_backend>(boost::log::v2_mt_posix::record_view const&, boost::log::v2_mt_posix::aux::fake_mutex&, boost::log::v2_mt_posix::sinks::text_file_backend&)': /home/amit/jucipp/src/juci.cc:(.text._ZN5boost3log11v2_mt_posix5sinks30basic_formatting_sink_frontendIcE11feed_recordINS1_3aux10fake_mutexENS2_17text_file_backendEEEvRKNS1_11record_viewERT_RT0_[_ZN5boost3log11v2_mt_posix5sinks30basic_formatting_sink_frontendIcE11feed_recordINS1_3aux10fake_mutexENS2_17text_file_backendEEEvRKNS1_11record_viewERT_RT0_]+0x9a): undefined reference toboost::log::v2_mt_posix::sinks::text_file_backend::consume(boost::log::v2_mt_posix::record_view const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&)' CMakeFiles/juci.dir/juci.cc.o: In function void boost::log::v2_mt_posix::sinks::basic_formatting_sink_frontend<char>::feed_record<boost::recursive_mutex, boost::log::v2_mt_posix::sinks::text_file_backend>(boost::log::v2_mt_posix::record_view const&, boost::recursive_mutex&, boost::log::v2_mt_posix::sinks::text_file_backend&)': /home/amit/jucipp/src/juci.cc:(.text._ZN5boost3log11v2_mt_posix5sinks30basic_formatting_sink_frontendIcE11feed_recordINS_15recursive_mutexENS2_17text_file_backendEEEvRKNS1_11record_viewERT_RT0_[_ZN5boost3log11v2_mt_posix5sinks30basic_formatting_sink_frontendIcE11feed_recordINS_15recursive_mutexENS2_17text_file_backendEEEvRKNS1_11record_viewERT_RT0_]+0xab): undefined reference toboost::log::v2_mt_posix::sinks::text_file_backend::consume(boost::log::v2_mt_posix::record_view const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&)' CMakeFiles/juci.dir/juci.cc.o: In function boost::log::v2_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >& boost::log::v2_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::formatted_write<wchar_t>(wchar_t const*, long)': /home/amit/jucipp/src/juci.cc:(.text._ZN5boost3log11v2_mt_posix24basic_formatting_ostreamIcNSt3__111char_traitsIcEENS3_9allocatorIcEEE15formatted_writeIwEERS8_PKT_l[_ZN5boost3log11v2_mt_posix24basic_formatting_ostreamIcNSt3__111char_traitsIcEENS3_9allocatorIcEEE15formatted_writeIwEERS8_PKT_l]+0x90): undefined reference toboost::log::v2_mt_posix::aux::code_convert_impl(wchart const, unsigned long, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&, std::1::locale const&)' CMakeFiles/juci.dir/juci.cc.o: In function `void boost::log::v2_mt_posix::basic_formatting_ostream<char, std::1::char_traits, std::1::allocator >::aligned_write(wchart const, long)': /home/amit/jucipp/src/juci.cc:(.text._ZN5boost3log11v2_mt_posix24basic_formatting_ostreamIcNSt3__111char_traitsIcEENS3_9allocatorIcEEE13aligned_writeIwEEvPKT_l[_ZN5boost3log11v2_mt_posix24basic_formatting_ostreamIcNSt3111char_traitsIcEENS3_9allocatorIcEEE13aligned_writeIwEEvPKT_l]+0x5d): undefined reference to boost::log::v2_mt_posix::aux::code_convert_impl(wchar_t const*, unsigned long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, std::__1::locale const&)' /home/amit/jucipp/src/juci.cc:(.text._ZN5boost3log11v2_mt_posix24basic_formatting_ostreamIcNSt3__111char_traitsIcEENS3_9allocatorIcEEE13aligned_writeIwEEvPKT_l[_ZN5boost3log11v2_mt_posix24basic_formatting_ostreamIcNSt3__111char_traitsIcEENS3_9allocatorIcEEE13aligned_writeIwEEvPKT_l]+0x15a): undefined reference toboost::log::v2_mt_posix::aux::code_convert_impl(wchar_t const*, unsigned long, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&, std::__1::locale const&)'

eidheim commented 8 years ago

I'll install Linux Mint Debian Edition and see if I can fix this later Today. Might be that I'll disable the logging for the time being, have tried boost1.60, but on OS X and Arch Linux. The undefined reference to Glib::set_prgname was strange though.

eidheim commented 8 years ago

I installed LMDE from http://www.linuxmint.com/download_lmde.php (Cinnamon 64-bit) and it worked without problems, although I had to follow the Debian stable instructions since LMDE seems to be using these packages (sadly, since they are quite old). I thought LMDE were using Debian testing packages?

A possible fix is to upgrade your system:

sudo apt-get update
sudo apt-get dist-upgrade

And use the default boost packages from LMDE. The issue might be related to using boost1.60 together with older packages, and not having the latest glibmm package.

Screenshot from LMDE: image

amit-jain-SBG commented 8 years ago

Hi,

My system is dist-upgraded already, hence I followed Debian Testing instructions. And I just verified,

libgtksourceviewmm-3.0-dev is already the newest version.

I am not keen to apt-get boost libraries, since they'll downgrade my installed version. Maybe I will just wait for either boost 1.60 to become part of Debian Testing, or for you to start supporting boost.log.

eidheim commented 8 years ago

The following diffs disable the use of logging:

diff --git a/src/juci.cc b/src/juci.cc
index 3c52331..dd07e91 100644
--- a/src/juci.cc
+++ b/src/juci.cc
@@ -93,9 +93,9 @@ void Application::on_startup() {
 }

 Application::Application() : Gtk::Application("no.sout.juci", Gio::APPLICATION_NON_UNIQUE | Gio::APPLICATION_HANDLES_COMMAND_LINE) {
-  boost::log::add_common_attributes();
+  //boost::log::add_common_attributes();
   auto log_dir = Config::get().juci_home_path()/"log"/"juci.log";
-  boost::log::add_file_log(boost::log::keywords::file_name = log_dir, boost::log::keywords::auto_flush = true);
+  //boost::log::add_file_log(boost::log::keywords::file_name = log_dir, boost::log::keywords::auto_flush = true);
   JINFO("Logging initalized");

   Glib::set_application_name("juCi++");
diff --git a/src/logging.h b/src/logging.h
index 7fd780b..30f4ac6 100644
--- a/src/logging.h
+++ b/src/logging.h
@@ -1,26 +1,7 @@
 #ifndef JUCI_LOGGING_H_
 #define JUCI_LOGGING_H_

-#include <boost/log/core.hpp>
-#include <boost/log/trivial.hpp>
-#include <boost/log/expressions.hpp>
-#include <boost/log/sinks/text_file_backend.hpp>
-#include <boost/log/utility/setup/file.hpp>
-#include <boost/log/utility/setup/common_attributes.hpp>
-#include <boost/log/sources/severity_logger.hpp>
-#include <boost/log/sources/record_ostream.hpp>
-
-#define TRACE_VAR(x) BOOST_LOG_TRIVIAL(trace)      << "** Trace: "   << __FILE__ << "@" << __func__ << "(" << __LINE__ << "): " << #x << "=<" << x << ">";
-#define DEBUG_VAR(x) BOOST_LOG_TRIVIAL(debug)      << "** Debug: "   << __FILE__ << "@" << __func__ << "(" << __LINE__ << "): " << #x << "=<" << x << ">";
-#define INFO_VAR(x) BOOST_LOG_TRIVIAL(info)        << "** Info: "    << __FILE__ << "@" << __func__ << "(" << __LINE__ << "): " << #x << "=<" << x << ">";
-#define WARNING_VAR(x) BOOST_LOG_TRIVIAL(warning)  << "** Warning: " << __FILE__ << "@" << __func__ << "(" << __LINE__ << "): " << #x << "=<" << x << ">";
-#define FATAL_VAR(x) BOOST_LOG_TRIVIAL(fatal)      << "** Fatal: "   << __FILE__ << "@" << __func__ << "(" << __LINE__ << "): " << #x << "=<" << x << ">";
-#define JERROR_VAR(x) BOOST_LOG_TRIVIAL(error)      << "** Error: "   << __FILE__ << "@" << __func__ << "(" << __LINE__ << "): " << #x << "=<" << x << ">";
-#define JTRACE(x) BOOST_LOG_TRIVIAL(trace)          << "** Trace: "   << __FILE__ << "@" << __func__ << "(" << __LINE__ << "): \"" << x << "\"";
-#define JDEBUG(x) BOOST_LOG_TRIVIAL(debug)          << "** Debug: "   << __FILE__ << "@" << __func__ << "(" << __LINE__ << "): \"" << x << "\"";
-#define JINFO(x) BOOST_LOG_TRIVIAL(info)            << "** Info: "    << __FILE__ << "@" << __func__ << "(" << __LINE__ << "): \"" << x << "\"";
-#define JWARNING(x) BOOST_LOG_TRIVIAL(warning)      << "** Warning: " << __FILE__ << "@" << __func__ << "(" << __LINE__ << "): \"" << x << "\"";
-#define JFATAL(x) BOOST_LOG_TRIVIAL(fatal)          << "** Fatal: "   << __FILE__ << "@" << __func__ << "(" << __LINE__ << "): \"" << x << "\"";
-#define JERROR(x) BOOST_LOG_TRIVIAL(error)          << "** Error: "   << __FILE__ << "@" << __func__ << "(" << __LINE__ << "): \"" << x << "\"";
+#define JDEBUG(x)
+#define JINFO(x)

 #endif  // JUCI_LOGGING_H_
diff --git a/src/source.h b/src/source.h
index b060e8b..2da18b5 100644
--- a/src/source.h
+++ b/src/source.h
@@ -2,6 +2,7 @@
 #define JUCI_SOURCE_H_
 #include <aspell.h>
 #include <boost/property_tree/xml_parser.hpp>
+#include <boost/filesystem.hpp>
 #include <gtksourceviewmm.h>
 #include <string>
 #include <unordered_map>

Glib::set_prgname is still a problem though, but you can comment out this line too in src/juci.cc line 9.

If this work, I'll consider disable logging for the time being in the master branch, and replace set_prgname with the glib C version.

amit-jain-SBG commented 8 years ago

Thanks a lot. Unfortunately, there are other link errors further down, to do with Glib::ustring being undefined. I will need to track down which library might be at wrong version. Will post here if I find anything.

eidheim commented 8 years ago

Great, I'll upgrade my LMDE to use Debian testing packages as well later Today.

eidheim commented 8 years ago

Would you mind posting your /etc/apt/sources.list.d/official-package-repositories.list? Could not find much information on how to use debian testing ("stretch") repositories on LMDE other than people saying that things would break.

Seems like LMDE changed from Debian testing to Debian stable repositories in 2015, and you now have to work with the old packages from Debian stable?

amit-jain-SBG commented 8 years ago

opr.txt

The change that happened in LMDE was that instead of putting out versions, we now track jessie and periodically there are updates that pull in packages specific to Mint.

Thanks.

eidheim commented 8 years ago

Thank you, but I am stil a bit confused how you could use the Debian testing install instructions. For instance, what version of libclang do you have installed (dpkg -l|grep libclang)? Mine is 3.5.

amit-jain-SBG commented 8 years ago
amit@amint:~$ dpkg -l|grep libclang
ii  libclang-3.6-dev                             1:3.6.2~svn240577-1~exp1             amd64        clang library - Development package
ii  libclang-common-3.5-dev                      1:3.5-10                             amd64        clang library - Common development package
ii  libclang-common-3.6-dev                      1:3.6.2~svn240577-1~exp1             amd64        clang library - Common development package
ii  libclang-common-dev                          1:3.2repack-11                       amd64        clang library - Common development package
ii  libclang1:amd64                              1:3.5-25                             amd64        C, C++ and Objective-C compiler (LLVM based)
ii  libclang1-3.5:amd64                          1:3.5-10                             amd64        C interface to the clang library
ii  libclang1-3.6:amd64                          1:3.6.2~svn240577-1~exp1             amd64        C interface to the clang library
eidheim commented 8 years ago

Would you mind to also post the output of dpkg -l|grep glibmm? If there are more versions installed I have to check if using pkg_check_modules(GTKMM gtkmm-3.0 REQUIRED) in CMakeLists.txt is a problem.

amit-jain-SBG commented 8 years ago
amit@amint:~$ dpkg -l|grep glibmm
ii  libglibmm-2.4-1c2a:amd64                     2.42.0-1                             amd64        C++ wrapper for the GLib toolkit (shared libraries)
ii  libglibmm-2.4-dev:amd64                      2.42.0-1                             amd64        C++ wrapper for the GLib toolkit (development files)
eidheim commented 8 years ago

Thank you again, last one hopefully: dpkg -l|grep libgtk

amit-jain-SBG commented 8 years ago

Thank you for spending so much time supporting me! Much appreciated...

amit@amint:~$ dpkg -l|grep libgtk
ii  libgtk-3-0:amd64                             3.14.5+4                             amd64        GTK+ graphical user interface library
ii  libgtk-3-bin                                 3.14.5+4                             amd64        programs for the GTK+ graphical user interface library
ii  libgtk-3-common                              3.14.5+4                             all          common files for the GTK+ graphical user interface library
ii  libgtk-3-dev:amd64                           3.14.5+4                             amd64        development files for the GTK+ library
ii  libgtk-sharp-beans-cil                       2.14.1-3                             all          Supplementary CLI bindings for GTK 2.14+
ii  libgtk2-gladexml-perl                        1.007-2+b1                           amd64        Perl interface to use user interfaces created with glade-2
ii  libgtk2-perl                                 2:1.2492-4                           amd64        Perl interface to the 2.x series of the Gimp Toolkit library
ii  libgtk2.0-0:amd64                            2.24.25-3                            amd64        GTK+ graphical user interface library
ii  libgtk2.0-bin                                2.24.25-3                            amd64        programs for the GTK+ graphical user interface library
ii  libgtk2.0-cil                                2.12.10-5.1                          amd64        CLI binding for the GTK+ toolkit 2.12
ii  libgtk2.0-common                             2.24.25-3                            all          common files for the GTK+ graphical user interface library
ii  libgtkglext1                                 1.2.0-3.2                            amd64        OpenGL Extension to GTK+ (shared libraries)
ii  libgtkmm-2.4-1c2a:amd64                      1:2.24.4-1.1                         amd64        C++ wrappers for GTK+ (shared libraries)
ii  libgtkmm-3.0-1:amd64                         3.14.0-1                             amd64        C++ wrappers for GTK+ (shared libraries)
ii  libgtkmm-3.0-dev:amd64                       3.14.0-1                             amd64        C++ wrappers for GTK+ (development files)
ii  libgtksourceview-3.0-1:amd64                 3.14.1-1                             amd64        shared libraries for the GTK+ syntax highlighting widget
ii  libgtksourceview-3.0-common                  3.14.1-1                             all          common files for the GTK+ syntax highlighting widget
ii  libgtksourceview-3.0-dev:amd64               3.14.1-1                             amd64        development files for the GTK+ syntax highlighting widget
ii  libgtksourceviewmm-3.0-0                     3.2.0-2                              amd64        C++ binding of GtkSourceView
ii  libgtksourceviewmm-3.0-dev                   3.2.0-2                              amd64        C++ binding of GtkSourceView - development files
ii  libgtkspell0                                 2.0.16-1.1                           amd64        a spell-checking addon for GTK's TextView widget
eidheim commented 8 years ago

This might be the solution: First: sudo ldconfig Then just to be sure, reopen the terminal (do not remember if this step is needed) Finally:

cd [path to jucipp]
rm -r build
mkdir build
cd build
cmake ..
make
amit-jain-SBG commented 8 years ago

:-1:

Linking CXX executable juci
CMakeFiles/juci.dir/juci.cc.o: In function `Application::on_command_line(Glib::RefPtr const&)':
/home/amit/jucipp/src/juci.cc:(.text+0x3b): undefined reference to `Glib::set_prgname(std::__1::basic_string, std::__1::allocator > const&)'
CMakeFiles/juci.dir/juci.cc.o: In function `void boost::log::v2_mt_posix::sinks::basic_formatting_sink_frontend::feed_record(boost::log::v2_mt_posix::record_view const&, boost::log::v2_mt_posix::aux::fake_mutex&, boost::log::v2_mt_posix::sinks::text_file_backend&)':
/home/amit/jucipp/src/juci.cc:(.text._ZN5boost3log11v2_mt_posix5sinks30basic_formatting_sink_frontendIcE11feed_recordINS1_3aux10fake_mutexENS2_17text_file_backendEEEvRKNS1_11record_viewERT_RT0_[_ZN5boost3log11v2_mt_posix5sinks30basic_formatting_sink_frontendIcE11feed_recordINS1_3aux10fake_mutexENS2_17text_file_backendEEEvRKNS1_11record_viewERT_RT0_]+0x9a): undefined reference to `boost::log::v2_mt_posix::sinks::text_file_backend::consume(boost::log::v2_mt_posix::record_view const&, std::__1::basic_string, std::__1::allocator > const&)'
CMakeFiles/juci.dir/juci.cc.o: In function `void boost::log::v2_mt_posix::sinks::basic_formatting_sink_frontend::feed_record(boost::log::v2_mt_posix::record_view const&, boost::recursive_mutex&, boost::log::v2_mt_posix::sinks::text_file_backend&)':
/home/amit/jucipp/src/juci.cc:(.text._ZN5boost3log11v2_mt_posix5sinks30basic_formatting_sink_frontendIcE11feed_recordINS_15recursive_mutexENS2_17text_file_backendEEEvRKNS1_11record_viewERT_RT0_[_ZN5boost3log11v2_mt_posix5sinks30basic_formatting_sink_frontendIcE11feed_recordINS_15recursive_mutexENS2_17text_file_backendEEEvRKNS1_11record_viewERT_RT0_]+0xab): undefined reference to `boost::log::v2_mt_posix::sinks::text_file_backend::consume(boost::log::v2_mt_posix::record_view const&, std::__1::basic_string, std::__1::allocator > const&)'
CMakeFiles/juci.dir/juci.cc.o: In function `boost::log::v2_mt_posix::basic_formatting_ostream, std::__1::allocator >& boost::log::v2_mt_posix::basic_formatting_ostream, std::__1::allocator >::formatted_write(wchar_t const*, long)':
/home/amit/jucipp/src/juci.cc:(.text._ZN5boost3log11v2_mt_posix24basic_formatting_ostreamIcNSt3__111char_traitsIcEENS3_9allocatorIcEEE15formatted_writeIwEERS8_PKT_l[_ZN5boost3log11v2_mt_posix24basic_formatting_ostreamIcNSt3__111char_traitsIcEENS3_9allocatorIcEEE15formatted_writeIwEERS8_PKT_l]+0x90): undefined reference to `boost::log::v2_mt_posix::aux::code_convert_impl(wchar_t const*, unsigned long, std::__1::basic_string, std::__1::allocator >&, std::__1::locale const&)'
CMakeFiles/juci.dir/juci.cc.o: In function `void boost::log::v2_mt_posix::basic_formatting_ostream, std::__1::allocator >::aligned_write(wchar_t const*, long)':
/home/amit/jucipp/src/juci.cc:(.text._ZN5boost3log11v2_mt_posix24basic_formatting_ostreamIcNSt3__111char_traitsIcEENS3_9allocatorIcEEE13aligned_writeIwEEvPKT_l[_ZN5boost3log11v2_mt_posix24basic_formatting_ostreamIcNSt3__111char_traitsIcEENS3_9allocatorIcEEE13aligned_writeIwEEvPKT_l]+0x5d): undefined reference to `boost::log::v2_mt_posix::aux::code_convert_impl(wchar_t const*, unsigned long, std::__1::basic_string, std::__1::allocator >&, std::__1::locale const&)'
/home/amit/jucipp/src/juci.cc:(.text._ZN5boost3log11v2_mt_posix24basic_formatting_ostreamIcNSt3__111char_traitsIcEENS3_9allocatorIcEEE13aligned_writeIwEEvPKT_l[_ZN5boost3log11v2_mt_posix24basic_formatting_ostreamIcNSt3__111char_traitsIcEENS3_9allocatorIcEEE13aligned_writeIwEEvPKT_l]+0x15a): undefined reference to `boost::log::v2_mt_posix::aux::code_convert_impl(wchar_t const*, unsigned long, std::__1::basic_string, std::__1::allocator >&, std::__1::locale const&)'
CMakeFiles/juci.dir/juci.cc.o: In function `void boost::log::v2_mt_posix::sinks::text_file_backend::construct, boost::parameter::aux::arg_list, boost::parameter::aux::empty_arg_list> > >(boost::parameter::aux::arg_list, boost::parameter::aux::arg_list, boost::parameter::aux::empty_arg_list> > const&)':
/home/amit/jucipp/src/juci.cc:(.text._ZN5boost3log11v2_mt_posix5sinks17text_file_backend9constructINS_9parameter3aux8arg_listINS6_15tagged_argumentINS1_8keywords3tag9file_nameENS_10filesystem4pathEEENS7_INS8_INSA_10auto_flushEKbEENS6_14empty_arg_listEEEEEEEvRKT_[_ZN5boost3log11v2_mt_posix5sinks17text_file_backend9constructINS_9parameter3aux8arg_listINS6_15tagged_argumentINS1_8keywords3tag9file_nameENS_10filesystem4pathEEENS7_INS8_INSA_10auto_flushEKbEENS6_14empty_arg_listEEEEEEEvRKT_]+0xbb): undefined reference to `boost::log::v2_mt_posix::sinks::text_file_backend::construct(boost::filesystem::path const&, unsigned int, unsigned long, boost::log::v2_mt_posix::aux::light_function const&, bool)'
CMakeFiles/juci.dir/juci.cc.o:(.rodata+0x30): undefined reference to `Gio::Application::on_open(std::__1::vector, std::__1::allocator > > const&, Glib::ustring const&)'
CMakeFiles/juci.dir/juci.cc.o:(.rodata+0x2d0): undefined reference to `Gio::Application::on_open(std::__1::vector, std::__1::allocator > > const&, Glib::ustring const&)'
CMakeFiles/juci.dir/juci.cc.o:(.rodata+0x4b0): undefined reference to `Gio::Application::on_open(std::__1::vector, std::__1::allocator > > const&, Glib::ustring const&)'
CMakeFiles/juci.dir/menu.cc.o: In function `Menu::add_action(std::__1::basic_string, std::__1::allocator > const&, std::__1::function)':
/home/amit/jucipp/src/menu.cc:(.text+0xa026): undefined reference to `Glib::ustring::ustring(std::__1::basic_string, std::__1::allocator > const&)'
CMakeFiles/juci.dir/menu.cc.o: In function `Menu::set_keys()':
/home/amit/jucipp/src/menu.cc:(.text+0xa395): undefined reference to `Glib::ustring::ustring(std::__1::basic_string, std::__1::allocator > const&)'
/home/amit/jucipp/src/menu.cc:(.text+0xa3a0): undefined reference to `Glib::ustring::ustring(std::__1::basic_string, std::__1::allocator > const&)'
CMakeFiles/juci.dir/menu.cc.o: In function `Menu::build()':
eidheim commented 8 years ago

Thank you as well for helping us finding a solution for such issues (hopefully).

Could you also paste the output of pkg-config --cflags --libs gtkmm-3.0 and pkg-config --cflags --libs gtksourceviewmm-3.0? This might help see if the correct libraries are found.

amit-jain-SBG commented 8 years ago
amit@amint:~/jucipp/build$ pkg-config --cflags --libs gtksourceviewmm-3.0
-pthread -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/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/gtksourceview-3.0 -I/usr/include/libxml2 -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/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -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/gtksourceviewmm-3.0/include -I/usr/include/cairomm-1.0 -I/usr/lib/cairomm-1.0/include -lgtksourceviewmm-3.0 -lgtkmm-3.0 -latkmm-1.6 -lgdkmm-3.0 -lgiomm-2.4 -lpangomm-1.4 -lglibmm-2.4 -lcairomm-1.0 -lsigc-2.0 -lgtksourceview-3.0 -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 
amit@amint:~/jucipp/build$ pkg-config --cflags --libs gtkmm-3.0
-pthread -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/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -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/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairomm-1.0 -I/usr/lib/cairomm-1.0/include -lgtkmm-3.0 -latkmm-1.6 -lgdkmm-3.0 -lgiomm-2.4 -lpangomm-1.4 -lglibmm-2.4 -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lgio-2.0 -lcairomm-1.0 -lcairo -lsigc-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 
eidheim commented 8 years ago

What g++ version are you using (g++ -v)? Found https://github.com/Beep6581/RawTherapee/issues/3024 which might be related, if you are using a newer g++ version (>=5) that is: "Upgrading GCC from 4.* to 5.* specifically in Gentoo requires one to recompile 'all libraries that use C++ code'". add_definitions (-D_GLIBCXX_USE_CXX11_ABI=0) at the start of ./CMakeLists.txt might solve this if I understand it correctly.

amit-jain-SBG commented 8 years ago
amit@amint:~/jucipp/build$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.9/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.2-10' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --with-arch-32=i586 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.9.2 (Debian 4.9.2-10) 
eidheim commented 8 years ago

When you did/do:

cd [path to jucipp]
rm -r build
mkdir build
cd build
cmake ..

What was the output of the cmake .. command?

amit-jain-SBG commented 8 years ago
amit@amint:~/jucipp/build$ cmake ..
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is Clang 3.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
-- 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
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.28") 
-- Found LibClang: /usr/lib/llvm-3.6/lib/libclang.so  
-- Boost version: 1.60.0
-- Found the following Boost libraries:
--   thread
--   log
--   system
--   filesystem
--   regex
-- checking for module 'gtkmm-3.0'
--   found gtkmm-3.0, version 3.14.0
-- checking for module 'gtksourceviewmm-3.0'
--   found gtksourceviewmm-3.0, version 3.2.0
-- Found ASPELL: /usr/lib/x86_64-linux-gnu/libaspell.so  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/amit/jucipp/build
eidheim commented 8 years ago

Ah, the problem probably lies here: -- The CXX compiler identification is Clang 3.5.0

Likely solution:

cd [path to jucipp]
rm -r build
mkdir build
cd build
cmake -DCMAKE_CXX_COMPILER=g++ ..
make
sudo make install

Sorry, should have asked of the cmake output earler. The problem is I think using clang compiler together with libraries compiled with gcc due to ABI differences. I'm not an expert on this however.

amit-jain-SBG commented 8 years ago

:+1:

Thanks a lot! I'll run it tomorrow and see how it compares to Codelite. Thanks a lot!

Linking CXX executable juci
[100%] Built target juci
eidheim commented 8 years ago

Splendid, hope you like it:) If you encounter more linking problems, but within juci, you might want to change cmake_command to cmake -DCMAKE_CXX_COMPILER=g++ in preferences. This is because you have made clang++ the default c++ compiler in your system (instead of g++).