Heeks / heekscad-old

/!\ Obsolete repository of HeeksCAD
http://heeks.net
Other
110 stars 47 forks source link

Unable to compile on Ubuntu 10.04 LTS 32 bit #16

Open Mooselake opened 12 years ago

Mooselake commented 12 years ago

This is the version on the EMC2 install CD. A rebuild from source is required since only 64 bit binaries are on google code.

INSTALL_UBUNTU.sh creates a complete second copy of the source (/home/kirk/heekscad/heekscad on my system), then fails after several errors. Excerpts from the build:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: FTGL_INCLUDE_DIR (ADVANCED) used as include directory in directory /home/kirk/heekscad/heekscad/heekscnc/oce/adm/cmake/TKOpenGl FTGL_LIBRARY (ADVANCED) linked by target "TKOpenGl" in directory /home/kirk/heekscad/heekscad/heekscnc/oce/adm/cmake/TKOpenGl

-- Configuring incomplete, errors occurred! make: * No targets specified and no makefile found. Stop. make: * No rule to make target `install'. Stop.

Lots of these:

CMake Warning at CMakeLists.txt:26 (find_package): Could not find module FindOCE.cmake or a configuration file for package OCE.

Adjust CMAKE_MODULE_PATH to find FindOCE.cmake or set OCE_DIR to the directory containing a CMake configuration file for OCE. The file will have one of the following names:

OCEConfig.cmake
oce-config.cmake

Fatal error in OCE:

cc1plus: warnings being treated as errors /home/kirk/heekscad/heekscad/heekscnc/opencamlib/src/algo/simple_weave.cpp: In member function ‘void ocl::weave::SimpleWeave::add_intvertex(const ocl::Point&, void&, void&, void&, void_&, ocl::Interval&, ocl::Interval&)’:

/home/kirk/heekscad/heekscad/heekscnc/opencamlib/src/algo/simple_weave.cpp:178: error: ‘ye_ul_prev.boost::detail::edge_desc_impl::.boost::detail::edge_base::m_target’ may be used uninitialized in this function make[2]: **\* [algo/CMakeFiles/ocl_algo.dir/simple_weave.o] Error 1 make[2]: **\* Waiting for unfinished jobs.... make[1]: **\* [algo/CMakeFiles/ocl_algo.dir/all] Error 2 make: **\* [all] Error 2 dpkg: error processing opencamlib__.deb (--install): cannot access archive: No such file or directory Errors were encountered while processing: opencamlib__.deb ..... then the compile quits.
fredrenner commented 12 years ago

I had compiled and used Heeks on ubuntu 10.xx then kubuntu 11.04 without (much) trouble. Just upgraded to 11.10 and ran into similar problems.

On the OCE errors: that is referring to OpenCASCADE. I just added a symlink named FindOCE.cmake that pointed to the corresponding FindOpenCASCADE.cmake and it was happy.

There were also differences in naming some files in /usr/lib named xxx.so instead of xxx.so.0 that symlinks also fixed.

Am still working on a revised install script.

fredrenner commented 12 years ago

So, of course, I just now see sliptonic's post from four days ago, in the 'solved' pile.

Mooselake commented 12 years ago

What/where sliptonic post? I was unable to find it.

Reinstalling ftgl_dev per aewallin's closed heekscnc issue #15 solved the TK_OpenGL errors, but I still have OCE errors, and the heekscad/heekscad double source issue. I'll add a symlink and try again.

fredrenner commented 12 years ago

Issues > Closed Items > #11 about a revised script that installs the OCE version of OpenCASCADE And it was 4 days + 1 month ago!

Mooselake commented 12 years ago

Updating to the latest opencamlib still generates the compile errors in simple_weave.cpp

abluesheep commented 12 years ago

I'm having exactly the same problem - compile errors in simple_weave.cpp.

Everything up to that point appears to work fine (once the necessary prerequisites have been identified and installed).

Appreciate any suggestions to get this working!

Mooselake commented 12 years ago

I don't have access to my CNC machine right now, but editing opencamlib's cmake config file (.../opencamlib/src/CMakeLists.txt) to remove the -Werror gcc option (treat warnings as errors) will opencamlib compile. Not sure why it's there, since there's a number of possibly uninitialized variable warnings that aren't significant but will abort the make. Maybe it's a gcc version issue.

I couldn't get heekscad to generate gcode - it failed but didn't produce any errors - but had to quit when we lost power in a snowstorm.

Hope this helps.

Mooselake commented 12 years ago

opencamlib now installs, with an warning CMake Warning at /home/kirk/heekscad/heekscnc/opencamlib/src/version_string.cmake:23 (message): Git not found. Build will not contain git revision info.

git is installed (package git-core). It doesn't seem to hurt anything. However, HeeksCNC has disappeared from HeeksCAD.

I run the make with a little script that captures the output into a log file:

heeksmake.log ./INSTALL_UBUNTU.sh 2>&1 >heeksmake.log & tail -f heeksmake.log

FWIW, my INSTALL_UBUNTU.sh . No warranties, express or implied, particularly since HeeksCNC is now broken. I don't think anybody's actually tested an install on the version on the EMC install disk, and opencamlib's (c)make needs some work to be compatible.

!/bin/sh

INSTALL_UBUNTU.sh -- Downloads, builds and installs HeeksCAD and related projects for ubuntu

DIR="$( cd "$( dirname "$0" )" && pwd )" # find out the current directory BUILDPATH=$DIR # Location of HeeksCAD build dir BUILDPREREQS="libwxbase2.8-dev cmake \ build-essential libwxgtk2.8 libwxgtk2.8-dev ftgl-dev \ libgtkglext1-dev python-dev cmake libboost-python-dev"

NUMCPU="$( grep '^processor' /proc/cpuinfo|wc -l)" MAKEOPT='-j'"$( expr $NUMCPU\ * 2 )"

Install build prerequisites

The next two lines can be commented out after the initial run.

sudo apt-get update

sudo apt-get install -y $BUILDPREREQS

cd ${BUILDPATH} if [ ! -d heekscad ]; then git clone --recursive git://github.com/Heeks/heekscad.git fi

echo ------- oce

cd ${BUILDPATH}/heekscad/heekscnc/oce if [ -d build ]; then cd build else mkdir build cd build fi cmake .. make $MAKEOPT

make

sudo make install

echo ----- HeeksCAD $MAKEOPT

cd ${BUILDPATH}/heekscad/ cmake .

make package $MAKEOPT #For faster build on multi-core machines, uncomment this line and comment out the next

make package

sudo dpkg -i heekscad_*.deb

echo ----- HeeksCNC

Install HeeksCNC

cd ${BUILDPATH}/heekscad/heekscnc/ cmake .

make package $MAKEOPT #For faster build on multi-core machines, uncomment this line and comment out the next

make package

sudo dpkg -i heekscnc_*.deb

echo ----- libarea

Install libarea

area.so is required for pocket operations.

Get the libarea files from the SVN repository, build, and install

cd ${BUILDPATH}/heekscad/heekscnc/libarea/ if [ -d build ]; then cd build else mkdir build cd build fi cmake .. make $MAKEOPT #For faster build on multi-core machines, uncomment this line and comment out the next

make

sudo make install sudo ln -s .libs/area.so ${BUILDPATH}/heekscad/heekscnc/area.so

echo ----- opencamlib

Install opencamlib

cd ${BUILDPATH}/heekscad/heekscnc/opencamlib/ if [ -d build]; then cd build else mkdir build cd build fi cmake ../src

sudo make $MAKEOPT package #For faster build on multi-core machines, uncomment this line and comment out the next

make package

sudo dpkg -i opencamlib_*.deb

echo ----- DONE

aewallin commented 12 years ago

In opencamlib I have now wrote a very simple cmake script to find out the gcc version https://github.com/aewallin/opencamlib/blob/master/src/gcc_version.cmake

In the main cmakelists.txt I then check for gcc 4.6 or newer when setting "-Werror". I could test this in a virtualbox later but please let me know if it works on 10.04

Mooselake commented 12 years ago

I downloaded HeeksCAD into a new directory and rebuilt it, but did not get your changes. Sorry, but I know almost nothing about git, having retired from development 10 years ago (the last source control I really learned was SCCS...), so please advise what to do.

As downloaded, it fails in simple_weave, with Werror removed it installs.

Thanks!

Mooselake commented 12 years ago

Making progress. After removing .heekscad, .HeeksCAD, and .HeeksCNC machining is back in the menu, and HeekCNC in the plugins. Making a simple part generates gcode to cut part of it, but fails with


Looking for default data in '/home/kirk' Importing data from /home/kirk/default.tooltable Looking for default data in '/usr/lib' Looking for default data in '/usr/lib/heekscnc' Importing data from /usr/lib/heekscnc/default.speeds Traceback (most recent call last): File "/tmp/post.py", line 154, in kurve_funcs.profile(curve, 'right', tool_diameter/2, offset_extra, roll_radius, roll_on, roll_off, rapid_safety_space, clearance, start_depth, step_down, final_depth,extend_at_start,extend_at_end,lead_in_line_len,lead_out_line_len ) File "/usr/lib/heekscnc/kurve_funcs.py", line 247, in profile raise Exception, "couldn't offset kurve " + str(offset_curve) Exception: couldn't offset kurve <area.Curve object at 0xb769f414>


area.so was missing from /usr/lib/heekscnc, but copying it there did not fix the problem.

aewallin commented 12 years ago

On Sun, Nov 13, 2011 at 8:12 AM, Mooselake reply@reply.github.com wrote:

I downloaded HeeksCAD into a new directory and rebuilt it, but did not get your changes.  Sorry, but I know almost nothing about git, having retired from development 10 years ago (the last source control I really learned was SCCS...), so please advise what to do. As downloaded, it fails in simple_weave, with Werror removed it installs.

The way HeeksCNC is set up now is that one directory in the heekscnc git-repository is a pointer to a certain commit in my opencamlib repository. Whenever I make new commits to opencamlib that pointer needs to be updated - or you can clone directly from my repo at https://github.com/aewallin/opencamlib

AW

abluesheep commented 12 years ago

AW,

Thanks for the updated code, I managed to pull it down fine, and a check of ~/heekscad/heekscnc/opencamlib/src/CMakeLists.txt shows the check for GCC_4_6

Unfortunately though, I am still unable to successfully build simple_weave.o. Here is the relevant section of the error log: [ 52%] Building CXX object algo/CMakeFiles/ocl_algo.dir/simple_weave.o cc1plus: warnings being treated as errors /home/jules/heekscad/heekscad/heekscnc/opencamlib/src/algo/simple_weave.cpp: In member function ‘void ocl::weave::SimpleWeave::add_intvertex(const ocl::Point&, void&, void&, void&, void_&, ocl::Interval&, ocl::Interval&)’: /home/jules/heekscad/heekscad/heekscnc/opencamlib/src/algo/simple_weave.cpp:177: error: ‘ye_lu_next.boost::detail::edge_desc_impl<boost::bidirectional_tag, void>::.boost::detail::edge_base<boost::bidirectional_tag, void>::m_source’ may be used uninitialized in this function /home/jules/heekscad/heekscad/heekscnc/opencamlib/src/algo/simple_weave.cpp:177: error: ‘ye_lu_next.boost::detail::edge_desc_impl<boost::bidirectional_tag, void>::.boost::detail::edge_base<boost::bidirectional_tag, void>::m_target’ may be used uninitialized in this function /home/jules/heekscad/heekscad/heekscnc/opencamlib/src/algo/simple_weave.cpp:177: error: ‘ye_lu_prev.boost::detail::edge_desc_impl<boost::bidirectional_tag, void>::.boost::detail::edge_base<boost::bidirectional_tag, void>::m_source’ may be used uninitialized in this function /home/jules/heekscad/heekscad/heekscnc/opencamlib/src/algo/simple_weave.cpp:177: error: ‘ye_lu_prev.boost::detail::edge_desc_impl<boost::bidirectional_tag, void>::.boost::detail::edge_base<boost::bidirectional_tag, void>::m_target’ may be used uninitialized in this function /home/jules/heekscad/heekscad/heekscnc/opencamlib/src/algo/simple_weave.cpp:178: error: ‘ye_ul_next.boost::detail::edge_desc_impl<boost::bidirectional_tag, void>::.boost::detail::edge_base<boost::bidirectional_tag, void>::m_source’ may be used uninitialized in this function /home/jules/heekscad/heekscad/heekscnc/opencamlib/src/algo/simple_weave.cpp:178: error: ‘ye_ul_next.boost::detail::edge_desc_impl<boost::bidirectional_tag, void>::.boost::detail::edge_base<boost::bidirectional_tag, void>::m_target’ may be used uninitialized in this function /home/jules/heekscad/heekscad/heekscnc/opencamlib/src/algo/simple_weave.cpp:178: error: ‘ye_ul_prev.boost::detail::edge_desc_impl<boost::bidirectional_tag, void>::.boost::detail::edge_base<boost::bidirectional_tag, void>::m_source’ may be used uninitialized in this function /home/jules/heekscad/heekscad/heekscnc/opencamlib/src/algo/simple_weave.cpp:178: error: ‘ye_ul_prev.boost::detail::edge_desc_impl<boost::bidirectional_tag, void>::.boost::detail::edge_base<boost::bidirectional_tag, void>::m_target’ may be used uninitialized in this function make[2]: *\ [algo/CMakeFiles/ocl_algo.dir/simple_weave.o] Error 1

Any suggestions of what else to try?

aewallin commented 12 years ago

abluesheep, please include your OS version, gcc version, and boost version with your error-report. Does the opencamlib cmake script correctly detect and set the GCC_4_6 variable? are you compiling with or without "-Werror" ?

abluesheep commented 12 years ago

I'm using Ubuntu 10.04LTS, kernel version 2.6.32, GCC version 4.3.3 and Boost 1.40. Not sure if GCC_4_6 is correctly detected though. I didn't edit the CMakeLists.txt file, but also didn't try to compile without "-Werror".

abluesheep commented 12 years ago

Sorry, my mistake - that was gcc 4.4.3. I'm trying to compile without "-Werror" now...

abluesheep commented 12 years ago

AW, it compiles fine now - basically the mistake I made was to update the ~/heekscad/heekscnc/opencamlib directory rather than the version embedded within ~/heekscad/heekscad/heekscnc/opencamlib. Once I pulled the latest changes to that directory, it compiled ok.

Thanks for your help!

Mooselake commented 12 years ago

The opencam lib Werror changes work here, too. A couple cmake warnings about finding git, which is definitely installed. No FindGit.cmake, either.

CMake Warning at /home/kirk/heeks/heekscad/heekscnc/opencamlib/src/version_string.cmake:9 (find_package): Could not find module FindGit.cmake or a configuration file for package Git.

Adjust CMAKE_MODULE_PATH to find FindGit.cmake or set Git_DIR to the directory containing a CMake configuration file for Git. The file will have one of the following names:

GitConfig.cmake
git-config.cmake

CMake Warning at /home/kirk/heeks/heekscad/heekscnc/opencamlib/src/version_string.cmake:23 (message): Git not found. Build will not contain git revision info.

aewallin commented 12 years ago

the FindGit.cmake script is probably something that comes with a more recent cmake version. Again this works without problems on my 11.04 and 11.10 Ubuntu systems. It should only affect the version-string, i.e. the output of "ocl.version()" nothing else.