Menu

#134 Lots failures on FreeBSD + clang + libc++

cppcms-v1.0.x
closed
None
1
2014-10-30
2014-10-09
Anonymous
No

On FreeBSD 10.0:

  • In src/utils.cpp, on output << "&lt;" cannot find operator <<, missing #include <iostream></iostream>

  • In private/base_cache.h, unknown type name 'time_t', missing #include <time.h>.</time.h>

  • Forward declares stuff in std namespace, which is non standard, causing some code to fail compilation:

    XXX/cppcms-1.0.4/cppcms_boost/cppcms_boost/interprocess/mem_algo/detail/mem_algo_common.hpp:454:34: error: 
      implicit instantiation of undefined template 'std::pair<void *, bool>'
         std::pair<void *, bool> ret = memory_algo->priv_allocate
                 ^
    XXX/cppcms-1.0.4/cppcms_boost/cppcms_boost/interprocess/interprocess_fwd.hpp:47:8: note: template
      is declared here
    struct pair;
    

    the libc++ definitions are

    _LIBCPP_BEGIN_NAMESPACE_STD
    template <class _T1, class _T2>
    struct _LIBCPP_TYPE_VIS pair { ... }
    _LIBCPP_END_NAMESPACE_STD
    

    which defines pair in an inline namespace inside namespace std. Same goes for other fwd-declarations. Replacing all of them with appropriate standard conforming includes.

  • In multiple places:

    XXX/cppcms-1.0.4/cppcms_boost/cppcms_boost/interprocess/detail/managed_memory_impl.hpp:676:26: error: 
    use 'template' keyword to treat 'get_allocator' as a dependent template name
       {   return mp_header->get_allocator<T>(); }
    
  • Feature detection is off: when clang is compiling in C++03 (default on my system) the CPPCMS_BOOST_NO_0X_HDR_INITIALIZER_LIST is not defined, so unordered_map.hpp introduces the functions with initializer_list arguments they fail to compile with

      no type named 'initializer_list' in namespace 'std'
    unordered_map(std::initializer_list<value_type> list,
    

    Adding -std=c++11 -stdlib=libc++ to clang command line fixed that.

I stopped here, for now.

It looks that CppCMS is not regularly tested on FreeBSD or clang, then why it is advertised as being supported on these systems?

Discussion

  • Anonymous

    Anonymous - 2014-10-12

    FreeBSD builds work perfectly well with gcc/libstdc++...

    Currently there are several glitches with libc++/clang even at Linux they should be solved form the nearest release.

     
  • Artyom Beilis

    Artyom Beilis - 2014-10-12
    • status: open --> accepted
    • assigned_to: Artyom Beilis
     
  • Artyom Beilis

    Artyom Beilis - 2014-10-12

    Also some problems with libc++ still exit - with prefork cache that would be solved for 1.2 only.

     
  • Artyom Beilis

    Artyom Beilis - 2014-10-14

    Closed now it works mostly well with libc++...

    There are still some glitches due to "immaturity" of libc++ but in general it looks fine

     
  • Artyom Beilis

    Artyom Beilis - 2014-10-14
    • status: accepted --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





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.