Opened 9 years ago

Closed 6 years ago

#8552 closed Bugs (fixed)

Error compiling libboost_thread for android

Reported by: Radke Owned by: Daniel James
Milestone: Boost 1.63.0 Component: hash
Version: Boost 1.53.0 Severity: Problem
Keywords: Cc:

Description

System configuration: Ubuntu 12.04, android-ndk-r8e, Android 4.0.3 level 15 on device, gcc android4.6 (but this also applies to Windows 7 with minGw)

Setup: Most parts of boost build as expected, after invoking

./bootstrap.sh --with-libraries=thread,signals,serialization,test,regex,system,date_time,exception,filesystem,math

./bjam --without-python --without-serialization toolset=gcc-android4.6 link=static runtime-link=static target-os=linux --stagedir=android --prefix=$MYDIR install

Expected behaviour: After this compilation there should be a libboost_thread.a binary in the specified prefix.

Observed behaviour: When compiling, the gcc fails with

./boost/functional/hash/extensions.hpp:257:34: error: no matching function for call to 'hash_value(wchar_t const&'

Comment: I will attach the whole log of a compile --with-thread to this report, as well as my user-config.jam.

Attachments (2)

errorLogGcc.txt (13.3 KB ) - added by Radke 9 years ago.
The whole output of the bjam call
user-config-jam-content.txt (1.2 KB ) - added by Radke 9 years ago.
The necessary content of the user-config.jam file

Download all attachments as: .zip

Change History (8)

by Radke, 9 years ago

Attachment: errorLogGcc.txt added

The whole output of the bjam call

by Radke, 9 years ago

Attachment: user-config-jam-content.txt added

The necessary content of the user-config.jam file

comment:1 by anonymous, 9 years ago

Version: Boost 1.52.0Boost 1.53.0

in reply to:  1 comment:2 by Radke, 9 years ago

Replying to anonymous: Is now tested for boost 1_53_0 too with the same results

comment:3 by Kohei Takahashi, 6 years ago

Component: Building Boosthash
Owner: set to Daniel James

comment:4 by anonymous, 6 years ago

Not sure what I can do much for a four year old android bug report. I'm not seeing this in the regression test results for android with recent versions.

My guess is that in config BOOST_NO_STD_WSTRING was not defined, but BOOST_NO_INTRINSIC_WCHAR_T was defined, meaning that the code thinks there is a std::wstring, but no wchar_t. That results in hash defining a hash function for std::wstring, but it fails to compile because it can't hash the characters. I'll put in a change to only define a hash function for std::wstring when wchar_t is available, but I'm not sure if it'll do any good.

I suppose another possibility would be to write special case code for strings so that it doesn't need a hash function for characters, but I'd rather not do that, as I don't want to add new functionality at this point.

comment:6 by Daniel James, 6 years ago

Milestone: To Be DeterminedBoost 1.63.0
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.