Is it Solaris or Linux ?
Has anyone tried to build STLPort 4.5 on Linux with Sun Studio?
This package is incredibly complex, and riddled with #ifdef hell.
I don't blame the author for that ... it's taken a long time for the industry to settle on standards, and for bugs to disappear from compilers.
The first issue I'm facing is method STLport uses to detect the platform it's building for. It's actually checking multiple versions of sun studio, and not the platform itself.
I could use some suggestions on how best to solve this problem. I build STLport for both Solaris x86 and for SuSE Linux, for 64bit running on AMD hardware.
If STLport thinks it's compiling on Solaris, it starts including Sun-specific header files that don't exist on Linux.
Is there a preferred way to detect/distinguish the platforms?
ps., I don't give a darn about historic issues and keeping ancient compilers alive in this code; just how to move forward with the latest sun studio on both platforms.
[1011 byte] By [
dickdunbar] at [2007-11-26 8:31:01]

# 1
> Is there a preferred way to detect/distinguish the platforms?
Since latest technology preview (TP4):
[b]__sun[/b] is defined on Solaris only
[b]__linux[/b] is defined on Linux only
If you need to detect SunStudio compilers you can check
[b]__SUNPRO_C[/b]for Sun Studio C compiler
[b]__SUNPRO_CC[/b] for Sun Studio C++ compiler
regards,
__Fedor.
SFV at 2007-7-6 21:52:25 >

# 2
Sun C++ comes with STLport version 4.5.3. Porting STLport was a major undertaking.
If you don't need features specific to a newer version of STLport, you can just use the one that comes with the compiler.
To use STLport, add the option -library=stlport4 to every CC command, compiling and linking. For more details, refer to the C++ Users Guide section on LIbraries.
# 3
Very complete answers. Thanks for the help.
After I compare the STLPort versions ... what we've been hacking on and what is delivered with sunstudio, is there a preferred place to report STLport issues?
Would fix suggestions be unwelcome on these forums, for example?
__Fedor ... for internal use only? Family pet name ? <grin>
# 4
Found the C++ User Guide Library guide. (Thanks)
Didn't find the stlport bits ... prod/lib/stlport4 is missing from:
sunstudio-20060608.linux.tar.bz2
I found the stlport4 files I needed in the solaris distro.
StudioExpress-sol-x86-2006-06.tar.bz2
Which is missing (of course) the amd64 linux prebuilt archive and shared library.
Looking to see if I can build that myself, but I may need some help getting those bits.
Message was edited by: __vmguy
dickdunbar
# 5
> Would fix suggestions be unwelcome on these forums, for example?
Why should it be? Thats forums for discussing our compilers. If you dont plan to go extremely offensive, any information on our compilers usage is welcome.
regards,
__Fedor.
PS. as for [i]internal use[/i] - it is just a (simple) way to do indentation on this html'ed forum.
SFV at 2007-7-6 21:52:25 >

# 6
You can report STLport issues here, or by filing a bug report at bugs.sun.com.
You get the best response and resolution if you have a service contract with Sun. You can get pre-release patches and updates, escalate issues that are important to you, and be kept informed of progress. For the free support here and at bugs.sun.com, we make no promises.
Later versions of STLport are not compatible with 4.5.3, which is why we have not updated the version that we ship. Because of the incompatibility, we are currenlty evaluating whether to ship a newer version of STLport, or ship some other library that promises to be more stable. That is, whatever new thing we ship will be incompatible, so we need not restrict our evaluations to STLport.
We have not yet reached a decision.
There is a fairly long delay between the compiler development process and what gets posted on the web site. I think the STLport bits for linux were not ready in time for the update currently on the web site. I'm looking into the situation and will let you know what I find out.
# 7
> service contract
Thanks for the advice; the work I'm involved with now won't wait for the formal commercial grind. We've already had to hack STLport, and have had _no_ success in pushing our fixes back into the distribution, so we're pretty much on our own.
I found what I needed in the Solaris studio distribution.
I'll open a bug report to feed simple fixes back to Sun for evaluation.
Example: "_ _ v a l u e" is now a reserved word in many modern C++ compilers. It's a simple change to STLport headers to use something different ... we chose: " _ _ v a l"