-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Binary built with gcc 5.3.0 will go to crash in the end #24
Comments
Thanks for the report, I'll take a look this weekend. |
Thanks for your reply. The Fruit version I'm using is 2.0.4-0. I built with "g++-5 -std=c++11 fruit.cpp -lfruit" |
The issue looks specific to Ubuntu 14.04.
While GCC 4.8 works. In Ubuntu 15.10, I've tried the following compilers and they all work:
This might be caused by the fact that the Fruit packages are built with GCC (GCC 4.8 for Ubuntu 14.04) and then using them with another compiler is not guaranteed to work (it does usually work though; so I understand that people come to expect this).
So I would suggest that you do the same. Remember to uninstall the binary packages, as having a mix of manually-built files and binary packages could cause even more trouble. This might also be due to the fact that the binary packages are built using the openSUSE Build Service, and for Ubuntu 14.04 that uses GCC 4.8.2 instead of a more recent version (Fruit only supports GCC 4.8.3 or later). Since the prebuilt packages for 14.04 have issues, I've removed them entirely so that other people don't experience the same issues. Sorry for the trouble. |
It works. Thank you. :) |
I cannot compile it on Ubuntu 14.04 with gcc 4.8.4, see below 👍
Also see below my CMake results >
It only worked to compile Fruit 2.1, but not 3++ versions |
@qgicup: Yes, 3.x doesn't work with GCC<5.0 (and from your logs it's clear that you're using GCC 4.8.4). |
Hi,
I took the sample code provided by official website and was built with gcc 5.3.0 on Ubuntu 14.04.
The following is the backtrace:
#0 __GI___libc_free (mem=0xb) at malloc.c:2929
#1 0x0000000000405f60 in __gnu_cxx::new_allocatorstd::__detail::_Hash_node_base::deallocate(std::__detail::_Hash_node_base*, unsigned long) ()
#2 0x0000000000405914 in std::allocator_traitsstd::allocator<std::__detail::_Hash_node_base* >::deallocate(std::allocatorstd::__detail::_Hash_node_base*&, std::__detail::_Hash_node_base**, unsigned long) ()
#3 0x0000000000405e75 in std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<fruit::impl::TypeId const, fruit::impl::InjectorStorage::BindingCompressionInfo>, true> > >::_M_deallocate_buckets(std::__detail::_Hash_node_base**, unsigned long) ()
#4 0x00000000004057ca in std::_Hashtable<fruit::impl::TypeId, std::pair<fruit::impl::TypeId const, fruit::impl::InjectorStorage::BindingCompressionInfo>, std::allocator<std::pair<fruit::impl::TypeId const, fruit::impl::InjectorStorage::BindingCompressionInfo> >, std::__detail::_Select1st, std::equal_tofruit::impl::TypeId, std::hashfruit::impl::TypeId, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::_M_deallocate_buckets(std::__detail::_Hash_node_base**, unsigned long) ()
#5 0x00000000004051b6 in std::_Hashtable<fruit::impl::TypeId, std::pair<fruit::impl::TypeId const, fruit::impl::InjectorStorage::BindingCompressionInfo>, std::allocator<std::pair<fruit::impl::TypeId const, fruit::impl::InjectorStorage::BindingCompressionInfo> >, std::__detail::_Select1st, std::equal_tofruit::impl::TypeId, std::hashfruit::impl::TypeId, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::_M_deallocate_buckets() ()
#6 0x0000000000404d6e in std::_Hashtable<fruit::impl::TypeId, std::pair<fruit::impl::TypeId const, fruit::impl::InjectorStorage::BindingCompressionInfo>, std::allocator<std::pair<fruit::impl::TypeId const, fruit::impl::InjectorStorage::BindingCompressionInfo> >, std::__detail::_Select1st, std::equal_tofruit::impl::TypeId, std::hashfruit::impl::TypeId, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::~_Hashtable() ()
#7 0x00000000004046b0 in std::unordered_map<fruit::impl::TypeId, fruit::impl::InjectorStorage::BindingCompressionInfo, std::hashfruit::impl::TypeId, std::equal_tofruit::impl::TypeId, std::allocator<std::pair<fruit::impl::TypeId const, fruit::impl::InjectorStorage::BindingCompressionInfo> > >::~unordered_map() ()
#8 0x00000000004046d2 in fruit::impl::NormalizedComponentStorage::~NormalizedComponentStorage() ()
#9 0x0000000000404714 in std::default_deletefruit::impl::NormalizedComponentStorage::operator()(fruit::impl::NormalizedComponentStorage*) const ()
#10 0x0000000000403d35 in std::unique_ptr<fruit::impl::NormalizedComponentStorage, std::default_deletefruit::impl::NormalizedComponentStorage >::~unique_ptr() ()
#11 0x00000000004034b8 in fruit::impl::InjectorStorage::~InjectorStorage() ()
#12 0x00000000004034de in std::default_deletefruit::impl::InjectorStorage::operator()(fruit::impl::InjectorStorage*) const ()
#13 0x0000000000402af1 in std::unique_ptr<fruit::impl::InjectorStorage, std::default_deletefruit::impl::InjectorStorage >::~unique_ptr() ()
#14 0x00000000004023c0 in fruit::Injector::~Injector() ()
#15 0x0000000000401a7c in main ()**
The text was updated successfully, but these errors were encountered: