[Log4cplus-devel] [ log4cplus-Bugs-3196803 ] Requiring STLport on Solaris is problematic
Logging Framework for C++
Brought to you by:
wilx
From: SourceForge.net <no...@so...> - 2012-09-09 16:03:37
|
Bugs item #3196803, was opened at 2011-03-01 18:44 Message generated for change (Comment added) made by wilx You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=429073&aid=3196803&group_id=40830 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Build Group: v1.1.x Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: Will Mason (will_mason) Assigned to: Václav Zeman (wilx) Summary: Requiring STLport on Solaris is problematic Initial Comment: In your configure.in script you explicitly select the option -library=stlport4 when building with Sun's compiler on Solaris. This is very problematic. Because libtool will pick up those options in builds of downstream products, you have now forced everyone who uses log4cplus also to use STLport, whether they want to or not. I edited your configure script and replaced stlport4 with Cstd, Sun's version of STL, and log4cplus built just fine, as did my product after making this change. It's kind of curious that, in light of the fact that your product does not even require STLport, that you would choose not to use the default library. I would recommend that you do no select which version of STL your users must use. If I were you, I would not use the -library compiler option at all and just let the compiler choose the default. If a user wants a different library, then they can set the CXXFLAGS and LDLFAGS themselves. The way your configure script is set up, you literally force STLport down everyone's throat. Thanks for your attention. And, by the way, I really like your library. It's awesome. ---------------------------------------------------------------------- >Comment By: Václav Zeman (wilx) Date: 2012-09-09 09:03 Message: And I have applied a similar patch to 1.0.4.1 branch as well. It is part of 1.0.4.2-RC1 release now. ---------------------------------------------------------------------- Comment By: Václav Zeman (wilx) Date: 2012-09-09 03:02 Message: I am documenting the change as follows and I consider it fixed now for good. "Solaris Studio compilers' default standard C++ library is very non-standard. It seems that it is not conforming enough in, e.g., Sun C++ 5.12 Linux_i386 2011/11/16 (missing std::time_t, etc.), but it works well enough on Solaris with Sun C++ 5.8 2005/10/13. Thus log4cplus adds -library=stlport4 to the CXXFLAGS environment variable, unless a switch matching -library=(stlport4|stdcxx4|Cstd) is already present there. If you want to override the default supplied by log4cplus, just set it into CXXFLAGS on configure script command line." Please test these changes on your platform. ---------------------------------------------------------------------- Comment By: Václav Zeman (wilx) Date: 2012-09-09 02:29 Message: I have found out that using -library=Cstd works on some systems (like Sun OS 5.10, with Sun C++ 5.8 2005/10/13) but does not work on others (like Linux with Sun C++ 5.12 Linux_i386 2011/11/16). Thus I have made a change for 1.1.0-RC10, that adds the -library=stlport4 option only if CXXFLAGS does not yet contain any switch matching -library=(stdcxx4|stlport4|Cstd) regular expression. ---------------------------------------------------------------------- Comment By: Václav Zeman (wilx) Date: 2012-04-27 01:56 Message: Just FYI, I have documented the requirement -library=stlport4 for compilation with Solaris Studio C++ compiler. The Cstd library is simply not good enough. This will be part of upcoming 1.0.4.1 release. ---------------------------------------------------------------------- Comment By: Václav Zeman (wilx) Date: 2011-07-16 05:43 Message: I have removed the -library=stlport4 check from configure.in on PRODUCTION_1_0_x in the 1562 revision. ---------------------------------------------------------------------- Comment By: Will Mason (will_mason) Date: 2011-03-02 06:53 Message: Hi, thanks for the information. Yes, I'm using Sun's latest compiler on Solaris 11. I know that Sun's STL isn't great, but there are other considerations in play for some of us. For example, what happens when you ship your product to an older box that doesn't have the STLport run-time library? If you do discover that STLport is required to build log4cplus, please document this somehow. The problem with the way you are currently doing it is that this undocumented requirement is appearing as a link option only in *my* build, thanks to libtool. In order for your library to work correctly, you also need me to use the -library=stlport4 with my compiler flags, which your documentation does not state is a requirement. Thus, the resulting build of my product is broken, since I'm using Sun's STL headers with log4cplus, but then linking to STLport. An additional headache for your users is that with your requirement for STLport, you have now forced my product and every other third-party product that I use to build with STLport, since we all have to use the same STL headers at compile time. That seems like a somewhat unrealistic requirement for a library provider to impose. Anyway, thanks for your time. ---------------------------------------------------------------------- Comment By: Václav Zeman (wilx) Date: 2011-03-01 22:18 Message: If I remember correctly log4cplus did not compile at the time. Sun's compiler's C++ standard library is broken severally. However, I will recheck on my OpenSolaris VM if it is still a problem even in the default configuration. If it is not a problem, I will remove that. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=429073&aid=3196803&group_id=40830 |