Compile from git, by a Newbie - missing include file

Having trouble installing or compiling FreeCAD? Get help here.
claypipe
Posts: 11
Joined: Sat Nov 30, 2013 11:48 am

Compile from git, by a Newbie - missing include file

Postby claypipe » Thu Dec 05, 2013 11:10 pm

I am trying to build my first Freecad from Git. I am a beginner at this!

I have installed everything (I think)
I have done the
cmake .
When I do
make
it does very little and stops with the message
fatal error: Inventor/scxml/ScXMLInvoke.h: No such file or directory
#include <Inventor/scxml/ScXMLInvoke.h>

Please could someone suggest what I have neglected to do.
Ta.
Claypipe
wmayer
Site Admin
Posts: 14898
Joined: Thu Feb 19, 2009 10:32 am

Re: Compile from git, by a Newbie - missing include file

Postby wmayer » Fri Dec 06, 2013 12:53 am

The most important is to tell us your OS.
claypipe
Posts: 11
Joined: Sat Nov 30, 2013 11:48 am

Re: Compile from git, by a Newbie - missing include file

Postby claypipe » Fri Dec 06, 2013 1:00 am

Woops.

Linux 3.2.0-4-rt-amd64 #1 SMP PREEMPT RT Debian 3.2.51-1 x86_64 GNU/Linux

Crunchbang distribution.

Claypipe
wmayer
Site Admin
Posts: 14898
Joined: Thu Feb 19, 2009 10:32 am

Re: Compile from git, by a Newbie - missing include file

Postby wmayer » Fri Dec 06, 2013 1:08 am

OK. You have to install the devel package for Coin3d which might be libcoin60-dev or libcoin80-dev. There might be a few more packages missing but the compiler is so kind to tell you this :) So, just come back if you still have failures.
claypipe
Posts: 11
Joined: Sat Nov 30, 2013 11:48 am

Re: Compile from git, by a Newbie - missing include file

Postby claypipe » Fri Dec 06, 2013 10:56 am

I already have libcoin80-dev installed. Is it, perhaps, that I need to tell the compile to use libcoin80 rather than libcoin60.

(Sorry if I am being dumb about this, cmake is new to me. I learned on bare old Makefiles.)

Claypipe
wmayer
Site Admin
Posts: 14898
Joined: Thu Feb 19, 2009 10:32 am

Re: Compile from git, by a Newbie - missing include file

Postby wmayer » Fri Dec 06, 2013 3:20 pm

I already have libcoin80-dev installed.
Doh, that's odd. Apparently this header is part of libcoin60-dev but is not inside libcoin80-dev.

Can you please send the whole error message when running make? There we can at least see which other files tries to include the non-existent file. But I would say it's a bug in the debian package.
Sorry if I am being dumb about this, cmake is new to me. I learned on bare old Makefiles.
Don't worry. It's not your fault that it fails there.
claypipe
Posts: 11
Joined: Sat Nov 30, 2013 11:48 am

Re: Compile from git, by a Newbie - missing include file

Postby claypipe » Fri Dec 06, 2013 4:17 pm

OK, thanks.

Code: Select all

me@here:~/freecadbuild/free-cad-code$ make
[  0%] Building CXX object src/3rdParty/Pivy-0.5/CMakeFiles/coin.dir/coin_wrap.cpp.o
In file included from /home/david/freecadbuild/free-cad-code/src/3rdParty/Pivy-0.5/coin_header_includes.h:145:0,
                 from /home/david/freecadbuild/free-cad-code/src/3rdParty/Pivy-0.5/coin_wrap.cpp:3930:
/usr/include/Inventor/elements/SoGLTexture3EnabledElement.h:36:2: error: #error Deprecated: use SoMultiTextureEnabledElement instead
 #error Deprecated: use SoMultiTextureEnabledElement instead
  ^
In file included from /home/david/freecadbuild/free-cad-code/src/3rdParty/Pivy-0.5/coin_header_includes.h:190:0,
                 from /home/david/freecadbuild/free-cad-code/src/3rdParty/Pivy-0.5/coin_wrap.cpp:3930:
/usr/include/Inventor/elements/SoTexture3EnabledElement.h:36:2: error: #error Deprecated: use SoMultiTextureEnabledElement instead
 #error Deprecated: use SoMultiTextureEnabledElement instead
  ^
In file included from /home/david/freecadbuild/free-cad-code/src/3rdParty/Pivy-0.5/coin_wrap.cpp:3930:0:
/home/david/freecadbuild/free-cad-code/src/3rdParty/Pivy-0.5/coin_header_includes.h:668:40: fatal error: Inventor/scxml/ScXMLInvoke.h: No such file or directory
 #include <Inventor/scxml/ScXMLInvoke.h>
                                        ^
compilation terminated.
make[2]: *** [src/3rdParty/Pivy-0.5/CMakeFiles/coin.dir/coin_wrap.cpp.o] Error 1
make[1]: *** [src/3rdParty/Pivy-0.5/CMakeFiles/coin.dir/all] Error 2
make: *** [all] Error 2
me@here:~/freecadbuild/free-cad-code$ 
Claypipe
wmayer
Site Admin
Posts: 14898
Joined: Thu Feb 19, 2009 10:32 am

Re: Compile from git, by a Newbie - missing include file

Postby wmayer » Fri Dec 06, 2013 5:38 pm

Ah, now I see. On debian based systems there is no need to build the shipped pivy sources because a package already exists, called python-pivy. Install this one and then disable the build of the local pivy by setting FREECAD_USE_EXTERNAL_PIVY on.

Code: Select all

cmake -DFREECAD_USE_EXTERNAL_PIVY=ON .
claypipe
Posts: 11
Joined: Sat Nov 30, 2013 11:48 am

Re: Compile from git, by a Newbie - missing include file

Postby claypipe » Sat Dec 07, 2013 12:04 am

Making progress - well sort of.....

Code: Select all

Linking CXX executable ../../bin/FreeCAD
../../lib/libFreeCADBase.so: undefined reference to `PyCapsule_New'
../../lib/libFreeCADBase.so: undefined reference to `PyCapsule_GetPointer'
../../lib/libFreeCADBase.so: undefined reference to `PyCapsule_Import'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/FreeCAD] Error 1
make[1]: *** [src/Main/CMakeFiles/FreeCADMain.dir/all] Error 2
make: *** [all] Error 2
I believe that this is back to the version of python I have available.

Python reports :

Code: Select all

Python 2.7.5+ (default, Sep 17 2013, 15:31:50)
Python3 reports:

Code: Select all

Python 3.3.2+ (default, Sep 18 2013, 11:58:01) 
Can I persuade the build to use python 3?

Ta

claypipe
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Compile from git, by a Newbie - missing include file

Postby NormandC » Sat Dec 07, 2013 1:44 am

Certainly not as FreeCAD is not compatible with python 3. It's probably the source of your troubles but I wouldn't know how to fix it.