FreeCAD 0.13 for 32 and 64 Bit Puppy or FatDog

Mathematical tools, physics simulators, CAD, CNC, etc.
Post Reply
Message
Author
paulski
Posts: 130
Joined: Fri 06 Oct 2006, 15:30
Location: Cologne, Germany &/or Perth, Australia

FreeCAD 0.13 for 32 and 64 Bit Puppy or FatDog

#1 Post by paulski »

FreeCAD 0.13
Homepage http://www.freecadweb.org/

I've been trying to get freecad working in any Puppy for a while now.
The program looks great-- but it was not an easy compile. I'm not sure if its complete yet (lots of testing to do).
As there is a lot of rapid development out there, the compile notes are going to help others a lot.
Hence this post.

Before you ask:
deb packages from other distros don't work (or at least on the puppy versions I've tried them on).

The pile of dependencies is huge and the compilation messy. So much is deeply interdependent. I guess using a binary from another distro
would have to have all libraries matching exactly (even the right matches on being compiled on each other) to even hope of working.

So -- I took on the task of trying to get all the dependencies together and seeing if it would go.
I've tried it in Lucid Puppy 5.28 (32Bit) and Fatdog 6.11 64 Bit.
I haven't got Lucid to work just yet -about 90% functionality there.
In Fatdog 611 I got further with a non error compile and make install. Given the amount of times I've tried I am reluctant to believe it.

Here is a list of what I have done. Perhaps someone following this might pick up on an error or tips for making it work better.

Before you start - make sure you have a devx-###.sfs for your Puppy version mounted, and preferably start with a clean pupsave file
where you only settings are the best drivers for your graphics card plus keyboard and the usual localizations. (e.g. I have the right Nvidia drivers installed).
BE PREPARED TO MESS UP YOUR PUPSAVE. Frugal installs are recommended. Make the pupsave BIG (like 1GB plus) so you have space for big bloated libraries.


Step 1 - You need a good full Qt system.
Build in Lucid Puppy 5.28
I used qt4.7.4 developer build

I built it from source as none of the pets I found had all the developer stuff I needed
Downloaded from the Qt homepage
ftp://ftp.qt-project.org/qt/source/qt-e ... 7.4.tar.gz


configured for compiling with

Code: Select all

sh configure --prefix=/opt/qt4/ --developer-build

Code: Select all

make -j4 
( use 4 cores if you have em --it is a long make)

Code: Select all

new2dir make install
(make a pet out of it) --- takes longer than the compile
Hint: If you are building into a small pupsave you can symlink the opt/qt4 directory to somewhere outside your pupsave folder on a hard drive for instance.
Build in Fatdog 611
As above but I used qt4.8.4
http://releases.qt-project.org/qt4/sour ... 8.4.tar.gz
, same options on configure

Note: qt4.8.4 didn't seem to work in 32bit puppy with some dependencies not sure why
Note 2: If your building a newer version of freecad make this your first install and have no other qt versions in your system
(i.e. hunt down and kill all libs includes and binaries from other versions)

I turned both PETs into SFS files around--- 180MB.

Step 2. Python -- i've built all of this around python 2.7
Puppy Lucid was nicely linked to python 2.7 folders (phew). Can't be sure if I installed python there or not. Sorry

I had to compile Python 2.7.2 from sources in Fatdog, but all paths links were set for python 2.6 --- watch carefully in the later steps.
Important on compile was this configure command

Code: Select all

sh configure --prefix=/usr  --enable-shared
I still got some warnings like no libsqllite and such ---not sure if anything was relevant.
Seems to work though.
Doesn't live when installed from a pet - something in the make install command trains the fatdog to find python and it isn't in the environment variables.

If you think you can use it....
Python-2.7-x86_64.pet
https://www.box.com/s/ph308rif8mlaieqe0heb
But at this stage I'd recommend compiling from source.


Step 3 - Compile key dependencies including everything--docs-dev -- and then put them into an sfs file.
Step 3 a - start with all the ones that are binary units and don't need python ,but may need QT or not

mostly compiled using

Code: Select all

sh configure --prefix=/usr
make
new2dir make install
(so I had pets of most things)

Below is the list plus some links to pets where I have them- might save some time
libftgl 2.13
https://www.box.com/s/ozy4upo5749jacpoil5y
ftgl-2.1.3-x86_64.pet

coin3.1.3
https://www.box.com/s/tukgq52xuenhu24tb685
Coin-3.1.3-x86_64.pet

libiconv-1.14
https://www.box.com/s/odr22b0o21y0esznyv6l

https://www.box.com/s/l5t0wpv959orrfbskege
icu4.2.1

xerces-c-3.1.1 (note needed to recompile this three times --links to something else)
https://www.box.com/s/d9eeuvedpp7o0s82al1i
xerces-c-3.1.1-x86_64.pet

ode-0.12
https://www.box.com/s/df3wq9xljoes1t64yyhn
ode-0.12-x86_64.pet

oce-0.12 (open cascade community edition) note needs ftgl and can benefit from gl2ps before compiling.
Its massive! Source from git

Code: Select all

git clone git://github.com/tpaviot/oce.git
gl2ps-1.3.8-x86_64.pet
https://www.box.com/s/ysde93279l7vro2tfxo6

eigen 3
https://www.box.com/s/4tu0ah4mm0680vh2tt16

zipios++1.5.9 (source was hard to get for this one!!--I can upload it if needed)
https://www.box.com/s/9bfx282ohxojtczqrbbp
zipios++-0.1.5.9-x86_64.pet


