Page 1 of 2

[Archlinux] build error

Posted: Wed Dec 25, 2013 9:27 am
by yangtsesu
use AUR freecad-git
https://aur.archlinux.org/packages/freecad-git/
Archlinux

[ 57%] Building CXX object src/Gui/CMakeFiles/FreeCADGui.dir/PreCompiled.cpp.o
Linking CXX shared library ../../lib/libFreeCADGui.so
[ 57%] Built target FreeCADGui
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2

Re: [Archlinux] build error

Posted: Wed Dec 25, 2013 11:51 am
by wmayer
That's not much information you give here. Can you upload the generated Makefile so we can see how it looks like around line 116?

Re: [Archlinux] build error

Posted: Wed Dec 25, 2013 1:31 pm
by yangtsesu

Re: [Archlinux] build error

Posted: Fri Dec 27, 2013 10:31 am
by wmayer
It looks like you posted the wrong files. In your build directory there must be the sub-directories src/Gui which also has a Makefile. Besides this, maybe it's a problem with CMake. Is there a chance to test with an older version of CMake?

Re: [Archlinux] build error

Posted: Fri Dec 27, 2013 12:24 pm
by yangtsesu

Re: [Archlinux] build error

Posted: Fri Dec 27, 2013 2:10 pm
by wmayer
I have looked through the relevant files but didn't get a hint to the actual problem. I wonder whether cmake doesn't write this out somewhere. Do you get some additional information in the terminal window? At least the generated Makefile around line 116 looks correct to me because I have quite the same here.

Re: [Archlinux] build error

Posted: Sat Dec 28, 2013 2:36 am
by yangtsesu
I am so sorry.
Error message is here.

Code: Select all

[ 42%] Building CXX object src/3rdParty/salomesmesh/CMakeFiles/DriverDAT.dir/src/DriverDAT/DriverDAT_W_SMESHDS_Document.cpp.o
[ 42%] Building CXX object src/3rdParty/salomesmesh/CMakeFiles/DriverDAT.dir/src/DriverDAT/DriverDAT_W_SMESHDS_Mesh.cpp.o
Linking CXX shared library ../../../lib/DriverDAT.so
[ 42%] Generating moc_ReportView.cpp
/home/yangtse/aur/freecad-git/src/freecad/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp: In member function 'PyObject* Part::BRepOffsetAPI_MakePipeShellPy::setAuxiliarySpine(PyObject*)':
/home/yangtse/aur/freecad-git/src/freecad/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp:128:74: error: invalid conversion from 'Standard_Boolean {aka unsigned int}' to 'BRepFill_TypeOfContact' [-fpermissive]
         PyObject_IsTrue(keep) ? Standard_True : Standard_False);
                                                                          ^
In file included from /home/yangtse/aur/freecad-git/src/freecad/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp:31:0:
/opt/opencascade/inc/BRepOffsetAPI_MakePipeShell.hxx:124:8: error:   initializing argument 3 of 'void BRepOffsetAPI_MakePipeShell::SetMode(const TopoDS_Wire&, Standard_Boolean, BRepFill_TypeOfContact)' [-fpermissive]
   Standard_EXPORT     void SetMode(const TopoDS_Wire& AuxiliarySpine,const Standard_Boolean CurvilinearEquivalence,const BRepFill_TypeOfContact KeepContact = BRepFill_NoContact) ;
        ^
src/Mod/Part/App/CMakeFiles/Part.dir/build.make:1840: recipe for target 'src/Mod/Part/App/CMakeFiles/Part.dir/BRepOffsetAPI_MakePipeShellPyImp.cpp.o' failed
make[2]: *** [src/Mod/Part/App/CMakeFiles/Part.dir/BRepOffsetAPI_MakePipeShellPyImp.cpp.o] Error 1
CMakeFiles/Makefile2:1603: recipe for target 'src/Mod/Part/App/CMakeFiles/Part.dir/all' failed
make[1]: *** [src/Mod/Part/App/CMakeFiles/Part.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 42%] Generating moc_SelectionView.cpp

Re: [Archlinux] build error

Posted: Sat Dec 28, 2013 2:40 am
by yangtsesu
cmake 2.8.12.1

Re: [Archlinux] build error

Posted: Sat Dec 28, 2013 10:00 am
by wmayer
Here is the code snippet that fails:

Code: Select all

PyObject* BRepOffsetAPI_MakePipeShellPy::setAuxiliarySpine(PyObject *args)
{
    PyObject *spine, *curv, *keep;
    if (!PyArg_ParseTuple(args, "O!O!O!",&Part::TopoShapePy::Type,&spine
                                        ,&PyBool_Type,&curv
                                        ,&PyBool_Type,&keep))
        return 0;
    const TopoDS_Shape& s = static_cast<Part::TopoShapePy*>(spine)->getTopoShapePtr()->_Shape;
    if (s.IsNull() || s.ShapeType() != TopAbs_WIRE) {
        PyErr_SetString(PyExc_TypeError, "spine is not a wire");
        return 0;
    }

    this->getBRepOffsetAPI_MakePipeShellPtr()->SetMode(
        TopoDS::Wire(s),
        PyObject_IsTrue(curv) ? Standard_True : Standard_False,
        PyObject_IsTrue(keep) ? Standard_True : Standard_False);
    Py_Return;
}
And here is the interface of SetMode:

Code: Select all

  Standard_EXPORT     void SetMode(const TopoDS_Wire& AuxiliarySpine,const Standard_Boolean CurvilinearEquivalence,const Standard_Boolean KeepContact = Standard_False) ;
This is for OpenCascade version 6.6.0 and older. Which version of OpenCascade do you have?

Re: [Archlinux] build error

Posted: Sat Dec 28, 2013 11:24 am
by wmayer
I hope git c1d14ea fixes the problem.