|
UbuntuInstallation
How to build and install HeeksCAD and related projects for Ubuntu
Featured HeeksCAD is still under heavy development so any packages you find are likely to be out of date. To get the most current version, you need to compile the current source version from git. This installation procedure was tested on Ubuntu 11.04 (Natty Narwhal) using gnome. If you run into problems, check the notes and comments at the end of this page. For Ubuntu 10.10 onlyThe version of cmake in Ubuntu 10.10 is 2.8.2. Cmake 2.8.2 has a bug that will prevent HeeksCAD and HeeksCNC from installing. You will need to use a newer (or older) version of cmake. Do the following:
For Ubuntu 8.04 onlyThe opencascade libraries are not in the ubuntu multiverse for Hardy. You can get them from opennovation. First add the following to your /etc/apt/sources.list file deb http://www.opennovation.org/ubuntu hardy main contrib non-free Download the signing key available here http://www.opennovation.org/ubuntu/opennovation.key Go into synaptic. Click the Settings -> repositories menu. Click the 'authentication' tab and import the key file you just downloaded. Install the dependenciesThe following command will install the required packages. apt-get will prompt you to accept a large number of additional dependencies. Accept them as well. sudo apt-get install git subversion libwxbase2.8-dev cmake build-essential libopencascade-dev libwxgtk2.8-dev libgtkglext1-dev python-dev cmake libboost-python-dev Get a cup of coffee while all this downloads and installs. Downloading codeThe codebase has been transferred from subversion to git. One advantage of this is now heekscad, heekscnc, libarea, libactp, and opencamlib can be checked out with one command: git clone --recursive git://github.com/Heeks/heekscad.git Install HeeksCADThe following commands describe how to compile and install HeeksCAD. cd heekscad cmake . make package sudo dpkg -i heekscad_*.deb Install HeeksCNCThe following commands describe how to compile and install HeeksCNC. cd heekscad/heekscnc/ cmake . make package sudo dpkg -i heekscnc_*.deb #only one .deb to install, but the filename may change Install the helper librariesHeeksCNC uses a number of libraries to perform various operations. Install all of them or only the ones you plan to use. Install libareaarea.so is required for pocket operations. cd heekscad/heekscnc/libarea/ make clean make sudo make install Install libactpactp.so is required for adaptive roughing operations. This may be removed from git soon thus you may want to skip it cd heeskcad/heekscnc/libactp/PythonLib make clean make sudo make install Install opencamlibopencamlib is the replacement for pycam. It's required for zigzag operations. cd heekscad/heekscnc/opencamlib/src make clean cmake . make sudo make install Other Notesuse with default theme 'ambience'If you are using the default Lucid theme (Ambience). The following bug and work-around affect the appearance of HeeksCAD in the default theme: http://code.google.com/p/heekscad/issues/detail?id=270 Making it go fastAs noted above, HeeksCAD is changing all the time. The bits of script above can be combined into one script and executed together with sudo. If run multiple times, it will check git for updates and pull them recursively (including 3rd party repos which may not be desirable!) #!/bin/sh
# heekscad-install.sh -- Downloads, builds and installs HeeksCAD from svn
BUILDPATH=~/ # Location of HeeksCAD build dir
BUILDPREREQS="git subversion libwxbase2.8-dev cmake \
build-essential libopencascade-dev libwxgtk2.8-dev \
libgtkglext1-dev python-dev cmake libboost-python-dev"
# Install build prerequisites
sudo apt-get update
sudo apt-get install -y $BUILDPREREQS
#Git the HeeksCAD files and sub repos
cd $BUILDPATH
if [ -d heekscad ]; then
cd heekscad
git pull
git submodule foreach --recursive git pull origin master
else
git clone --recursive git://github.com/Heeks/heekscad.git
fi
# Install HeeksCAD
cd ${BUILDPATH}/heekscad/
cmake .
make package
sudo dpkg -i heekscad_*.deb
# Install HeeksCNC
cd ${BUILDPATH}/heekscad/heekscnc/
cmake .
make package
sudo dpkg -i heekscnc_*.deb
# Install libarea
# area.so is required for pocket operations.
cd ${BUILDPATH}/heekscad/heekscnc/libarea/
make clean
make
sudo make install
# Install libactp
# actp.so is required for adaptive roughing operations.
#cd ${BUILDPATH}/heekscad/heekscnc/libactp/PythonLib
#make clean
#make
#sudo make install
# Install opencamlib
# opencamlib is the replacement for pycam. It's required for zigzag operations.
cd ${BUILDPATH}/heekscad/heekscnc/opencamlib/src
cmake .
make
make doc # Creates PDF file needed by make install
sudo make install
if test $(lsb_release -s -c) = 'hardy'; then
echo This is Ubuntu Hardy, creating symlinks
sudo ln -fs /usr/local/lib/python2.5/dist-packages/kurve.so /usr/local/lib/python2.5/site-packages/kurve.so
sudo ln -fs /usr/local/lib/python2.5/dist-packages/actp.so /usr/local/lib/python2.5/site-packages/actp.so
sudo ln -fs /usr/local/lib/python2.5/dist-packages/area.so /usr/local/lib/python2.5/site-packages/area.so
fi
sudo ldconfig # Makes sure heekscnc/cad can find libraries that were just installed.
Earlier version of UbuntuThis affects at least 8.04(Hardy) and may affect other releases as well. Earlier releases using Python2.5 will look for the module in a different directory. Make the following symlinks to enable the modules sudo ln -s /usr/local/lib/python2.5/dist-packages/kurve.so /usr/local/lib/python2.5/site-packages/kurve.so sudo ln -s /usr/local/lib/python2.5/dist-packages/actp.so /usr/local/lib/python2.5/site-packages/actp.so sudo ln -s /usr/local/lib/python2.5/dist-packages/area.so /usr/local/lib/python2.5/site-packages/area.so A possible problemIf you get this error: /opt/opencascade-6.3/ros/lin/inc/Standard_Stream.hxx: At global scope: /opt/opencascade-6.3/ros/lin/inc/Standard_Stream.hxx:84: error: ‘std::setw’ has not been declared /opt/opencascade-6.3/ros/lin/inc/Standard_Stream.hxx:85: error: ‘std::setprecision’ has not been declared You need to add -DHAVE_IOMANIP to CCFLAGS in src/Makefile of HeeksCAD and HeeksCNC. |
I have taken the code on this page, turned it into a script, and avoided the repeated svn checkout of the code and unwanted rebuilds if you run the script twice (checking for directory existence, and removal of make clean). Here it is as a code block, in case anyone is interested. It appears to work for me...
#!/bin/sh # heekscad-install.sh -- Downloads, builds and installs HeeksCAD from svn BUILDPATH=~ # Location of HeeksCAD build dir INSTALLPATH=/usr/local # Location to install HeeksCAD BUILDPREREQS="subversion libwxbase2.8-dev \ build-essential libopencascade-dev libwxgtk2.8-dev \ libgtkglext1-dev python-dev cmake libboost-python-dev" # Install build prerequisites sudo apt-get install -y $BUILDPREREQS cd $BUILDPATH if [ -d HeeksCAD ]; then cd HeeksCAD svn update else svn checkout http://heekscad.googlecode.com/svn/trunk/ HeeksCAD fi cd ${BUILDPATH}/HeeksCAD/src make sudo make install # Make menu entry find the binary sudo ln -s ${INSTALLPATH}/bin/HeeksCAD /usr/bin/HeeksCAD # Make HeeksCAD find the program icons sudo ln -s ${INSTALLPATH}/share/heekscad/ /usr/share/heekscad # Install HeeksCNC #Get the HeeksCNC files from the SVN repository, build, and install cd ${BUILDPATH}/HeeksCAD/ if [ -d HeeksCNC ]; then cd HeeksCNC svn update else svn checkout http://heekscnc.googlecode.com/svn/trunk/ HeeksCNC fi cd ${BUILDPATH}/HeeksCAD/HeeksCNC/src make sudo make install # build, and install kurve cd ${BUILDPATH}/HeeksCAD/HeeksCNC/kurve make sudo make install sudo ln -s .libs/kurve.so ${BUILDPATH}/HeeksCAD/HeeksCNC/kurve.so # Install libarea # area.so is required for pocket operations. #Get the libarea files from the SVN repository, build, and install cd ${BUILDPATH}/HeeksCAD/HeeksCNC/ if [ -d libarea ]; then cd libarea svn update else svn checkout http://libarea.googlecode.com/svn/trunk/ libarea fi cd ${BUILDPATH}/HeeksCAD/HeeksCNC/libarea/ make sudo make install sudo ln -s .libs/area.so ${BUILDPATH}/HeeksCAD/HeeksCNC/area.so # Install libactp # actp.so is required for adaptive roughing operations. # Get the libactp (adaptive roughing) files from the SVN repository, build, and install cd ${BUILDPATH}/HeeksCAD/HeeksCNC/ if [ -d libactp ]; then cd libactp svn update else svn checkout http://libactp.googlecode.com/svn/trunk/ libactp fi cd ${BUILDPATH}/HeeksCAD/HeeksCNC/libactp/PythonLib make sudo make install sudo ln -s .libs/actp.so ${BUILDPATH}/HeeksCAD/HeeksCNC/actp.so # Install opencamlib # opencamlib is the replacement for pycam. It's required for zigzag operations. # Get the opencamlib files from the SVN repository, build, and install cd ${BUILDPATH}/HeeksCAD/HeeksCNC/ if [ -d opencamlib ]; then cd opencamlib svn update else svn checkout http://opencamlib.googlecode.com/svn/trunk/ opencamlib fi cd ${BUILDPATH}/HeeksCAD/HeeksCNC/opencamlib/src make clean cmake . make make doc # Creates PDF file needed by make install sudo make installHello,
thanks for this usefull Help-Page an the nice script.
Michael
if installed on Ubuntu 10.4 you have to change the name of the /usr/local/HeeksCAD/HeeksCNC folder to .../heekscnc otherwise the postprocessor scripts wont be found then make links to the libs
sudo ln -s /usr/local/lib/python2.6/dist-packages/kurve.so /usr/local/HeeksCAD/heekscnc/kurve.so
sudo ln -s /usr/local/lib/python2.6/dist-packages/actp.so /usr/local/HeeksCAD/heekscnc/actp.so
sudo ln -s /usr/local/lib/python2.6/dist-packages/libarea.so /usr/local/HeeksCAD/heekscnc/libarea.so
jmarsden, Thanks for the updated script. One question: why did you remove the 'make clean' statements? Will this correctly recompile when source is updated?
jmarsden - the script looks great, however, as a newbie, i am not sure how to incorporate the issues with Ubuntu 10.04 that are noted on the june 14th post.
Do you have any suggestions?
Thanks
Jonathan
Personally I have many difficulties in filling opencamlib in Ubuntu 8.04 LTS?. Some of you managed to do it?
I couldn't build it for 8.04, I updated to 10.04
You can introduce some flags for Optimizing the binary heekscad/cnc and all library for toolpath generation, I have addition this flags into "MakeFiles???" : the My CPU is turion and the correct flag is -march=k8, you should change this flag in accord on your CPU, and you can control the /proc/cpuinfo file for details of the CPU that you has.
All parameter flags that you can addition into variable CCFLAG= from Makefile to heekscad/src/Makefile, for example and all other Makefile for heekscnc and libraries
WARNING NEWBIE ONLY MODIFY THE PART FOR FLAGS NOT OTHER PLEACE
the part possible could be this, remember that you must change the flags -march and adding or remove the options type -msse3 :
-march=k8 -msse3 -O2 -pipe -fomit-frame-pointer
For example into MAkefile Heekscad I have changed in this form :
For opencamlib you can add this new flags into file CMakeList.txt changing in this manner :
the record number 18
add_definitions(-Wall -Wdeprecate)
to
add_definitions(-march=k8 -msse3 -O2 -pipe -fomit-frame-pointer -Wno-deprecate)
In my case the performances are increased that of the 100% on some operations and all program HeeksCNC.
Into this wiki you can find the config for your CPU for example AMD/INTEL etc...
http://en.gentoo-wiki.com/wiki/Safe_Cflags
click the link in tail from page
Processor Specific CFLAGS
FOR ALL NEWBIE
for example I have configured the Makefile in my posses :
You can confront my modifications with the Makefile that you have for your changes.
heekscad/src/Makefile :
BEGIN
CCFLAGS=$(CFLAGS) -march=k8 -msse3 -O2 -pipe -fomit-frame-pointer -Wall -I "./" -I ${CASINCPATH} $(GLINCLUDES) $(FLAGS_64BIT) -DUSE_GENERIC_TREECTRL -DUNICODE -DHEEKSCAD -DHAVE_LIMITS -DWXUSINGDLL -DHAVE_LIMITS -DTIXML_USE_STL ${RIP} $(PYTHONCFLAGS) wx-config --cflags
END
heekscnc/src/Makefile :
BEGIN
CCFLAGS= -march=k8 -msse2 -pipe -fomit-frame-pointer -Wall -fPIC -O2 -I "./" $(WXCFLAGS) -I$(HEEKSCADPATH) -DHAVE_IOMANIP -DWXGTK -DHEEKSPLUGIN -DUNICODE -DWXUSINGDLL -DTIXML_USE_STL -DHAVE_LIMITS ${RIP} ${KURVE_FLAGS} -I "${OPENCASCADE_DIR}"
END
heekscad/heekscnc/kurve/Makefile :
BEGIN
CFLAGS = -march=k8 -msse3 -O2 -pipe -fomit-frame-pointer -Wall -I/usr/include python-config --includes -I./ -fPIC -DOPEN_SOURCE_GEOMETRY
END
heekscad/heekscnc/libarea/Makefile :
BEGIN
CFLAGS = -march=k8 -msse3 -O2 -pipe -fomit-frame-pointer -Wall -I/usr/include python-config --includes -I./ -I./kbool/include -fPIC
END
heekscad/heekscnc/libactp/pythonlib/Makefile :
BEGIN
CFLAGS = -march=k8 -msse3 -O2 -pipe -fomit-frame-pointer -Wall -I/usr/include python-config --includes -I./ -I../freesteel/src -fPIC
END
heekscad/heekscnc/opencamlib/src/CMakeLists.txt :
BEGIN
if (CMAKE_BUILD_TOOL MATCHES "make")
endif (CMAKE_BUILD_TOOL MATCHES "make")
END
I hope that you have understand me.
Moreover for all user linuxcnc "ubuntu 8.04" I have wrote a script for automatize installation HeeksCAD/CNC, this is a beta script but it works fine for me, you can prove and if you to meet problems, you can contact me b.ghiaccio@gmail.com .
This script isn't finished, I must add the control mechanism for control the existence of the links, variables, directory end other things.
the url for download is : http://pastebin.com/uAwHZEPA
copy/paste into new file script-heekscnc.sh
Note : You should installing the linuxcnc (ubuntu 8.04) and run as soon as this script bash, remember that you have to set the permission for execution in this manner :
open the terminal shell and becomes root user
user $ sudo -s passwd
root # chmod +x script-heekscnc.sh
run the script
root # ./script-heekscnc.sh
You can drink one big cup of tea, in the wait.
bye Slack !
Just wanted to state here that I was having all sorts of issues building this on Ubuntu. I kept getting errors similar to the following during linking:
Doing in internet search yielded that __WXDEBUG__ was being defined. Searching through the source did not turn up anything. After a bunch of trial and error, I found stdafx.h had the following at the top:
Removing that line fixed all the linking issues for me.
I can not get Ubuntu 8.04 Hardy - EMC2 cd to compile HeeksCNC.
I keep getting this error: ../../src/Geom.cpp:48: error: ‘heeksCAD’ was not declared in this scope
and error goes line for line till: ../../src/Geom.cpp:1275: error: ‘heeksCAD’ was not declared in this scope make: [Geom.o] Error 1
Can anybody help please....
Thanks
Piet
Piet,
HTH Paul
Thank you Paul
Your suggestion worked, I went through all the steps again and it worked.
Cheers
Piet
The script seems to work well for me on Ubuntu 10.04LTS.
Whenever there is a "make", if you want it to run faster on a multi core machine you can substitute "make -jN". I have found that N=5 on a quad-core machine works nice, so I've modified all the lines to "make -j5" in my script.
For some reason Im not getting any icons etc. I compiled CAD and CNC one by one at first and after that by the script. I still couldnt get icons (the panel-, menu- and objecticons are blank) to show. I'm on fresh 10.4 and remember having same problems with 8.04. I had to do a start script to get the icons working. The script was found under wiki at Compiling for debian and thats gone now. Im also getting this error when opening CNC: Could not open '/home/mika/HeeksCAD/HeeksCNC/../../share/heekscnc/nc/machines.txt' for reading
Thank you guys !
Ran the script - perfect installation on Ubuntu 10.04!
Well done. Rgds
Derek
I entered all the individual scripts on Ubuntu 10.04 (from the EMC2 liveCD), all ran with only a handful of warnings and appeared to have installed correctly. HeeksCAD started up fine, and I followed the directions to enable the HeeksCNC plugin. Since then HeeksCAD always crashes on startup with
Failed to load resource image from \U082c1d68
(the last word shows up as all Xed out boxes on my display).
Any suggestions on how to correct this?
Thanks!
Whoops, forgot I'd installed the precompiled Ubuntu version a few days ago (CAD only, CNC erred out). After removing this and rerunning the do-all script it now starts. Sorry for the wasted bandwidth.
These are all very confusing and hard to nit together what is needed and what is not and what is old.
If someone had a fresh ubuntu 10.10 install or whatever it is at the time. They could even install it to a usb stick... Then coppy all the install things they put into the command line into a webpage then anyone could do it.
here is the error I get please help.
KPLCAF wx-config --libs --gl-libs /usr/bin/ld: cannot find -lGL collect2: ld returned 1 exit status make: executable? Error 1 root@josheeg-desktop:~/HeeksCAD/src#
For some reason, the svn contains a Makefile that has been renamed to Makefile.old. Changing its name back to Makefile allows to do make clean, make, make install, thus enabling the Debian package building system. I was able to get my packages built running "sudo debuild -i -us -uc -b" (and sudo debuild -i -us -uc -S" for source packages) on Ubuntu Maverick 10.10, HeeksCAD is functional.
following the "new" instructions on ubuntu 10.10 and i get this error when installing the .deb:
hoeken@megabeast:~/HeeksCAD$ sudo dpkg -i heekscad_beta-0.15.1_amd64.deb (Reading database ... 201253 files and directories currently installed.) Unpacking heekscad (from heekscad_beta-0.15.1_amd64.deb) ... dpkg: error processing heekscad_beta-0.15.1_amd64.deb (--install):
dpkg-deb: subprocess paste killed by signal (Broken pipe) Errors were encountered while processing:I followed instructions on ubuntu 8.04, but I execute post-process in HeeksCNC, it tells me " Error Document Empty". How can I fix it?
I built 0.18 on ubuntu10.04 lts but the icon bar for the cnc (the icon of "go") is not there, the "machine" part does not display sub-manual. Linux people is second class citizen. Is it true ?
After rebuild with old method a new machine icon bar appear. but still no "go" icon.
eddie692, please see the bug and note above related to the ambience theme.
I found out that after install HeeksCAD and HeeksCNC if you del the .Heeks and .heeds then restart you have the icons pocket operation but still no "go"
try this: in the 'Options' panel on the left there is an entry for 'View Options' look for 'Tool icon size'- change that to a larger number and see what happens On my system(Ubuntu 10.04) it makes the 'Go' icon appear in the toolbar. Whether it appears in the toolbar or not never really bothered me before, because for some reason, I always use the 'Machining' menu entry and press 'Post-process'. I think most of the bugs associated with the toolbar are from the wxgtk version of wxWidgets that heekscad uses. I think we've gone over this before on IRC and determined that until the gtk version of wxWidgets gets some loving from those developers, we're stuck with some of these annoyances.
Cool project! I'm running Ubuntu 11.10, and I tested your script and got a .deb-file that I managed to install. I can also run HeeksCAD, but I got an error-message from apt-get:
The following packages have unmet dependencies: heekscad : Depends: libboost-python1.40.0 but it is not installable or libboost-python1.42.0 but it is not installed heekscnc : Depends: libboost-python1.40.0 but it is not installable or libboost-python1.42.0 but it is not installed Recommends: libopencascade-ocaf-6.3.0 but it is not installableSeems I have a new version of libboost-python1 installed:
Ubuntu 11.10 (solved)
at first after installing the heeks-deb-packages via dpgk my apt hung due to missing dependencies like described by the comment above. it hat to remove heekscad and heekscnc via ("dpkg -r heekscad" and "dpkg -r heekscnc) and instal the folowing packages first:
apt-get install libboost-python1.42.0
apt-get install python-wxgtk2.8
(for a curious reason i was not able to install these two packages while heekscad_x.deb packages were installed) after that it worked like a charm.
nice project!