[Stlport-devel] Sun Studio 12 support in STLport 5.1.6?
Brought to you by:
complement
|
From: Peter S. <pe...@me...> - 2009-01-14 10:26:14
|
Hi, I would like to use STLport 5.1.6 with Sun C++ Compiler 5.9 (Studio 12) on an x86-based machine running SunOS 5.10, but I having trouble compiling even the most basic programs, let alone STLport's own library or unit tests. After extracting the tar.bz2 archive, I modified build/Makefiles/gmake/lib/CC.mak to unset -xcode=pic32 from $OPT, because that flag doesn't do anything on x86 and just triggers a warning. Then I ran GNU make as instructed: ~/STLport-5.1.6/build/lib$ gmake -f CC.mak depend "../../stlport/stl/config/stl_mycomp.h", line 33: #error: "Your compiler version is not recognized by STLport. Please edit <stlport/stl/config/stl_mycomp.h>" cc: acomp failed for ../../src/c_locale.c "../../stlport/stl/config/stl_mycomp.h", line 33: #error: "Your compiler version is not recognized by STLport. Please edit <stlport/stl/config/stl_mycomp.h>" cc: acomp failed for ../../src/cxa.c "../../stlport/stl/config/stl_mycomp.h", line 33: #error: "Your compiler version is not recognized by STLport. Please edit <stlport/stl/config/stl_mycomp.h>" cc: acomp failed for ../../src/c_locale.c "../../stlport/stl/config/stl_mycomp.h", line 33: #error: "Your compiler version is not recognized by STLport. Please edit <stlport/stl/config/stl_mycomp.h>" cc: acomp failed for ../../src/cxa.c "../../stlport/stl/config/stl_mycomp.h", line 33: #error: "Your compiler version is not recognized by STLport. Please edit <stlport/stl/config/stl_mycomp.h>" cc: acomp failed for ../../src/c_locale.c "../../stlport/stl/config/stl_mycomp.h", line 33: #error: "Your compiler version is not recognized by STLport. Please edit <stlport/stl/config/stl_mycomp.h>" cc: acomp failed for ../../src/cxa.c Those errors surprise me because STLport very much looks like it *does* know about that compiler. Anyhow, I edited the stl_mycomp.h file as follows #ifndef _STLP_MYCOMP_H #define _STLP_MYCOMP_H # include "_solaris.h" # include "_sunprocc.h" #endif and tried again. With that change, the 'depend' target seems to work fine, but an attempt to build STLport's library gives the following errors: ~/STLport-5.1.6/build/lib$ gmake -f CC.mak CC -erroff=doubunder -qoption ccfe -expand=1000 -library=no%Cstd,no%iostream,no%rwtools7 -xildoff -mt +w2 -xO2 -I. -I../../stlport -c -o obj/CC/so/dll_main.o ../../src/dll_main.cpp "../../stlport/stl/_cstdlib.h", line 103: Error: llabs is not defined. "../../stlport/stl/_cstdlib.h", line 104: Error: lldiv_t is not defined. "../../stlport/stl/_cstdlib.h", line 105: Error: lldiv is not defined. "../../stlport/stl/_cstdlib.h", line 155: Error: llabs is not a member of file level. "../../stlport/stl/_cstdlib.h", line 155: Warning: __x is defined but not used. "../../stlport/stl/_cstdlib.h", line 156: Error: lldiv_t is not defined. "../../stlport/stl/_cstdlib.h", line 156: Warning: Implicit int is not supported in C++. "../../stlport/stl/_cstdlib.h", line 156: Error: lldiv is not a member of file level. "../../stlport/stl/_cstdlib.h", line 156: Warning: __x is defined but not used. "../../stlport/stl/_cstdlib.h", line 156: Warning: __y is defined but not used. "../../stlport/stl/_cmath.h", line 415: Error: fabs is not a member of file level. "../../stlport/stl/_cmath.h", line 414: Warning: __x is defined but not used. "../../stlport/stl/_cmath.h", line 417: Error: fabs is not a member of file level. "../../stlport/stl/_cmath.h", line 417: Warning: x is defined but not used. "../../stlport/stl/_cmath.h", line 417: Error: fabs is not a member of file level. "../../stlport/stl/_cmath.h", line 417: Warning: x is defined but not used. "../../stlport/stl/_cmath.h", line 422: Error: Overloading ambiguity between "acos(float)" and "acos(long double)". "../../stlport/stl/_cmath.h", line 423: Error: Overloading ambiguity between "asin(float)" and "asin(long double)". "../../stlport/stl/_cmath.h", line 424: Error: Overloading ambiguity between "atan(float)" and "atan(long double)". "../../stlport/stl/_cmath.h", line 425: Error: Overloading ambiguity between "atan2(float, float)" and "atan2(long double, long double)". "../../stlport/stl/_cmath.h", line 426: Error: Overloading ambiguity between "ceil(float)" and "ceil(long double)". "../../stlport/stl/_cmath.h", line 427: Error: Overloading ambiguity between "cos(float)" and "cos(long double)". "../../stlport/stl/_cmath.h", line 428: Error: Overloading ambiguity between "cosh(float)" and "cosh(long double)". "../../stlport/stl/_cmath.h", line 429: Error: Overloading ambiguity between "exp(float)" and "exp(long double)". "../../stlport/stl/_cmath.h", line 430: Error: Overloading ambiguity between "fabs(float)" and "fabs(long double)". "../../stlport/stl/_cmath.h", line 431: Error: Overloading ambiguity between "floor(float)" and "floor(long double)". "../../stlport/stl/_cmath.h", line 432: Error: Overloading ambiguity between "fmod(float, float)" and "fmod(long double, long double)". "../../stlport/stl/_cmath.h", line 433: Error: Overloading ambiguity between "frexp(float, int*)" and "frexp(long double, int*)". "../../stlport/stl/_cmath.h", line 434: Error: Overloading ambiguity between "ldexp(float, int)" and "ldexp(long double, int)". "../../stlport/stl/_cmath.h", line 435: Error: Overloading ambiguity between "log(float)" and "log(long double)". "../../stlport/stl/_cmath.h", line 436: Error: Overloading ambiguity between "log10(float)" and "log10(long double)". "../../stlport/stl/_cmath.h", line 437: Error: Formal argument y of type float* in call to modf(float, float*) is being passed double*. Compilation aborted, too many Error messages. Now, I assume that fixing those errors is just a matter of defining a few preprocessor symbols in just the right way, but the selection of available configuration options is a little overwhelming, so I wonder whether anyone has some advice for me how to accomplish that. Has anyone managed to build STLport 5.1.6 with a native Sun compiler? Is that platform actually supported? With kind regards, Peter |