← Back to team overview

kicad-developers team mailing list archive

Re: build failure

 

@Jonatan Liljedahl  Please share your cmake commandss

On Fri, 5 Mar 2021 at 12:42, Jeff Young <jeff@xxxxxxxxx> wrote:
>
> I never managed to get this to work (but my kung fu with build systems is notoriously weak).
>
> Anyway, my current build flags are:
>
> -DCMAKE_C_COMPILER=clang
> -DCMAKE_CXX_COMPILER=clang++
> -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14
> -DwxWidgets_CONFIG_EXECUTABLE=/Users/jeff/kicad_dev/wxWidgets/wx-bin/bin/wx-config
> -DKICAD_STDLIB_LIGHT_DEBUG=OFF
> -DKICAD_SANITIZE=0
> -DKICAD_SCRIPTING=OFF
> -DKICAD_SCRIPTING_MODULES=OFF
> -DKICAD_SCRIPTING_WXPYTHON=OFF
> -DKICAD_USE_OCE=OFF
> -DMAINTAIN_PNGS=OFF
> -DCMAKE_INSTALL_PREFIX=./bin
> -DCMAKE_BUILD_TYPE=Debug
> -DPYTHON_SITE_PACKAGE_PATH=/Users/jeff/kicad_dev/wxWidgets/wx-bin/lib/python2.7/site-packages
>
> I think the breakage in 3D model rendering is elsewhere.
>
> Cheers,
> Jeff.
>
>
> On 5 Mar 2021, at 11:28, Jonatan Liljedahl <lijon@xxxxxxxxxxxx> wrote:
>
> I've tried with a fresh build dir, still getting this:
> Undefined symbols for architecture x86_64:
>  "Standard_Type::Register(char const*, char const*, unsigned long,
> opencascade::handle<Standard_Type> const&)", referenced from:
>      opencascade::type_instance<Standard_DomainError>::get() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      opencascade::type_instance<Standard_Failure>::get() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      opencascade::type_instance<Standard_Transient>::get() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      opencascade::type_instance<Standard_ConstructionError>::get() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      opencascade::type_instance<Standard_RangeError>::get() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      opencascade::type_instance<Standard_OutOfRange>::get() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>  "Quantity_Color::valuesOf(Quantity_NameOfColor,
> Quantity_TypeOfColor)", referenced from:
>      PCBMODEL::transferModel(opencascade::handle<TDocStd_Document>&,
> opencascade::handle<TDocStd_Document>&, TRIPLET) in
> libkicad2step_lib.a(oce_utils.cpp.o)
>  "BRepLib_Command::~BRepLib_Command()", referenced from:
>      BRepLib_MakeShape::~BRepLib_MakeShape() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>  "BRepAlgoAPI_Algo::Shape()", referenced from:
>      PCBMODEL::CreatePCB() in libkicad2step_lib.a(oce_utils.cpp.o)
>  "Geom_BezierCurve::Geom_BezierCurve(NCollection_Array1<gp_Pnt>
> const&)", referenced from:
>      OUTLINE::addEdge(BRepBuilderAPI_MakeWire*, KICADCURVE&,
> DOUBLET&) in libkicad2step_lib.a(oce_utils.cpp.o)
>  "Standard_Failure::~Standard_Failure()", referenced from:
>      Standard_ConstructionError::~Standard_ConstructionError() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      Standard_ConstructionError::~Standard_ConstructionError() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      Standard_OutOfMemory::~Standard_OutOfMemory() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      Standard_OutOfRange::~Standard_OutOfRange() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      Standard_OutOfRange::~Standard_OutOfRange() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>  "XCAFDoc_ShapeTool::AddComponent(TDF_Label const&, TDF_Label const&,
> TopLoc_Location const&)", referenced from:
>      PCBMODEL::AddComponent(std::__1::basic_string<char,
> std::__1::char_traits<char>, std::__1::allocator<char> > const&,
> std::__1::basic_string<char, std::__1::char_traits<char>,
> std::__1::allocator<char> > const&, bool, DOUBLET, double, TRIPLET,
> TRIPLET, TRIPLET) in libkicad2step_lib.a(oce_utils.cpp.o)
>  "XCAFDoc_ShapeTool::UpdateAssemblies()", referenced from:
>      PCBMODEL::CreatePCB() in libkicad2step_lib.a(oce_utils.cpp.o)
>  "NCollection_BaseMap::Destroy(void (*)(NCollection_ListNode*,
> opencascade::handle<NCollection_BaseAllocator>&), bool)", referenced
> from:
>      BRepTools_Modifier::~BRepTools_Modifier() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      NCollection_Map<TopoDS_Shape,
> TopTools_ShapeMapHasher>::~NCollection_Map() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      NCollection_DataMap<TopoDS_Face,
> BRepTools_Modifier::NewSurfaceInfo,
> TopTools_ShapeMapHasher>::~NCollection_DataMap() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      NCollection_DataMap<TopoDS_Edge,
> BRepTools_Modifier::NewCurveInfo,
> TopTools_ShapeMapHasher>::~NCollection_DataMap() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      NCollection_DataMap<TopoDS_Shape, TopoDS_Shape,
> TopTools_ShapeMapHasher>::~NCollection_DataMap() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      NCollection_Map<TopoDS_Shape,
> TopTools_ShapeMapHasher>::~NCollection_Map() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      NCollection_DataMap<TopoDS_Face,
> BRepTools_Modifier::NewSurfaceInfo,
> TopTools_ShapeMapHasher>::~NCollection_DataMap() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      ...
>  "NCollection_BaseList::PClear(void (*)(NCollection_ListNode*,
> opencascade::handle<NCollection_BaseAllocator>&))", referenced from:
>      PCBMODEL::CreatePCB() in libkicad2step_lib.a(oce_utils.cpp.o)
>      NCollection_List<TopoDS_Shape>::~NCollection_List() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      BRepBuilderAPI_MakeShape::~BRepBuilderAPI_MakeShape() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      NCollection_List<TopoDS_Shape>::Assign(NCollection_List<TopoDS_Shape>
> const&) in libkicad2step_lib.a(oce_utils.cpp.o)
>      NCollection_DataMap<TopoDS_Shape,
> NCollection_List<TopoDS_Shape>,
> TopTools_ShapeMapHasher>::DataMapNode::~DataMapNode() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      BRepLib_MakeShape::~BRepLib_MakeShape() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      NCollection_List<TopoDS_Shape>::~NCollection_List() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      ...
>  "Standard_OutOfMemory::Standard_OutOfMemory(char const*)", referenced from:
>      OUTLINE::addEdge(BRepBuilderAPI_MakeWire*, KICADCURVE&,
> DOUBLET&) in libkicad2step_lib.a(oce_utils.cpp.o)
>  "IGESCAFControl_Reader::Transfer(opencascade::handle<TDocStd_Document>&,
> Message_ProgressRange const&)", referenced from:
>      PCBMODEL::readIGES(opencascade::handle<TDocStd_Document>&, char
> const*) in libkicad2step_lib.a(oce_utils.cpp.o)
>  "STEPCAFControl_Reader::Transfer(opencascade::handle<TDocStd_Document>&,
> Message_ProgressRange const&)", referenced from:
>      PCBMODEL::readSTEP(opencascade::handle<TDocStd_Document>&, char
> const*) in libkicad2step_lib.a(oce_utils.cpp.o)
>  "STEPCAFControl_Reader::~STEPCAFControl_Reader()", referenced from:
>      PCBMODEL::readSTEP(opencascade::handle<TDocStd_Document>&, char
> const*) in libkicad2step_lib.a(oce_utils.cpp.o)
>  "STEPCAFControl_Writer::Transfer(opencascade::handle<TDocStd_Document>
> const&, STEPControl_StepModelType, char const*, Message_ProgressRange
> const&)", referenced from:
>      PCBMODEL::WriteSTEP(wxString const&) in
> libkicad2step_lib.a(oce_utils.cpp.o)
>  "BRepBuilderAPI_Command::~BRepBuilderAPI_Command()", referenced from:
>      BRepBuilderAPI_MakeShape::~BRepBuilderAPI_MakeShape() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>  "BRepBuilderAPI_MakeEdge::BRepBuilderAPI_MakeEdge(opencascade::handle<Geom_Curve>
> const&)", referenced from:
>      OUTLINE::addEdge(BRepBuilderAPI_MakeWire*, KICADCURVE&,
> DOUBLET&) in libkicad2step_lib.a(oce_utils.cpp.o)
>  "BRepBuilderAPI_MakeEdge::operator TopoDS_Edge()", referenced from:
>      OUTLINE::addEdge(BRepBuilderAPI_MakeWire*, KICADCURVE&,
> DOUBLET&) in libkicad2step_lib.a(oce_utils.cpp.o)
>  "BRepBuilderAPI_MakeWire::operator TopoDS_Wire()", referenced from:
>      OUTLINE::MakeShape(TopoDS_Shape&, double) in
> libkicad2step_lib.a(oce_utils.cpp.o)
>  "TCollection_AsciiString::~TCollection_AsciiString()", referenced from:
>      NCollection_DataMap<TCollection_AsciiString,
> opencascade::handle<STEPCAFControl_ExternFile>,
> NCollection_DefaultHasher<TCollection_AsciiString>
>
> ::DataMapNode::delNode(NCollection_ListNode*,
>
> opencascade::handle<NCollection_BaseAllocator>&) in
> libkicad2step_lib.a(oce_utils.cpp.o)
>  "BRepBuilderAPI_MakeShape::Shape()", referenced from:
>      PCBMODEL::AddPadHole(KICADPAD const*) in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      PCBMODEL::transferModel(opencascade::handle<TDocStd_Document>&,
> opencascade::handle<TDocStd_Document>&, TRIPLET) in
> libkicad2step_lib.a(oce_utils.cpp.o)
>  "BRepBuilderAPI_MakeShape::operator TopoDS_Shape()", referenced from:
>      OUTLINE::MakeShape(TopoDS_Shape&, double) in
> libkicad2step_lib.a(oce_utils.cpp.o)
>  "NCollection_BaseSequence::ClearSeq(void (*)(NCollection_SeqNode*,
> opencascade::handle<NCollection_BaseAllocator>&))", referenced from:
>      PCBMODEL::transferModel(opencascade::handle<TDocStd_Document>&,
> opencascade::handle<TDocStd_Document>&, TRIPLET) in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      NCollection_Sequence<TDF_Label>::~NCollection_Sequence() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      XSControl_Reader::~XSControl_Reader() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      NCollection_Sequence<TopoDS_Shape>::~NCollection_Sequence() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      NCollection_Sequence<opencascade::handle<Standard_Transient>
>
> ::~NCollection_Sequence() in libkicad2step_lib.a(oce_utils.cpp.o)
>
>      NCollection_Sequence<TopoDS_Shape>::~NCollection_Sequence() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      NCollection_Sequence<opencascade::handle<Standard_Transient>
>
> ::~NCollection_Sequence() in libkicad2step_lib.a(oce_utils.cpp.o)
>
>      ...
>  "TCollection_ExtendedString::~TCollection_ExtendedString()", referenced from:
>      PCBMODEL::PCBMODEL() in libkicad2step_lib.a(oce_utils.cpp.o)
>      PCBMODEL::AddComponent(std::__1::basic_string<char,
> std::__1::char_traits<char>, std::__1::allocator<char> > const&,
> std::__1::basic_string<char, std::__1::char_traits<char>,
> std::__1::allocator<char> > const&, bool, DOUBLET, double, TRIPLET,
> TRIPLET, TRIPLET) in libkicad2step_lib.a(oce_utils.cpp.o)
>      PCBMODEL::getModelLabel(std::__1::basic_string<char,
> std::__1::char_traits<char>, std::__1::allocator<char> > const&,
> TRIPLET, TDF_Label&) in libkicad2step_lib.a(oce_utils.cpp.o)
>  "APIHeaderSection_MakeHeader::SetAuthorValue(int,
> opencascade::handle<TCollection_HAsciiString> const&)", referenced
> from:
>      PCBMODEL::WriteSTEP(wxString const&) in
> libkicad2step_lib.a(oce_utils.cpp.o)
>  "APIHeaderSection_MakeHeader::SetDescriptionValue(int,
> opencascade::handle<TCollection_HAsciiString> const&)", referenced
> from:
>      PCBMODEL::WriteSTEP(wxString const&) in
> libkicad2step_lib.a(oce_utils.cpp.o)
>  "APIHeaderSection_MakeHeader::SetOrganizationValue(int,
> opencascade::handle<TCollection_HAsciiString> const&)", referenced
> from:
>      PCBMODEL::WriteSTEP(wxString const&) in
> libkicad2step_lib.a(oce_utils.cpp.o)
>  "APIHeaderSection_MakeHeader::SetOriginatingSystem(opencascade::handle<TCollection_HAsciiString>
> const&)", referenced from:
>      PCBMODEL::WriteSTEP(wxString const&) in
> libkicad2step_lib.a(oce_utils.cpp.o)
>  "APIHeaderSection_MakeHeader::SetName(opencascade::handle<TCollection_HAsciiString>
> const&)", referenced from:
>      PCBMODEL::WriteSTEP(wxString const&) in
> libkicad2step_lib.a(oce_utils.cpp.o)
>  "APIHeaderSection_MakeHeader::APIHeaderSection_MakeHeader(opencascade::handle<StepData_StepModel>
> const&)", referenced from:
>      PCBMODEL::WriteSTEP(wxString const&) in
> libkicad2step_lib.a(oce_utils.cpp.o)
>  "Standard_Failure::GetMessageString() const", referenced from:
>      vtable for Standard_ConstructionError in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      vtable for Standard_OutOfRange in libkicad2step_lib.a(oce_utils.cpp.o)
>  "XCAFDoc_ShapeTool::GetFreeShapes(NCollection_Sequence<TDF_Label>&)
> const", referenced from:
>      PCBMODEL::transferModel(opencascade::handle<TDocStd_Document>&,
> opencascade::handle<TDocStd_Document>&, TRIPLET) in
> libkicad2step_lib.a(oce_utils.cpp.o)
>  "Standard_Transient::DecrementRefCounter() const", referenced from:
>      PCBMODEL::PCBMODEL() in libkicad2step_lib.a(oce_utils.cpp.o)
>      opencascade::handle<XCAFApp_Application>::~handle() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      opencascade::handle<XCAFDoc_ShapeTool>::~handle() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      opencascade::handle<TDocStd_Document>::~handle() in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      PCBMODEL::~PCBMODEL() in libkicad2step_lib.a(oce_utils.cpp.o)
>      PCBMODEL::AddPadHole(KICADPAD const*) in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      std::__1::vector<TopoDS_Shape, std::__1::allocator<TopoDS_Shape>
>
> ::push_back(TopoDS_Shape const&) in
>
> libkicad2step_lib.a(oce_utils.cpp.o)
>      ...
>  "Standard_Transient::IncrementRefCounter() const", referenced from:
>      PCBMODEL::AddPadHole(KICADPAD const*) in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      std::__1::vector<TopoDS_Shape, std::__1::allocator<TopoDS_Shape>
>
> ::push_back(TopoDS_Shape const&) in
>
> libkicad2step_lib.a(oce_utils.cpp.o)
>      PCBMODEL::CreatePCB() in libkicad2step_lib.a(oce_utils.cpp.o)
>      NCollection_List<TopoDS_Shape>::Append(TopoDS_Shape const&) in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      PCBMODEL::WriteSTEP(wxString const&) in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      PCBMODEL::transferModel(opencascade::handle<TDocStd_Document>&,
> opencascade::handle<TDocStd_Document>&, TRIPLET) in
> libkicad2step_lib.a(oce_utils.cpp.o)
>      OUTLINE::addEdge(BRepBuilderAPI_MakeWire*, KICADCURVE&,
> DOUBLET&) in libkicad2step_lib.a(oce_utils.cpp.o)
>      ...
> ld: symbol(s) not found for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
> make[2]: *** [kicad/KiCad.app/Contents/MacOS/kicad2step] Error 1
> make[1]: *** [utils/kicad2step/CMakeFiles/kicad2step.dir/all] Error 2
>
> On Fri, Mar 5, 2021 at 11:57 AM Nick Østergaard <oe.nick@xxxxxxxxx> wrote:
>
>
> You need to make sure you have a clean buid dir and try yo explicitly disable oce and enable occt on your cmake configure line.
>
> fre. 5. mar. 2021 11.48 skrev Jonatan Liljedahl <lijon@xxxxxxxxxxxx>:
>
>
> Ok, I'm now trying to build against OCE instead, as I'm sure that used
> to work before.
> I managed to have CMake find my homebrew installed OCE by setting
> OCE_DIR, however it fails here:
>
> make[2]: *** No rule to make target
> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework',
> needed by `kicad/KiCad.app/Contents/MacOS/kicad2step'.  Stop.
>
> Because I don't have MacOSX10.14.sdk, but 10.15. The weird thing is
> that I have set CMake build variables to the correct path:
>
> CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.15
> CMAKE_OSX_SYSROOT:PATH=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk
>
> But even then, kicad2step still has 10.14:
>
> utils/kicad2step/CMakeFiles/kicad2step.dir/build.make:kicad/KiCad.app/Contents/MacOS/kicad2step:
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework
>
> Removing utils/kicad2step/CMakeFiles (and plugins/3d/oce/CMakeFiles),
> a recursive grep in my build directory tells me that there's NO
> mention of "MacOSX10.14" anywhere. But after I've run cmake, it shows
> up again in the above mentioned places!
>
> So where is this "MacOSX10.14" reference coming from?
>
> lijon@lijon-mbp kicad % grep -R --include CMakeLists.txt 10.14 .
>
> ...show nothing, so it must come outside the kicad source tree.
> Any ideas?
>
> Cheers
> /Jonatan
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>
>
>
> --
> /Jonatan
> http://kymatica.com
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>


Follow ups

References