Opened 11 years ago
Closed 11 years ago
#6265 closed Bugs (fixed)
STL containers in managed memory segments fails to build
Reported by: | Owned by: | Ion Gaztañaga | |
---|---|---|---|
Milestone: | To Be Determined | Component: | interprocess |
Version: | Boost 1.48.0 | Severity: | Regression |
Keywords: | Cc: |
Description
Good afternoon.
The new Interprocess library shipped with Boost 1.48.0 is causing me troubles in building code that tries to allocate a container on managed shared memory. The problem is clearly visible trying to build one of the examples present into the documentation, and, precisely, the one that you can find at this link
http://www.boost.org/doc/libs/1_48_0/doc/html/interprocess/allocators_containers.html#interprocess.allocators_containers.containers_explained.where_allocate
i.e. into the "Where is this being allocated?" section.
With Boost 1.47.0 the same code builds.
I'm using gcc on a CentOS 5.7 x86_64 machine. The command I issue in order to build that code is:
g++ example.cpp -o example -I<path to boost>/include -lrt
I've attached both the *.cpp code and the build output.
Thanks in advance
Best regards
Federico
Attachments (2)
Change History (11)
by , 11 years ago
Attachment: | example.out added |
---|
by , 11 years ago
Attachment: | example.cpp added |
---|
follow-up: 2 comment:1 by , 11 years ago
comment:2 by , 11 years ago
Replying to anonymous:
Which gcc version? Can you try trunk code?
gcc is 4.1.2, the one distributed with CentOS 5.7
comment:3 by , 11 years ago
I've tried the trunk and the error is exactly the same. Please, before releasing a new version of the library, at least verify that the examples proposed in the documentation get properly built. I've only verified that this one does not get built, but I've not tested the others.
Best regards,
Michele
comment:4 by , 11 years ago
Examples are always tested before committing (in my case in windows, ubuntu, macos and freebsd), but we can't have access to all OS/compiler combinations. We'll need more time to test what's happening.
comment:5 by , 11 years ago
I've just tried on a 32 bit Fedora 16 (which has gcc 4.6.2-1) and the example gets built, but I had to add "-lpthread" to the command above. I think the problem is related to gcc 4.1.2, which is deployed with Red Hat 5.x and, as a consequence, with CentOS 5.x.
I've also tried to build with gcc 4.4 on my CentOS 5.7 with the following command:
g++44 example.cpp -I<path-to-boost>/include -o example -lrt -lpthread
and the code got built. Anyway gcc 4.4 is not the default on Red Hat 5.x and CentOS 5.x distributions.
So, the problem, is definitely related to the compiler.
Best regards,
Michele De Stefano
comment:6 by , 11 years ago
Excuse me, but I was expecting an update on this problem and 3 weeks have passed since the last update. It is true that with gcc 4.4 there is no problem, but the documentation of the Interprocess library states that the library works with gcc 4.1.2 too (so I was expecting an update on this). Is any action planned to fix this bug?
Keep in mind that gcc 4.4 cannot easily be used on Red Hat 5.x or CentOS 5.x, most of all if you use BLAS and LAPACK.
comment:7 by , 11 years ago
Boost is a volunteer effort, we do the best we can. I installed CentOS and current trunk and release branch code should work. Let me know if this fixes your problems.
comment:8 by , 11 years ago
I know that "Boost is a volunteer effort", and it is for this reason that I'm giving you feedback as soon as possible. And I would have been glad to help you with CentOS without the need for you to install it (if only you told me you were trying to fix the bug, I would have helped you with feedback on CentOS).
Anyway, I've downloaded the boost trunk and I've managed to build the example using gcc 4.1.2. So now I confirm that the example builds.
Thank you very much.
Best regards.
comment:9 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Which gcc version? Can you try trunk code?