Menu

#62 cannot force configure to ignore boost allocators

pending
nobody
None
5
2012-03-04
2010-11-09
No

(reported against 1.13.3)

Apart from using --with-stlport or --enable-new-allocator there doesn't appear to be any way to tell configure not to use boost::fast_pool_allocator if it finds a copy of it in standard include directories.

If you have an old version of boost installed in /usr/include then QuickFIX's configure will automatically find the fast_pool_allocator and define HAVE_BOOST_FAST_POOL_ALLOCATOR. The preprocessor conditions in utility.h mean that unless HAVE_STLPORT or ENABLE_NEW_ALLOCATOR is also defined, QuickFIX will use the boost allocator. This might be a problem if you want to use libquickfix.so in an app compiled against a different version of boost installed somewhere other than /usr/include, because libquickfix.so and your app will use different versions of the boost headers.

It would be nice if --without-boost suppressed the configure checks for HAVE_BOOST_FAST_ALLOCATOR and HAVE_BOOST_POOL_ALLOCATOR. Alternatively, using std::allocator could be forced if there was a --enable-std-allocator, similar to --enable-new-allocator

Discussion

  • Jonathan Wakely

    Jonathan Wakely - 2010-11-09

    obviously one can hand edit config.h after it's generated, so a new configure switch would be nice to have, but is not essential

    The most flexible might be
    --enable-allocator={std,boost_fast_pool,boost_pool,gnu_new,gnu_mt,gnu_pool}

     
  • Alexander Korobka

    Try patch #3168848.

     
  • Oren Miller

    Oren Miller - 2012-03-04
    • status: open --> pending
     
  • Oren Miller

    Oren Miller - 2012-03-04

    Addressed this by having the user manually decide which allocator to use. std will be used by default.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.