Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - QnxSDP660 Compiler 4.7.3 failed to buil on mature project: (3 Items)
   
QnxSDP660 Compiler 4.7.3 failed to buil on mature project  
My project was built successuflly on Blackberry 10 NDK. GCC 4.6.2
But it failed to build on latest QNX SDP 660. Here is the error report;

In file included from boost/boost/chrono/time_point.hpp:33:0,
                 from boost/boost/thread/lock_types.hpp:22,
                 from boost/boost/thread/pthread/recursive_mutex.hpp:13,
                 from boost/boost/thread/recursive_mutex.hpp:16,
                 from include/File1.hpp:14,
                 from include/File2.hpp:13,
                 from include/File3.hpp:12,
                 from File3.cpp:8:
/boost/boost/chrono/duration.hpp: In static member function 'static constexpr float boost::chrono::detail::
chrono_numeric_limits<float, true>::lowest()':
/boost/boost/chrono/duration.hpp:355:56: error: call to non-constexpr function 'static std::numeric_limits<float>::_Ty 
std::numeric_limits<float>::max()'
/boost/boost/chrono/duration.hpp: In static member function 'static constexpr double boost::chrono::detail::
chrono_numeric_limits<double, true>::lowest()':
/boost/boost/chrono/duration.hpp:363:57: error: call to non-constexpr function 'static std::numeric_limits<double>::_Ty 
std::numeric_limits<double>::max()'
/boost/boost/chrono/duration.hpp: In static member function 'static constexpr long double boost::chrono::detail::
chrono_numeric_limits<long double, true>::lowest()':
/boost/boost/chrono/duration.hpp:371:61: error: call to non-constexpr function 'static std::numeric_limits<long double>:
:_Ty std::numeric_limits<long double>::max()'


I have searched by google.  Someone say it should be the issue of old c++ library . The boost says that it has fixed the
 bug. 

Is that the issue of our Qnx tools chain??

Thanks/Zongjun
Re: QnxSDP660 Compiler 4.7.3 failed to buil on mature project  
Here is the bug report description on boost:

 I am using QNX SDB660 GCC 4.7.3 to create QNX C++ project. It is very simple like that.

#include <boost/thread/recursive_mutex.hpp>

int main(int argc, char *argv[]) {

    return EXIT_SUCCESS;

}

It reports the following error.

In file included from boost/chrono/time_point.hpp:33:0,

    from boost/thread/lock_types.hpp:22, from boost/thread/pthread/recursive_mutex.hpp:13, from boost/thread/
recursive_mutex.hpp:16, from /home/test/number/number.cc:1:

boost/chrono/duration.hpp: In static member function 'static constexpr float boost::chrono::detail::
chrono_numeric_limits<float, true>::lowest()': boost/chrono/duration.hpp:355:56: error: call to non-constexpr function 
'static std::numeric_limits<float>::_Ty std::numeric_limits<float>::max()' boost/chrono/duration.hpp: In static member 
function 'static constexpr double boost::chrono::detail::chrono_numeric_limits<double, true>::lowest()': boost/chrono/
duration.hpp:363:57: error: call to non-constexpr function 'static std::numeric_limits<double>::_Ty std::numeric_limits<
double>::max()' boost/chrono/duration.hpp: In static member function 'static constexpr long double boost::chrono::detail
::chrono_numeric_limits<long double, true>::lowest()': boost/chrono/duration.hpp:371:61: error: call to non-constexpr 
function 'static std::numeric_limits<long double>::_Ty std::numeric_limits<long double>::max()'

Is it QNX related or general bug for boost? 
Re: QnxSDP660 Compiler 4.7.3 failed to buil on mature project  
I have exact same errors as you posted.
QNX660 + gcc 4.8.1 with boost 1.55 and 1.56. Results are same.
By deault, QNX cross compile toolset compiles with gcc_ntox86(uses libcpp). If I change it to gcc_ntox86_gpp(uses 
libstdc++), it compiles successfully. Maybe you can fix the problem by this. But I have to use Qt5 that uses libcpp and 
libcpp-ne so I have to build boost with default libcpp.
To build with gcc_ntox86_gpp pass argument cxxflags=-Vgcc_ntox86_gpp to b2 command line.
I've googled about this issue and got same info as you by now.

Someone suggested to define BOOST_NO_CXX11_NUMERIC_LIMITS and it removes errors about "call to non-constexpr function" 
stuff but still another errors so I'm not sure it is right way.

attached log is errors with BOOST_NO_CXX11_NUMERIC_LIMITS.
Attachment: Text buildlog-with-boost_no_cxx11.log 45.13 KB