error: allocating an object of abstract class type 'LIB_ITEM'

Bug #970187 reported by Jerry Jacobs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Invalid
Undecided
Unassigned

Bug Description

With the new Mac OS X Xcode 4.3.2 development tools, the llvm compiler is much stricter on the code, this compiler will also be used soon on linux and FreeBSD which is a more strict and modular alternative to GCC, so this issues will popup in the future for these platforms:

[ 58%] Building CXX object eeschema/CMakeFiles/eeschema.dir/class_libentry.cpp.o
In file included from /Users/jerry/Repositories/kicad/eeschema/class_libentry.cpp:36:
In file included from /Users/jerry/Repositories/kicad/include/class_sch_screen.h:35:
In file included from /Users/jerry/Repositories/kicad/include/sch_item_struct.h:35:
In file included from /Users/jerry/Repositories/kicad/include/boost/ptr_container/ptr_vector.hpp:20:
In file included from /Users/jerry/Repositories/kicad/include/boost/ptr_container/ptr_sequence_adapter.hpp:20:
In file included from /Users/jerry/Repositories/kicad/include/boost/ptr_container/detail/reversible_ptr_container.hpp:24:
/Users/jerry/Repositories/kicad/include/boost/ptr_container/clone_allocator.hpp:34:22: error: allocating an object of abstract class type 'LIB_ITEM'
        T* res = new T( r );
                     ^

Als some other problem:
In file included from /Users/jerry/Repositories/kicad/pcbnew/board_items_to_polygon_shape_transform.cpp:11:
In file included from /Users/jerry/Repositories/kicad/pcbnew/./polygons_defs.h:9:
In file included from /Users/jerry/Repositories/kicad/include/boost/polygon/polygon.hpp:64:
/Users/jerry/Repositories/kicad/include/boost/polygon/polygon_90_set_data.hpp:299:9: error: call to function 'gtlsort' that is neither visible in the
      template definition nor found by argument-dependent lookup
        gtlsort(data_.begin(), data_.end());
        ^
/Users/jerry/Repositories/kicad/include/boost/polygon/polygon_45_set_data.hpp:1678:13: note: in instantiation of member function
      'boost::polygon::polygon_90_set_data<int>::sort' requested here
      l90sd.sort();
            ^
/Users/jerry/Repositories/kicad/include/boost/polygon/polygon_45_set_data.hpp:1220:7: note: in instantiation of function template specialization
      'boost::polygon::polygon_45_set_data<int>::applyAdaptiveUnary_<0>' requested here
      applyAdaptiveUnary_<0>();
      ^
/Users/jerry/Repositories/kicad/include/boost/polygon/detail/polygon_set_view.hpp:24:13: note: in instantiation of member function
      'boost::polygon::polygon_45_set_data<int>::clean' requested here
        tmp.clean();
            ^
/Users/jerry/Repositories/kicad/include/boost/polygon/polygon_set_concept.hpp:57:10: note: in instantiation of member function
      'boost::polygon::polygon_set_data<int>::clean' requested here
      ps.clean();
         ^
/Users/jerry/Repositories/kicad/include/boost/polygon/polygon_set_concept.hpp:183:5: note: in instantiation of function template specialization
      'boost::polygon::assign<boost::polygon::polygon_set_data<int>, std::vector<boost::polygon::polygon_data<int>,
      std::allocator<boost::polygon::polygon_data<int> > > >' requested here
    assign(ps, polygon_set);
    ^
/Users/jerry/Repositories/kicad/include/boost/polygon/polygon_set_concept.hpp:452:12: note: in instantiation of function template specialization
      'boost::polygon::resize<std::vector<boost::polygon::polygon_data<int>, std::allocator<boost::polygon::polygon_data<int> > >, int>' requested here
    return resize(lvalue, rvalue);
           ^
/Users/jerry/Repositories/kicad/pcbnew/board_items_to_polygon_shape_transform.cpp:195:30: note: in instantiation of function template specialization
      'boost::polygon::operators::operator+=<std::vector<boost::polygon::polygon_data<int>, std::allocator<boost::polygon::polygon_data<int> > >, int>'
      requested here
    polyset_zone_solid_areas += clearance;
                             ^
/Users/jerry/Repositories/kicad/include/boost/polygon/detail/polygon_sort_adaptor.hpp:50:10: note: 'gtlsort' should be declared prior to the call site or in
      namespace '__gnu_cxx'
    void gtlsort(iter_type _b_, iter_type _e_)
         ^

Another one:
In file included from /Users/jerry/Repositories/kicad/bitmap2component/bitmap2component.cpp:27:
In file included from /Users/jerry/Repositories/kicad/include/boost/polygon/polygon.hpp:64:
/Users/jerry/Repositories/kicad/include/boost/polygon/polygon_90_set_data.hpp:299:9: error: call to function 'gtlsort' that is neither visible in the
      template definition nor found by argument-dependent lookup
        gtlsort(data_.begin(), data_.end());
        ^

Tags: boost llvm xcode
Revision history for this message
Jerry Jacobs (jerkejacobs-deactivatedaccount) wrote :

There are fixes which can be done:
http://clang.llvm.org/compatibility.html#dep_lookup

Revision history for this message
Jerry Jacobs (jerkejacobs-deactivatedaccount) wrote :

I had installed multiple compiler versions, which broke some stuff. It compiled successfull with:

jerry@white:/Volumes/kicad$ cc -v
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.3.0
Thread model: posix

jerry@white:/Volumes/kicad$ xcode-select --print-path
/Developer/SDKs/MacOSX10.7.sdk

jerry@white:/Volumes/kicad$ uname -a
Darwin white 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64

jerry@white:/Volumes/kicad$ wx-config --cflags
-I/opt/wxwidgets/71156/lib/wx/include/osx_cocoa-unicode-static-2.9 -I/opt/wxwidgets/71156/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DwxDEBUG_LEVEL=0 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__

Changed in kicad:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.