|
From: Harald W. <Har...@gm...> - 2002-08-24 10:50:06
|
Hello again, the short story is: log4cpp is running on QNX 6.1 without significant changes, and it passes all tests. The long story: you may actually be wondering what the heck QNX is, and I do admit I had never heard of it until last year... It's a real-time embedded operating system, and a major player in that somewhat fragmented market. More details on www.qnx.com. QNX does have some specialities, but it is more or less POSIX compatible and uses the gcc compiler suite, so you wouldn't expect any real trouble compiling any GNU compatible configure-make-install package. The biggest issue is the fact that although they use gcc, it doesn't come with the GNU libstdc++ but with the Dinkumware libraries instead. I can't tell which of these two "Standard" C++ Library implementations is closer to the ISO C++ standard, but the fact is that most of the free stuff you get is developed on GNU, and most of it (going by the dozen or so packages I've tried) fails to compile against the Dinkum libs. To be fair, most of the errors are std:: namespace issues, and those are fairly easy to fix. 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. - Optimization -O2 produces internal compiler errors on some sources, so I removed that as well. - 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::. - A similar problem is the syntax of standard C header includes. On QNX, you have to write #include <cstdio> instead of #include <stdio.h>, or you will get lots of symbol redefinition errors. - The int64 stuff in PatternLayout doesn't compile, not even with the workaround, so I disabled it. Maybe there's a solution, I haven't looked at it closely. - 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. - 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. That's it, more or less. No big issues. I can post a patch for someone to review the changes, and if the community decides to accept them into the standard distribution, the final step (and for me, the most difficult one) would be to set up all the autoconf and automake input. So far, I've simply edited the generated Makefiles, which is not the proper way, I know, but I have very limited experience with the auto* tools, and I find them rather hairy.... Any feedback is welcome! Regards, Harald |