|
From: Bastiaan B. <Bas...@li...> - 2002-09-04 12:50:00
|
On Wed, 2002-09-04 at 10:16, Harald Wellmann wrote: > Bastiaan Bakker schrieb am 03.09.02 18:34:55: > > On Sat, 2002-08-24 at 12:53, Harald Wellmann wrote: > > > > > > the short story is: log4cpp is running on QNX 6.1 without significant > > > changes, and it passes all tests. > > > > > > > That's good to hear. Which version are you talking about? 0.2.7 or > > 0.3.x? > > > > I've been working on the 0.3.2rc4 tarball. > > > > > Now here's a summary of the changes I had to make: > > > > > > - With the -pedantic compiler option, gcc gets so pedantic it refuses to > > > compile anything at all, so I turned it off. > > > > > I believe I already turned off -pedantic for g++ 2.96 to get rid of this > > endless stream of warnings about code in the iostreams lib. Maybe I > > should turn it off completely by default and only enable it for testing. > > > > Yes, I've found that in m4/PETI_PEDANTIC_GCC.m4. It's turned off for > 2.96*, but 2.95* is covered by the default case. We could simply add > another case for 2.95. > Yes. I'll switch main log4cpp development to gcc 3.2 soon anyway, so being less pedantic for older gcc version would be wise. > > > > - Optimization -O2 produces internal compiler errors on some sources, so > > > I removed that as well. > > > > > Is that m4 file also the "right" place to disable -O2 for QNX 6.1.0? > Well, if we promote this macro to a generic 'tune gcc' thing, then it's the right place. Can you check what the right platform identifier is for QNX? Then we can add the appropiate check. Run config/config.guess to obtain the identifier. > > > > - gcc by default simply ignores the std:: namespace (at least in > > > versions <= 2.95.3; I don't know about the most recent versions), but > > > not in the QNX variant with the Dinkum libs. In most files, I had to > > > insert "using namespace std;" or prefix a few function calls with std::. > > > > > > > g++ < 3.0 is lax in enforcing proper namespace usage. However, 3.0 and > > higher do complain, so any place where log4cpp is missing a necessary > > 'std::' is a bug that should be fixed. Please report any occurrences you > > encounter. BTW, I prefer to avoid 'using namespace ..' because it tends > > to defeat the purpose of namespaces. > > > > Yes, I agree. And since "using std::map;" (i.e. single identifiers instead > of the > complete namespace) does not work on WinCE 3.0, I'd better use explicit > prefixes for all occurrences. > > > > > - A similar problem is the syntax of standard C header includes. On QNX, > > > you have to write #include instead of #include , or > > > you will get lots of symbol redefinition errors. > > > > > > > Yes, we'll have to change these as well, instead of > > is the 'proper' C++ way. > > > > Exactly, and <> brackets are reserved for system includes, so you we should > never write #include but use "" instead. Someone has started > cleaning that up between 0.2.* and 0.3.* but you still see the angular > brackets > in a few places. > This is a misconception. <> brackets are not reserved for system includes. The only thing the ISO C++ standard says (in par. 16.2) about the differences between "" and <> is that for "" the preprocessor will search in 'an implementation dependent manner' and will fall back to searching like a #include <> if this fails. Gcc has implemented this as searching in the directory of the original source file for "" and searching in the standard directories (/usr/include, etc.) and those specified with '-I' for <>. This is also what Stroustrup specifies in his reference manual (par. 16.3.2c). Therefore the convention in log4cpp is: if a header file is part of its interface, that is, its in include/log4cpp/ or subdirectory include it with #include<>. If on the other hand it's internal (e.g. in src/) #include it with #include"" > > > - Some of the global Makefile settings are different, of course. The > > > compiler and linker is called QCC, and you don't link any external > > > libraries. pthread_* stuff is available by default. > > > > The compiler and linker can be changed by setting environment variables > > CC and LD prior to invoking ./configure. E.g. with the bash shell: > > > > CC=QCC LD=QCC ./configure --prefix=... > > > > The pthread detection M4 macro has been rather quickly hacked together > > to get pthread support in. We should be able check we need -lpthread or > > not for pthread support. > > If you remove the '-lpthread' from 'LIBS="$LIBS -lpthread"' in > > ./configure, does ./configure still recognize the pthread support? > > > > I'll try that and let you know the results. > > > > > > > > - libtool refused to produce libraries. I installed a newer libtool > > > version and I got archived libraries, but I haven't found out how to > > > produce shared libs yet. > > > > > > > OK, so '--disable-shared' is recommended for now? Something to put in > > the build documentation. > > > > It works without --disable-shared, libtool simply prints a warning that it > won't generate shared libraries. Anyway, the problem is somewhere else, > because shared libraries as such are no problem at all on QNX. > > I don't know enough about libtool, but my guess it that it might work > if I installed the newest autoconf/automake/libtool stuff and rerun > autoconf and automake. I use autoconf 2.53, automake 1.6.2 and 1.4.2. Should be new enough! Maybe the libtool FAQ or mailinglist have some clues... > > I don't understand how the libtool generated by configure in the log4cpp > root directory relates to the libtool installed on your platform, but simply > using the installed one instead of the generated one (that what I did to > make it work at all) is not the best way, I suppose. If you don't run ./autogen.sh before running ./configure (and for a log4cpp from a tar ball you don't need to), the libtool installed on your platform won't be used at all. > > So it seems I'm going to learn more about autoconf and friends than I > ever wanted to know... > Heheh, before you know it you're sucked into the tar pit of M4 bastardizations :-) Regards, Bastiaan > Regards, > Harald > > -- > GMX - Die Kommunikationsplattform im Internet. > http://www.gmx.net > > > > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 > _______________________________________________ > Log4cpp-devel mailing list > Log...@li... > https://lists.sourceforge.net/lists/listinfo/log4cpp-devel |