Unknown CMake command "generate_from_xml", Version 2

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
mac_the_bike
Posts: 42
Joined: Sun Jun 30, 2019 12:56 pm

Unknown CMake command "generate_from_xml", Version 2

Post by mac_the_bike »

Unknown CMake command "generate_from_xml", Version 2


  • I have changed the name of the directory to FREECAD-SOURCE in my home directory.
  • After I enter the cmake command, I get the following error:

    CMake Error at Base/CMakeLists.txt:81 (generate_from_xml):
    Unknown CMake command "generate_from_xml".
  • There is a warning about the cmake version number, but this is resolvable.
  • Attached picture shows the steps I have gone through.
    (Note big_grep.sh and readme are my files.)
  • The file:
    /home/peter/FREECAD-SOURCE/cMake/FreeCadMacros.cmake
    contains the definition of the macro, generate_from_xml.
  • What should I do to proceed?
  • Running on:
    Ubuntu 18.04
    cmake version: 3.10.2
Attachments
generate_from_xml.png
generate_from_xml.png (221.62 KiB) Viewed 1438 times
wmayer
Founder
Posts: 20298
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Unknown CMake command "generate_from_xml", Version 2

Post by wmayer »

What should I do to proceed?
cmake ../src
../src ist wrong directory. Choose ../ instead.
mac_the_bike
Posts: 42
Joined: Sun Jun 30, 2019 12:56 pm

Re: Unknown CMake command "generate_from_xml", Version 2

Post by mac_the_bike »

wmayer wrote: Wed Oct 16, 2019 8:21 pm
What should I do to proceed?
cmake ../src
../src ist wrong directory. Choose ../ instead.

Thanks for the answer.

Sorry it has been some time from your response but I then tried to compile freecad but I am having compilation problems. I have spent 2 weeks trying to resolve them but I am now stuck.

Using the command: cmake --build /home/peter/FREECAD-SOURCE/freecad-build

I have removed some lines from the error messages, leaving the important ones.

FIRST ERROR:

Compiling for the first time I get:

/home/peter/FREECAD-SOURCE/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx: In member function ‘vtkCellLinks* SMDS_UnstructuredGrid::GetLinks()’:
/home/peter/FREECAD-SOURCE/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx:98:12: error: invalid conversion from ‘vtkAbstractCellLinks*’ to ‘vtkCellLinks*’ [-fpermissive]
return Links;

SECOND AND THIRD ERRORS:

After a bit of a hack with the code, casting vtkAbstractCellLinks* to vtkCellLinks* at 98 the compilation goes a bit further till:

/home/peter/FREECAD-SOURCE/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp:194:85: error: ‘class vtkAbstractCellLinks’ has no member named ‘GetLink’
vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID);
this error is repeated 3 more times

/home/peter/FREECAD-SOURCE/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp:353:43: error: invalid conversion from ‘vtkAbstractCellLinks*’ to ‘vtkCellLinks*’ [-fpermissive]
vtkCellLinks *Links = grid->GetCellLinks();

I didn't realise that the version I downloaded was 19.
If there are easy solutions to the above problems then I would be happy to try them.
Otherwise there is no need for a response; I just want to make you aware of these problems, which may be of my making.

Thanks.
wmayer
Founder
Posts: 20298
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Unknown CMake command "generate_from_xml", Version 2

Post by wmayer »

Which version of vtk do you have installed? For my Linux box vtk7 works without problems.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Unknown CMake command "generate_from_xml", Version 2

Post by vocx »

mac_the_bike wrote: Wed Nov 06, 2019 12:08 pm ...
I didn't realise that the version I downloaded was 19.
...
Otherwise there is no need for a response; I just want to make you aware of these problems, which may be of my making.
If you got the source code from git, of course you are getting the 0.19 version, as it's the development version.

These problems seem to be due to something missing in your system. As wmayer asks, are you sure you have all dependencies?

Compiling FreeCAD in Ubuntu 18.04 is generally not a problem. It's as easy as this.

Code: Select all

cd freecad-build
cmake -DBUILD_QT5=ON -DPYTHON_EXECUTABLE=/usr/bin/python3 ../freecad-source
make -j3
Check CompileOnUnix again.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
mac_the_bike
Posts: 42
Joined: Sun Jun 30, 2019 12:56 pm

Re: Unknown CMake command "generate_from_xml", Version 2

Post by mac_the_bike »

vocx wrote: Wed Nov 06, 2019 7:19 pm
mac_the_bike wrote: Wed Nov 06, 2019 12:08 pm ...
I didn't realise that the version I downloaded was 19.
...
Otherwise there is no need for a response; I just want to make you aware of these problems, which may be of my making.
If you got the source code from git, of course you are getting the 0.19 version, as it's the development version.

These problems seem to be due to something missing in your system. As wmayer asks, are you sure you have all dependencies?

Compiling FreeCAD in Ubuntu 18.04 is generally not a problem. It's as easy as this.

Code: Select all

cd freecad-build
cmake -DBUILD_QT5=ON -DPYTHON_EXECUTABLE=/usr/bin/python3 ../freecad-source
make -j3
Check CompileOnUnix again.
Thanks for the answers - I will go away and check the dependencies, etc.

mac
mac_the_bike
Posts: 42
Joined: Sun Jun 30, 2019 12:56 pm

Re: Unknown CMake command "generate_from_xml", Version 2

Post by mac_the_bike »

mac_the_bike wrote: Thu Nov 07, 2019 12:27 pm
vocx wrote: Wed Nov 06, 2019 7:19 pm
mac_the_bike wrote: Wed Nov 06, 2019 12:08 pm ...
I didn't realise that the version I downloaded was 19.
...
Otherwise there is no need for a response; I just want to make you aware of these problems, which may be of my making.
If you got the source code from git, of course you are getting the 0.19 version, as it's the development version.

These problems seem to be due to something missing in your system. As wmayer asks, are you sure you have all dependencies?

Compiling FreeCAD in Ubuntu 18.04 is generally not a problem. It's as easy as this.

Code: Select all

cd freecad-build
cmake -DBUILD_QT5=ON -DPYTHON_EXECUTABLE=/usr/bin/python3 ../freecad-source
make -j3
Check CompileOnUnix again.
Thanks for the answers - I will go away and check the dependencies, etc.

mac
Thanks - it only goes to show that if you read the installation guide it all works!!

mac
Post Reply