|
From: Harald W. <Har...@gm...> - 2002-09-04 08:17:05
|
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. > > - 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? > > - 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. > > - 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 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. So it seems I'm going to learn more about autoconf and friends than I ever wanted to know... Regards, Harald -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net |