Project

General

Profile

Actions

Bug #2751

closed

Boost linkage check error: undefined reference to symbol 'pthread_cancel'

Added by Anche Kuo about 9 years ago. Updated almost 7 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Build
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

I have been working on porting NDN onto Intel Galileo (I am the author of this gitbook: http://schwannden.gitbooks.io/ndn-on-galileo)
And I have set up the cross compilation toolchain with Yocto, and was able to cross compile both ndn-cxx and NFD.

After pulling the newest ndn-cxx and NFD today, the configuration of NFD failed at checking boost linkage. The two error messages are related to undefined pthread_cancel and std::to_string. I am pretty sure my environment have pthread_cancel, and is wondering why the test fail? As for to_string, my cross compilation environment does not have this function (it does support c++11, but does not have this specific function). How do I use boost::chrono::to_string to work around?

It seems like the test code is generated during waf configuration? Since the error log says the error happens when compiling file in /opt/ndn/N FD/build/.conf_check_a0e36c424bb9d872e887a8aabee0c828/, which is a folder no where to be found. Can someone point me to the right direction?

In the previous build, I simply delete the test on boost completely in wscript. And the resulting binary is usable! I had to modify a few source code (std::to_string to boost::chrono::to_string). But this time, deleting the whole test does not make compilation successful. There is a linkage error about "undefined reference to boost::detail::set_tss_data".

Can someone point me toward the right direction?


Files

config.log (23.1 KB) config.log Anche Kuo, 04/16/2015 09:40 AM
Actions #1

Updated by Davide Pesavento about 9 years ago

  • Subject changed from Boost Linkage check error related to waf to Boost linkage check error: undefined reference to symbol 'pthread_cancel'
  • Category set to Build
  • Start date deleted (04/16/2015)

The to_string check failure is not fatal, you can ignore it. Since your toolchain does not support to_string, an alternative implementation will automatically be used.

The boost linkage error is caused (I think) by a missing -pthread on the compiler/linker command line.

Actions #2

Updated by Junxiao Shi about 9 years ago

  • Description updated (diff)
  • Target version set to Unsupported
Actions #3

Updated by Anche Kuo about 9 years ago

Dear Davide, thank you for the reply.

I added the -pthread in my LDFLAGS environment variable and eveything worked. Thank you so much :)

Actions #4

Updated by Anche Kuo almost 9 years ago

Davide Pesavento wrote:

The to_string check failure is not fatal, you can ignore it. Since your toolchain does not support to_string, an alternative implementation will automatically be used.

The boost linkage error is caused (I think) by a missing -pthread on the compiler/linker command line.

Dear David, this thread should be closed :) Thanks for the help.

Actions #5

Updated by Davide Pesavento almost 9 years ago

Anche Kuo wrote:

Dear David, this thread should be closed

Why? Not linking with -pthread is an instance of underlinking and it's a bug that must be fixed.

Actions #6

Updated by Anche Kuo almost 9 years ago

Davide Pesavento wrote:

Why? Not linking with -pthread is an instance of underlinking and it's a bug that must be fixed.

Hi Davide, I have not compiled NFD on my PC for a while, but last time I did, it works fine. I thought it is a specific problem that happens with my cross compilation environment :)

Actions #7

Updated by Davide Pesavento almost 9 years ago

Well, I can reproduce the absence of -pthread with a native build on Ubuntu 14.10, so the problem is not in your cross-compilation environment, it simply appears that your linker is more picky than mine.

Anyway, if the others think this is not worth fixing, feel free to reject.

Actions #8

Updated by Junxiao Shi almost 7 years ago

  • Status changed from New to Rejected

Given both participants of this issue have requested this issue to be closed, and there's no other complaint, I'm rejecting it.

Actions

Also available in: Atom PDF