compiling boost library

Hi!

Have anybody tried to compile the boost library on QNX 6.2.1 PE?

After some minor changes to the build configuration (QCC instead of g++ etc.) It almost compiles but with some exceptions. Namely the boost.test library does not compile. I’ve nailed down the problem to the definition
of setjmp_buf in system header setjmp.h.

It uses a construct like this (this is only an example):

typedef struct { // If you put a name after struct everything work fine
int t1;
} testtab[1];

then, having a function like the following:
testtab &get()
{
static testtab t2;
return t2;
}

generates an error:
non-local function ` (& get())[1]’ uses anonymous type

It seems that the only solution is to change the system header file, but I don’t like it. I believe the system headers should remain intact. How the problem can be solved otherwise?

Michal

Hi,

I’m struggling for compiling Boost under Neutrino 6.2.1
and I’m far from :frowning: your results. How did you “almost”
compile it?

Thanks in advance,
Gianluca

maybe not helpful, but just to let you know that I had the same problem when compiling XFree86 4.3 on QNX 6.2.1, and I had to change the system header file.

Has anyone found out a deterministic way how to port Boost?
I found this library very useful and C++ ISO compliant.

Thx

I agree about the Boost library it is wonderfull, did anyone succeed building boost for QNX 6.xx

I gave it a try a while ago, from memory it was working ok. What problem are you having?

I wanted to try boost::any out. In the start I tried to include the files needed only for this, but it quickly turns out to be a great number of files. So I stopped using that approach.

To get to know boost in general better, I have builded it to on Visual Studio 2005 with the bjam tool coming with boost. That worked fine. My idea was that this could help me to find the correct way through.

Now I am considering using bjam tool for win32 (I am doing cross compiling) and then changing the jamfiles to fit to qnx compiler and linker.

Do you remenber how you did ?

No sorry, however I’m pretty sure I didn’t use all of the boost library but just the stuff I experimented with at the time. I didn’t have to “build” anything. Just using the header was enough.

I compiled boost on QNX 6.3.2sp3 fairly recently, i.e. v1.33.1

bjam compiles okay with the build.sh that comes with it.
You also need bzip2. bzip2 compiles fine with make, but change the Makefile so that CC=qcc

Here’s the bjam line to compile and test boost:
bjam --without-python -sGCC=qcc -sGXX=QCC -sBZIP2_INCLUDE={/path/to/bzip2} -sBZIP2_LIBPATH={/path/to/bzip2}

This will take a long time. There are a few errors.

Also note that Mario is correct; there is no reason to actually compile Boost, with the exceptions of Boost.Regex and Boost.Signals. You can use Boost.Any simply by including boost/any.hpp.

-James Ingraham
Sage Automation, Inc.