FreeCAD Installation on Linux Help

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
diogourb
Posts: 18
Joined: Sun Sep 27, 2009 1:47 pm
Location: Rio de Janeiro, Brazil

FreeCAD Installation on Linux Help

Post by diogourb »

Hi all,
This is actually my first post here, but I think there will be someone here to help.

The fact is, I've been trying to find a CAD system for linux for a long time and all I find is lots of bugs inside them... so I discovered the FreeCAD, which probably has some bugs as well but the fact of beeing opensource makes it an advantage... (I won't have to pay for an upgrade needed because of an error on the lastest version, or at least I won't need for like 2 years for the error to be fixed).

The case is looking at FreeCAD I see I can get involved and try to develop an Architectural Design module for improving the system for Architects. But for that I need to have it installed and to understand it first.

The problem is getting it installed... I have a Mandriva X86_64 system (Mandriva Cooker to be exact), and I have all the packages I need except one... OpenCASCADE. the problem is I don't know how to compile it I often get errors and more errors on the DRAW and WOK, which is anoying since it is supposed to be the base (this gives users a bad sign). The case is... how do I compile openCASCADE for mandriva (the main questions for me still rely on: do I need WOK and DRAW for FreeCAD? How can I install OpenCASCADE libraries on lib64 instead of lib?)

Also since OpenCASCADE 6.3.0 is giving me all these errors where can I get a good version that doesn't have problems on the source (or maybe patches for it)?

In the end 2 days ago I got OpenCASCADE installed on /usr/local, and then compiled FreeCAD and it all compiled fine... but then... when I tried to start FreeCAD all I had was Segmentation Fault... and couldn't trace the problem... then I found out that I could try to test openCASCADE with DRAWEXE, but then I saw that OpenCASCADE generated no binaries for usage only libraries so the testing wasn't possible

In any case... I wish I can get it working on my Mandriva... (I don't wish to change systems for ubuntu for example for having binaries for OpenCASCADE, mainly because when I had OpenSUSE and I had installed the OpenCASCADE Binaries I got crashes and more Crashes on FreeCAD)

PS.: I tried to use the RPM Spec of openSUSE for Mandriva and, no it doesn't work (same errors than on pure compilation).
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FreeCAD Installation on Linux Help

Post by wmayer »

Hi,
The case is looking at FreeCAD I see I can get involved and try to develop an Architectural Design module for improving the system for Architects. But for that I need to have it installed and to understand it first.
Then the Draft module would be of interest for you. It was written by Yorik who is also an architect.
The problem is getting it installed... I have a Mandriva X86_64 system (Mandriva Cooker to be exact), and I have all the packages I need except one... OpenCASCADE. the problem is I don't know how to compile it I often get errors and more errors on the DRAW and WOK, which is anoying since it is supposed to be the base (this gives users a bad sign). The case is... how do I compile openCASCADE for mandriva (the main questions for me still rely on: do I need WOK and DRAW for FreeCAD? How can I install OpenCASCADE libraries on lib64 instead of lib?)
As you're working on a 64-bit platform the most important point is to set -D_OCC64 when compiling the OpenCascade libs. This means you must pass this to the OCC configure script with: ./configure CPPFLAGS="-D_OCC64". Leaving out this setting could cause the problems you've mentioned.

For FreeCAD we only need the basic libs for writing/reading shapes (libTKMath.so, libTKernel.so, libTKBREP.so,...) and the libs for modelling (libTKBO.so, libTKBool.so, ..). We do neither need the WOK stuff nor the DRAW stuff nor OCAF or all the plugins.

Hope this helps!

Cheers,
Werner
diogourb
Posts: 18
Joined: Sun Sep 27, 2009 1:47 pm
Location: Rio de Janeiro, Brazil

Re: FreeCAD Installation on Linux Help

Post by diogourb »

:D It actually helped a lot... disabling DRAW and WOK makes it all goes all right... now the opencascade 6.3.0 already detects CPPFLAGS="-D_OCC64"

Now opencascade compiled... I'm making the RPM for installing it on my system and start to compile freecad to make it work

Here is the configure options I used: CXXFLAGS="-D_OCC64" ./configure --enable-production --disable-draw --disable-wok --enable-ocaf --enable-de --prefix=/usr

Now let me see if freecad doesn't give me Segfault on startup
diogourb
Posts: 18
Joined: Sun Sep 27, 2009 1:47 pm
Location: Rio de Janeiro, Brazil

Re: FreeCAD Installation on Linux Help

Post by diogourb »

Well the problem is still here.. :shock:

After installing FreeCAD, I get problems probably with QT4:

Code: Select all

[diogo@localhost freecad]$ FreeCAD
Segmentation fault
[diogo@localhost freecad]$ Free
FreeCAD     FreeCADCmd
[diogo@localhost freecad]$ FreeCADCmd
FreeCAD 0.9, Libs: 0.9R2237
(c) Juergen Riegel, Werner Mayer 2001-2009
  #####                 ####  ###   ####
  #                    #      # #   #   #
  #     ##  #### ####  #     #   #  #   #
  ####  # # #  # #  #  #     #####  #   #
  #     #   #### ####  #    #     # #   #
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

[FreeCAD Console mode <Use Ctrl-D (i.e. EOF) to exit.>]
>>>
[diogo@localhost freecad]$
As you see, the command line works but the GUI doesn't which I guess could be problem with QT4.. but yet I have had not one problem with the compilation... it found my qt4 normally and compiled it against.

I have no idea why I get segmentation fault... does anyone knows how to trace the problem (debug it)?
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FreeCAD Installation on Linux Help

Post by wmayer »

Hi,

there is another very common problem. On a lot of systems SoQt still links against Qt3 which leads to segfaults already at startup when combining with Qt4. Just do a "ldd" on your SoQt lib to see which Qt it depends on. If Qt3, you must rebuild SoQt using Qt4 and your problem should disappear.

Cheers,
Werner
Post Reply