>>>>> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
Lars> Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: | I Lars> tried to compile latest cvs with lyxstring (and gcc 2.95.2, Lars> autoconf | 2.52) and it failed with >> Lars> | g++ -DHAVE_CONFIG_H -I. -I../../../lyx-devel/src/support Lars> -I../../src -I../../../lyx-devel/src/support/../ Lars> -I../../../lyx-devel/boost Lars> -I/afs/rocq/home/preval/common/include -g -O Lars> -Wno-non-template-friend -ftemplate-depth-30 -W -Wall -c Lars> ../../../lyx-devel/src/support/lstrings.C Lars> -Wp,-MD,.deps/lstrings.TPlo | In file included from Lars> ../../../lyx-devel/boost/boost/regex/detail/regex_match.hpp:33, Lars> | from ../../../lyx-devel/boost/boost/regex.hpp:1576, | from Lars> ../../../lyx-devel/src/support/lstrings.C:23: | Lars> ../../../lyx-devel/boost/boost/limits.hpp:17: limits: No such Lars> file or directory >> Lars> | Actually, my problem is that I do not see where Lars> BOOST_NO_LIMITS is | supposed to be set now... Lars, could you Lars> help me here? Lars> it is supposed to be set on basis of compiler version, libc Lars> version and stdlibc++ version. OK, I see what happens now. Three points: 1/ in LString.h, there is a small hack (from June 2000, and probably the consequence of too much beer for too few people in a same room) that says basically in the INCLUDED_STRING case #ifdef __STRING__ #error The <string> header has been included before LString.h #else #define __STRING__ #endif The idea is to define __STRING__ so that the <string> header will not get included. 2/ in boost/config/stdlib/sgi.hpp, there is the following code // // If this is GNU libstdc++2, then no <limits> and no std::wstring: // #if (defined(__GNUC__) && (__GNUC__ < 3)) # include <string> # if defined(__BASTRING__) # define BOOST_NO_LIMITS // Note: <boost/limits.hpp> will provide compile-time constants # undef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS # define BOOST_NO_STD_WSTRING # endif #endif It tries to include <string> just to see whether it defines __BASTRING__. Of course, because of 1/, <string> is not really read in, and the test fails 3/ I have really no <limit> on this system. Conclusion: 1/ the LString.h hack is bad, I have to see if I can get rid of it (is it an optimization or something really needed). There will be a cost for removing it, though. 2/ Having boost include <string> _always_ just to read a small define is very tasteless, and probably costs a lot in compile time. 3/ trying to guess compiler settings without using autoconf is a very fragile task. JMarc