[multi_index][ann][rfc] Preview of Boost.MultiIndex 1.35 release

Hello, I've uploaded a preview version of Boost.MultiIndex as planned for shipping with Boost 1.35 --I don't think there'll be time to include more major features. Download at the Vault: http://www.boost-consulting.com/vault/index.php?&direction=0&order=&directory=Containers (file multi_index.zip) You can try the preview with Boost 1.34.x; if you want to test the newly added interoperability with Boost.Interprocess, you'll have to use a snapshot of Boost CVS, where this library currently lies. The new important features: * New global_fun predefined key extractor. * Added iterator_to facility. * Included support for non-standard allocators such as those of Boost.Interprocess, which makes multi_index_containers placeable in shared memory. Don't miss example #12 at the examples section, which fully exercises this new capacity. * New versions of modify and modify_key with rollback, as described in the tutorial. * Indices provide the new cbegin, cend and, when applicable, crbegin and crend member functions, in accordance with the latest drafts of the next revision of the C++ standard. A longer list of changes can be consulted at the release notes page. I'd be extremely grateful if you can try this preview version and report any problems you find. As we're still in time to discuss the new features, do not hesitate to comment on these and bring forward your proposals for improvement. Thank you very much for your interest in Boost.MultiIndex, Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

On 7/18/07, Joaquín Mª López Muñoz <joaquin@tid.es> wrote:
Hello, I've uploaded a preview version of Boost.MultiIndex as planned for shipping with Boost 1.35 --I don't think there'll be time to include more major features. Download at the Vault:
Still digesting this, but I found that ip_allocator.cpp needs <threading>multi to compile on Linux. I also made some improvements to the code to stop when reading from cin fails (e.g. eof). See attached patch against the 1.35.0 pre-release zip code. -- Caleb Epstein

Caleb Epstein <caleb.epstein <at> gmail.com> writes:
On 7/18/07, Joaquín Mª López Muñoz <joaquin <at> tid.es> wrote:
Hello, I've uploaded a preview version of Boost.MultiIndex as planned for shipping with Boost 1.35 --I don't think there'll be time to include more major features. Download at the Vault:
Still digesting this, but I found that ip_allocator.cpp needs <threading>multi to compile on Linux. I also made some improvements to the code to stop when reading from cin fails (e.g. eof).
Hello Caleb, thank you for trying the preview and for your contributions! When you say you multithreading it's needed in Linux: what behavior do you observe otherwise? Also, could you provide me with the Linux version and compiler you're using? Best regards, Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

On 8/2/07, Joaquin M Lopez Munoz <joaquin@tid.es> wrote:
Hello Caleb, thank you for trying the preview and for your contributions! When you say you multithreading it's needed in Linux: what behavior do you observe otherwise? Also, could you provide me with the Linux version and compiler you're using?
I'm using gcc-4.1.3 on Debian/unstable. Without the <threading>multi, the gcc.link step fails for ip_allocator due to unresolved externals: gcc.link ../../../bin.v2/libs/multi_index/example/gcc-4.1.3 /debug/ip_allocator ../../../bin.v2/libs/multi_index/example/gcc-4.1.3/debug/ip_allocator.o: In function `mutexattr_wrapper': /home/cae/src/boost/libs/multi_index/example/../../../boost/interprocess/sync/posix/pthread_helpers.hpp:37: undefined reference to `pthread_mutexattr_init' /home/cae/src/boost/libs/multi_index/example/../../../boost/interprocess/sync/posix/pthread_helpers.hpp:37: undefined reference to `pthread_mutexattr_setpshared' /home/cae/src/boost/libs/multi_index/example/../../../boost/interprocess/sync/posix/pthread_helpers.hpp:37: undefined reference to `pthread_mutexattr_settype' ../../../bin.v2/libs/multi_index/example/gcc-4.1.3/debug/ip_allocator.o: In function `~mutexattr_wrapper': /home/cae/src/boost/libs/multi_index/example/../../../boost/interprocess/sync/posix/pthread_helpers.hpp:45: undefined reference to `pthread_mutexattr_destroy' ../../../bin.v2/libs/multi_index/example/gcc-4.1.3/debug/ip_allocator.o: In function `boost::interprocess::shared_memory_object::priv_open_or_create(boost::interprocess::detail::create_enum_t, char const*, boost::interprocess::mode_t)': /home/cae/src/boost/libs/multi_index/example/../../../boost/interprocess/shared_memory_object.hpp:316: undefined reference to `shm_open' collect2: ld returned 1 exit status Basically unless you link an executable with -pthread on Linux, the threading primitives are not available, and -lrt is required for the SysV shared memory primitives. Specifying "<threading>multi" seems to achieve both of these goals. This could be considered to be an issue with the interprocess library, but since it is header only and doesn't provide its own Jamfile, you can't add "/boost/interprocess" to the dependencies, and have it puck up that requirement AFAIK. If you look at the Jamfile.v2 in the interprocess example directory, you'll see it adds <threading>multi. -- Caleb Epstein

Caleb Epstein ha escrito:
On 8/2/07, Joaquin M Lopez Munoz <joaquin@tid.es> wrote:
Hello Caleb, thank you for trying the preview and for your contributions! When you say you multithreading it's needed in Linux: what behavior do you observe otherwise? Also, could you provide me with the Linux version and compiler you're using?
I'm using gcc-4.1.3 on Debian/unstable.
Without the <threading>multi, the gcc.link step fails for ip_allocator due to unresolved externals:
[...]
Basically unless you link an executable with -pthread on Linux, the threading primitives are not available, and -lrt is required for the SysV shared memory primitives. Specifying "<threading>multi" seems to achieve both of these goals.
[...] OK, thank you for the very precise explanation! I've just added the <threading>multi bit to my local version. Best, Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
participants (3)
-
Caleb Epstein
-
Joaquin M Lopez Munoz
-
Joaquín Mª López Muñoz