Skip to content
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

Error compiling K on Ubuntu 16.04 #548

Closed
b-seite opened this issue Jan 8, 2018 · 3 comments
Closed

Error compiling K on Ubuntu 16.04 #548

b-seite opened this issue Jan 8, 2018 · 3 comments

Comments

@b-seite
Copy link
Contributor

b-seite commented Jan 8, 2018

Hi Carles,

since several Days (around a week or so) i am struggling around with compiling K.
The compiling stops with an Error collect2: error: ld returned 1 exit status but i can not extract the error. Maybe you have an idea?

Here is some more output right before the error:

`build-x86_64-linux-gnu/local/lib/K-x86_64-linux-gnu.a(K-x86_64-linux-gnu.o): In Funktion `std::thread::_State_impl<std::_Bind_simple<std::__future_base::_Async_state_impl<std::_Bind_simple<K::kA(K::Gw*, uWS::Hub*)::{lambda(Async*)#5}::operator()(Async*) const::{lambda()#1} ()>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::char_traits<char> > > >::_Async_state_impl(K::kA(K::Gw*, uWS::Hub*)::{lambda(Async*)#5}::operator()(Async*) const::{lambda()#1}&&)::{lambda()#1} ()> >::~_State_impl()':
/usr/include/c++/6/thread:189: Nicht definierter Verweis auf `std::thread::_State::~_State()'
build-x86_64-linux-gnu/local/lib/K-x86_64-linux-gnu.a(K-x86_64-linux-gnu.o): In Funktion `thread<std::__future_base::_Async_state_impl<_BoundFn, <template-parameter-1-2> >::_Async_state_impl(_BoundFn&&) [with _BoundFn = std::_Bind_simple<K::kA(K::Gw*, uWS::Hub*)::<lambda(Async*)>::<lambda()>()>; _Res = std::vector<std::__cxx11::basic_string<char> >]::<lambda()> >':
/usr/include/c++/6/thread:137: Nicht definierter Verweis auf `std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)())'
build-x86_64-linux-gnu/local/lib/K-x86_64-linux-gnu.a(K-x86_64-linux-gnu.o): In Funktion `std::thread::_State_impl<std::_Bind_simple<std::__future_base::_Async_state_impl<std::_Bind_simple<K::kA(K::Gw*, uWS::Hub*)::{lambda(Async*)#5}::operator()(Async*) const::{lambda()#1} ()>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::char_traits<char> > > >::_Async_state_impl(K::kA(K::Gw*, uWS::Hub*)::{lambda(Async*)#5}::operator()(Async*) const::{lambda()#1}&&)::{lambda()#1} ()> >::~_State_impl()':
/usr/include/c++/6/thread:189: Nicht definierter Verweis auf `std::thread::_State::~_State()'
build-x86_64-linux-gnu/local/lib/K-x86_64-linux-gnu.a(K-x86_64-linux-gnu.o): In Funktion `std::thread::_State_impl<std::_Bind_simple<std::__future_base::_Async_state_impl<std::_Bind_simple<K::GwKraken::levels()::{lambda(Async*)#3}::operator()(Async*) const::{lambda()#1} ()>, std::vector<K::mTrade, std::allocator<std::_Bind_simple<K::GwKraken::levels()::{lambda(Async*)#3}::operator()(Async*) const::{lambda()#1} ()> > > >::_Async_state_impl(K::GwKraken::levels()::{lambda(Async*)#3}::operator()(Async*) const::{lambda()#1}&&)::{lambda()#1} ()> >::~_State_impl()':
nst::{lambda()#1}&&)::{lambda()#1} ()> >::~_State_impl()':
/usr/include/c++/6/thread:189: Nicht definierter Verweis auf `std::thread::_State::~_State()'
build-x86_64-linux-gnu/local/lib/K-x86_64-linux-gnu.a(K-x86_64-linux-gnu.o): In Funktion `std::thread::_State_impl<std::_Bind_simple<std::__future_base::_Async_state_impl<std::_Bind_simple<K::GwKraken::levels()::{lambda(Async*)#3}::operator()(Async*) const::{lambda()#1} ()>, std::vector<K::mTrade, std::allocator<std::_Bind_simple<K::GwKraken::levels()::{lambda(Async*)#3}::operator()(Async*) const::{lambda()#1} ()> > > >::_Async_state_impl(K::GwKraken::levels()::{lambda(Async*)#3}::operator()(Async*) const::{lambda()#1}&&)::{lambda()#1} ()> >::~_State_impl()':
/usr/include/c++/6/thread:189: Nicht definierter Verweis auf `std::thread::_State::~_State()'
build-x86_64-linux-gnu/local/lib/K-x86_64-linux-gnu.a(K-x86_64-linux-gnu.o): In Funktion `std::thread::_State_impl<std::_Bind_simple<std::__future_base::_Async_state_impl<std::_Bind_simple<K::GwKraken::levels()::{lambda(Async*)#1}::operator()(Async*) const::{lambda()#1} ()>, K::mLevels>::_Async_state_impl(K::GwKraken::levels()::{lambda(Async*)#1}::operator()(Async*) const::{lambda()#1}&&)::{lambda()#1} ()> >::~_State_impl()':
/usr/include/c++/6/thread:189: Nicht definierter Verweis auf `std::thread::_State::~_State()'
build-x86_64-linux-gnu/local/lib/K-x86_64-linux-gnu.a(K-x86_64-linux-gnu.o): In Funktion `std::thread::_State_impl<std::_Bind_simple<std::__future_base::_Async_state_impl<std::_Bind_simple<K::GwKraken::levels()::{lambda(Async*)#1}::operator()(Async*) const::{lambda()#1} ()>, K::mLevels>::_Async_state_impl(K::GwKraken::levels()::{lambda(Async*)#1}::operator()(Async*) const::{lambda()#1}&&)::{lambda()#1} ()> >::~_State_impl()':
/usr/include/c++/6/thread:189: Nicht definierter Verweis auf `std::thread::_State::~_State()'
build-x86_64-linux-gnu/local/lib/K-x86_64-linux-gnu.a(K-x86_64-linux-gnu.o): In Funktion `std::thread::thread<std::__future_base::_Async_state_impl<std::_Bind_simple<K::GwKraken::levels()::{lambda(Async*)#1}::operator()(Async*) const::{lambda()#1} ()>, K::mLevels>::_Async_state_impl(K::GwKraken::levels()::{lambda(Async*)#1}::operator()(Async*) const::{lambda()#1}&&)::{lambda()#1}>(std::__future_base::_Async_state_impl<std::_Bind_simple<K::GwKraken::levels()::{lambda(Async*)#1}::operator()(Async*) const::{lambda()#1} ()>, K::mLevels>::_Async_state_impl(K::GwKraken::levels()::{lambda(Async*)#1}::operator()(Async*) const::{lambda()#1}&&)::{lambda()#1}&&)':
/usr/include/c++/6/thread:137: Nicht definierter Verweis auf `std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)())'
build-x86_64-linux-gnu/local/lib/K-x86_64-linux-gnu.a(K-x86_64-linux-gnu.o): In Funktion `std::thread::thread<std::__future_base::_Async_state_impl<std::_Bind_simple<K::GwKraken::levels()::{lambda(Async*)#3}::operator()(Async*) const::{lambda()#1} ()>, std::vector<K::mTrade, std::allocator<std::_Bind_simple<K::GwKraken::levels()::{lambda(Async*)#3}::operator()(Async*) const::{lambda()#1} ()> > > >::_Async_state_impl(K::GwKraken::levels()::{lambda(Async*)#3}::operator()(Async*) const::{lambda()#1}&&)::{lambda()#1}>(std::__future_base::_Async_state_impl<std::_Bind_simple<K::GwKraken::levels()::{lambda(Async*)#3}::operator()(Async*) const::{lambda()#1} ()>, std::vector<K::mTrade, std::allocator<std::_Bind_simple<K::GwKraken::levels()::{lambda(Async*)#3}::operator()(Async*) const::{lambda()#1} ()> > > >::_Async_state_impl(K::GwKraken::levels()::{lambda(Async*)#3}::operator()(Async*) const::{lambda()#1}&&)::{lambda()#1}&&)':
/usr/include/c++/6/thread:137: Nicht definierter Verweis auf `std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)())'
build-x86_64-linux-gnu/local/lib/K-x86_64-linux-gnu.a(K-x86_64-linux-gnu.o):(.data.rel.ro+0xc0): Nicht definierter Verweis auf `typeinfo for std::thread::_State'
build-x86_64-linux-gnu/local/lib/K-x86_64-linux-gnu.a(K-x86_64-linux-gnu.o):(.data.rel.ro._ZTINSt6thread11_State_implISt12_Bind_simpleIFZNSt13__future_base17_Async_state_implIS1_IFZZN1K8GwKraken6levelsEvENKUlP5AsyncE_clES7_EUlvE_vEENS4_7mLevelsEEC4EOSB_EUlvE_vEEEE[_ZTINSt6thread11_State_implISt12_Bind_simpleIFZNSt13__future_base17_Async_state_implIS1_IFZZN1K8GwKraken6levelsEvENKUlP5AsyncE_clES7_EUlvE_vEENS4_7mLevelsEEC4EOSB_EUlvE_vEEEE]+0x10): Nicht definierter Verweis auf `typeinfo for std::thread::_State'
build-x86_64-linux-gnu/local/lib/K-x86_64-linux-gnu.a(K-x86_64-linux-gnu.o):(.data.rel.ro._ZTINSt6thread11_State_implISt12_Bind_simpleIFZNSt13__future_base17_Async_state_implIS1_IFZZN1K8GwKraken6levelsEvENKUlP5AsyncE1_clES7_EUlvE_vEESt6vectorINS4_6mTradeESaISD_EEEC4EOSB_EUlvE_vEEEE[_ZTINSt6thread11_State_implISt12_Bind_simpleIFZNSt13__future_base17_Async_state_implIS1_IFZZN1K8GwKraken6levelsEvENKUlP5AsyncE1_clES7_EUlvE_vEESt6vectorINS4_6mTradeESaISD_EEEC4EOSB_EUlvE_vEEEE]+0x10): Nicht definierter Verweis auf `typeinfo for std::thread::_State'
collect2: error: ld returned 1 exit status`

It happens with the latest commits. I rebuilded the dependencies and the machine is up-to-date.

thank a lot in advance
Boris

@b-seite
Copy link
Contributor Author

b-seite commented Jan 8, 2018

I edited line 5 & 6 in the makefile to where it was ten days ago:
CXX = $(CHOST)-g++-6 CC = $(CHOST)-gcc-6
and the Problem was gone. So it seems to be an issue with the GCC version on Ubuntu?

@ctubio
Copy link
Owner

ctubio commented Jan 8, 2018

yea we found this the other day on IRC too. the problem is that for my cross compilation build process i need the -6 out, as you say is mandatory to use g++ v6, but is a mess the -6 for compile for darwin from debian

what i do is to relink correctly /usr/bin/g++ to /usr/bin/g++-6 instead of whatever is by default on a given distro/buildchain

i will try to add this note about the "check links before compile" (cos i really dont want to put back the -6 :P)

@ctubio
Copy link
Owner

ctubio commented Jan 8, 2018

or we could check g++ version before make dist and make to show a nice readable user error on mismatch xD

many thanks for insist on this'¡

@ctubio ctubio closed this as completed in 84fd169 Jan 8, 2018
ctubio added a commit that referenced this issue Jan 9, 2018
Free Software Free Society

To support commits by ctubio,
you can buy-me-a-drink with a small git tip at:
  1GitTipgxvKB3zjCLXRcSgDhC9pivkpc7u

I promise to drink chocolate milk in the development of the next commit.

To request new features or in case this commit breaks something for you,
please create a new github issue with all possible details,
but never share your API Keys!

Signed-off-by: Carles Tubio <ctubio@users.noreply.github.com>

Free Software Free Society

To support commits by ctubio,
you can buy-me-a-drink with a small git tip at:
  1GitTipgxvKB3zjCLXRcSgDhC9pivkpc7u

I promise to drink chocolate milk in the development of the next commit.

To request new features or in case this commit breaks something for you,
please create a new github issue with all possible details,
but never share your API Keys!

Signed-off-by: Carles Tubio <ctubio@users.noreply.github.com>

Free Software Free Society

To support commits by ctubio,
you can buy-me-a-drink with a small git tip at:
  1GitTipgxvKB3zjCLXRcSgDhC9pivkpc7u

I promise to drink chocolate milk in the development of the next commit.

To request new features or in case this commit breaks something for you,
please create a new github issue with all possible details,
but never share your API Keys!

Signed-off-by: Carles Tubio <ctubio@users.noreply.github.com>
ctubio added a commit that referenced this issue Jan 9, 2018
Free Software Free Society

To support commits by ctubio,
you can buy-me-a-drink with a small git tip at:
  1GitTipgxvKB3zjCLXRcSgDhC9pivkpc7u

I promise to drink chocolate milk in the development of the next commit.

To request new features or in case this commit breaks something for you,
please create a new github issue with all possible details,
but never share your API Keys!

Signed-off-by: Carles Tubio <ctubio@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants