Currently porting an existing c++ linux application to Solaris 10 and 11 (First x86 then SPAARC).
Started with installing gcc5g++ on solaris 10 and started compilation. Got errors in math.h and found out that, it is a bug in the version of g++5.5 which I installed. Because of this bug I get errors like
/opt/csw/lib/gcc/i386-pc-solaris2.10/5.5.0/include-fixed/math.h:53:12: error: 'std::double_t' has not been declared using std::double_t; ^
/opt/csw/lib/gcc/i386-pc-solaris2.10/5.5.0/include-fixed/math.h:55:12: error: 'std::fpclassify' has not been declared using std::fpclassify; ^
/opt/csw/lib/gcc/i386-pc-solaris2.10/5.5.0/include-fixed/math.h:56:12: error: 'std::isfinite' has not been declared using std::isfinite; ^
Since my application has used c++14 constructs which g++ 4.92 doesn't support fully. Need a later version of g++ (above 5.5)
I couldn't find any packages from where I can install later version of g++ on Solaris 10, hence I used a Solaris 11 machine installed g++ 7.3 trying to execute the executable generated on Solaris 11 to Solaris 10 I get the following error:
ld.so.1: hellod: fatal: libc.so.1: version 'SUNWpublic' not found (required by file /Desktop/hellod) ld.so.1: hellod: fatal: libc.so.1: open failed: No such file or directory Killed
Questions
- Is there any other methods to solve the errors which I am facing ?
- Can I compile on Solaris 11 and make it work on Solaris 10 ?
- What are the other methods to install Later versions on g++ on Solaris 10 ?
- What are the other alternatives which I can cross compile / port this application ?
Thank full to any help and pointers related to this topic.