boost 1.43
64 Bit:
http://distro.ibiblio.org/fatdog/pets/6 ... .0-600.pet

bzr
Do not use http://distro.ibiblio.org/fatdog/pets/6 ... .pet---its for py2.6!

doxygen should not be necessary but to pacify the compiling
https://www.box.com/s/l7860feu011bwgq2bxwd
doxygen-1.8.3.1-x86_64.pet

---Question marked Dependencies---
--- qt web development kit--I compiled without it . cant see any issues yet


Step 3b - now get the python related dependencies going
For Lucid - I just used the default options as each module requires
To trick the python2.6 issue in Fatdog to look for python 2.7 I used this on a lot of python based cmake configures:

Code: Select all

cmake -D PYTHON_LIBRARY=/usr/lib64/python2.7/config/libpython2.7.so ..

swig1.34 ----vital --this makes binaries linking to your python install -- change python and this little guy messes up your life
swig-4-py2.7-1.3.40-x86_64.pet
https://www.box.com/s/0gudr2i364ik4uf3nb6k

cython-0.18
setuptools-0.6c11-py2.7.egg
numpy-1.70
mathplotlib-1.21
lxml
source via

Code: Select all

git clone git://github.com/lxml/lxml.git lxml
sip-4.14.4
sip-4-py2.7-4.14.4-x86_64.pet
https://www.box.com/s/rfnauz0684m4gt5vjzmi

soqt-1.5.0
SoQt-4py2.7-1.5.0-x86_64.pet
https://www.box.com/s/o4z4l81zvliho0j3fhzx

PyQt-x11-gpl-4
PyQt-x11-gpl-4py2.7-4.10-x86_64.pet
https://www.box.com/s/6zt98pxvlucsd5sxp3xc

pycollada -- use

Code: Select all

easy_install pycollada
if setuptools is installed

simage1.7.0
pivy0.51

Some usefull git commands for some sources:

Code: Select all

git clone git://github.com/lxml/lxml.git lxml

Step 3c -- not really essential (so says FreeCAD) but if present will be useful
Again the trick mentioned in 3b for Fatdog was somewhat helpful but I still edited the cmake cache file and changed references to the wrong python folders

ifcopenshell-0.30 (this won't compile beyond 93% and is unusable in this state for FreeCAD although it makes a binary)
I hint at some kind of python and swig incompatibility--on make I get:
[100%] Building CXX object ifcwrap/CMakeFiles/_IfcImport.dir/IfcPythonPYTHON_wrap.cxx.o
/aufs/devsave/pups64bit/0.3.0/cmake/ifcwrap/IfcPythonPYTHON_wrap.cxx:2850:13: error: 'ptrdiff_t' does not name a type
/aufs/devsave/pups64bit/0.3.0/cmake/ifcwrap/IfcPythonPYTHON_wrap.cxx:2887:21: error: expected ';' at end of member declaration
/aufs/devsave/pups64bit/0.3.0/cmake/ifcwrap/IfcPythonPYTHON_wrap.cxx:2887:39: error: expected ')' before 'n'
...and heaps more
Ifcomopenshell needs some of the above especially oce and:
libicu
---OS-X reputedly needs pcre I installed it just in case
tbb -- is also supposed to help
and really needs swig

I did not add the spnav things for 3d connexion devices

Now while compiling some of the above libraries there were (as always) warnings -- did I note them all down ---No.
Should I have? Maybe.

By now we are ready to compile the big one...

Step 4- Compile FreeCAD
Get the source code from the homepage listed at the top of this post or:
http://sourceforge.net/projects/free-ca ... t/download
(note configure complains if it wasn't from git!)

Unpack or if it was pulled using git just jump into the directory


Ignore a lot of out of date info in the readme files

make a folder called build
open a terminal there
In Lucid type:

Code: Select all

cmake ..
In Fatdog do the python trick again:

Code: Select all

cmake -D PYTHON_LIBRARY=/usr/lib64/python2.7/config/libpython2.7.so ..
check the cmake cache file for any obvious errors (like the wrong python folders)
I found several.
Check this too- may have an influence on how it will work later as a pet

//Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=/usr/local

mmm might need editing to /usr/local/freecad next time i build it.

Then

Code: Select all

make
I get between 93 and so called 100% on the Lucid build. Sometimes I redo the make command and it gets a tad further.
It is by no means 100% as there is often an ending line of
make: *** [all] Error 2

Don't even try a make install --- it just won't do it.

On Fatdog it went all the way through --Perhaps it did work--
make install went and put everything into usr/local with no subdirectory (yuk!)
new2dir caught nothing (awww!)

But lets be optimistic in both cases, go into the directory bin and open a terminal
type

Code: Select all

./FreeCAD
And you should have a partly functional FreeCAD.

I've stolen a desktop file, icon and mime info from a deb package
Now I should have enough for a about 90 MB Pet ---perhaps.

More testing to do-so far it works.

Possible issues:
Python setup - I can't get freecad to work from a pet or sfs until python compile has run a make install command.
Exporting paths is not working for me yet.


This in the cmakecache.txt is interesting
//Build the FreeCAD FEM module, be aware, unfinished code!
FREECAD_BUILD_FEM:BOOL=ON

It also looked for qt debug libraries --perhaps I need to alter my QT setup or recompile with debug libraries somehow?

Anyhow have fun with it.
Attachments
freecad64bitscreenshotinfatdog611.png
Screenshot Fatdog FreeCAD works!
(160.71 KiB) Downloaded 1393 times

Post Reply