1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

compile fail on debian for v13

Here you get help on installing and compiling FreeCAD.

compile fail on debian for v13

Postby surfin_eddie » Mon Jan 07, 2013 12:04 am

since days I try to compile the latest (I hope) v13 but without success.

Code: Select all
Scanning dependencies of target FreeCADMain
[ 36%] Building CXX object src/Main/CMakeFiles/FreeCADMain.dir/MainGui.cpp.o
Linking CXX executable ../../bin/FreeCAD
../../lib/libFreeCADApp.so: undefined reference to `boost::program_options::options_description::options_description(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)'
collect2: ld returned 1 exit status
make[2]: *** [bin/FreeCAD] Fehler 1
make[1]: *** [src/Main/CMakeFiles/FreeCADMain.dir/all] Fehler 2
make: *** [all] Fehler 2


The second time the compilation stops at this stage.
I followed the instructions of the "Debian Squeeze" section of the doc
https://sourceforge.net/apps/mediawiki/ ... eOnUnix/de

cmake I've called with
Code: Select all
cmake . -DEIGEN3_INCLUDE_DIR=/usr/local/FreeCADLibs_7.10_x86_VC9/include/eigen3 -DBOOST_INCLUDE_DIR=/usr/local/boost

There is an message:
Code: Select all
fatal: Not a git repository (or any parent up to mount parent /mnt)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
sh: bzr: Kommando nicht gefunden.
»/usr/local/free-cad« nicht versioniert und nicht exportiert
svn: »/usr/local« ist keine Arbeitskopie


but I' don't know what that means. I've used git for getting the sources.

boost: boost_1_52_0/ from source, debian_version: 6.0.6; arch: intel 32bit;
- bzr added

I'm asking for some help to solve it. Thanks in advance,

Ralf
surfin_eddie
 
Posts: 31
Joined: Tue Nov 13, 2012 11:39 pm

Re: compile fail on debian for v13

Postby surfin_eddie » Mon Jan 07, 2013 1:50 am

:(

the reported problems I could solve (cmake, git -> now svn) but compile still fails:

Code: Select all
[ 37%] Building CXX object src/Main/CMakeFiles/FreeCADMain.dir/MainGui.cpp.o
Linking CXX executable ../../bin/FreeCAD
../../lib/libFreeCADApp.so: undefined reference to `boost::program_options::options_description::options_description(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)'
../../lib/libFreeCADApp.so: undefined reference to `boost::program_options::options_description::options_description(unsigned int)'
collect2: ld returned 1 exit status
make[2]: *** [bin/FreeCAD] Fehler 1
make[1]: *** [src/Main/CMakeFiles/FreeCADMain.dir/all] Fehler 2
make: *** [all] Fehler 2


new cmake call was
Code: Select all
export GIT_DISCOVERY_ACROSS_FILESYSTEM=TRUE && cmake . -DEIGEN3_INCLUDE_DIR=/mnt/hda6/FreeCADLibs_7.10_x86_VC9/include/eigen3 -DBOOST_INCLUDE_DIR=/mnt/hda6/boost_1_52_


No idea where to search :(

Ralf
surfin_eddie
 
Posts: 31
Joined: Tue Nov 13, 2012 11:39 pm

Re: compile fail on debian for v13

Postby jmaustpc » Mon Jan 07, 2013 3:23 am

Hi Ralf

I just followed your link to the German wiki page, it seems it has not been updated in a while. You seem to have reasonable English skills, if so, perhaps initially you should have a look here

https://sourceforge.net/apps/mediawiki/free-cad/index.php?title=CompileOnUnix

It is the same as your link but is to the English page, which has been updated.

My first question is have you installed all of the parts of libboost required? I have installed it via my package manager, on Kubuntu 12.04.1, boost version 1.48.02.
If so, what about the dev packages?

Also I noticed that your said you downloaded the libboost source code. I wonder if it compiled properly, and is installed and if it is installed in a standard location where the system knows where to find it? Is libboost not in your package manager on Debian? If so wouldn't it be better to install the packages and their DEV packages from the package manager?

Is your system really 32bit? Are you sure it is not 64bit? Your hardware would be very likely 64bit but it is perfectly possible that you are running a 32bit operating system on 64bit hardware, but I thought now days most people would just be running a 64bit operating system.

I hope some of this might help.

Jim
jmaustpc
 
Posts: 2102
Joined: Tue Jul 26, 2011 6:28 am

Re: compile fail on debian for v13

Postby normandc » Mon Jan 07, 2013 5:08 am

I would not even trust that Debian Squeeze script from the English wiki.

For one thing it installs libeigen2-dev. Look at the Debian and Ubuntu dependencies list in section 2.1, it is much more up-to-date. It's libeigen3-dev that you need. Since eigen3 is not in Squeeze repositories you will have to compile it I guess.
User avatar
normandc
 
Posts: 3426
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: compile fail on debian for v13

Postby wmayer » Mon Jan 07, 2013 10:05 am

fatal: Not a git repository (or any parent up to mount parent /mnt)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
sh: bzr: Kommando nicht gefunden.
»/usr/local/free-cad« nicht versioniert und nicht exportiert
svn: »/usr/local« ist keine Arbeitskopie

Don't worry about this. At compilation time if the file Version.h is missing we run a Python script that tries to extract a revision number from the sources. Thus, we expect them to be handled by a version control system (VCS). The first one we try is git (because we use it on SF), the second one is Bazaar (because we use it on Launchpad) and the third one is SVN (because we used before git on SF).
Since you get a message of all three VCS failing I assume your sources lack of the Version.h and you don't have the meta-information of VCS any more. The reason in your case is that you use a Windows share mounted to your Debian box and git doesn't like this when GIT_DISCOVERY_ACROSS_FILESYSTEM is not set. But nevertheless, this doesn't stop your build, the worst thing that can happen is that the version information shown in the About dialog cannot be determined.

[ 37%] Building CXX object src/Main/CMakeFiles/FreeCADMain.dir/MainGui.cpp.o
Linking CXX executable ../../bin/FreeCAD
../../lib/libFreeCADApp.so: undefined reference to `boost::program_options::options_description::options_description(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)'
../../lib/libFreeCADApp.so: undefined reference to `boost::program_options::options_description::options_description(unsigned int)'
collect2: ld returned 1 exit status
make[2]: *** [bin/FreeCAD] Fehler 1
make[1]: *** [src/Main/CMakeFiles/FreeCADMain.dir/all] Fehler 2
make: *** [all] Fehler 2

It seems that your boost version is broken. The libboost_program_options library seems to be there and match the correct platform (because otherwise you would get a different error message) but there is the symbol for the class options_description missing inside the library. And that might be a problem the way how you build the boost lib. Or it's also possible that you got a version mismatch of two different boost versions.
wmayer
Site Admin
 
Posts: 4782
Joined: Thu Feb 19, 2009 10:32 am

Re: compile fail on debian for v13

Postby surfin_eddie » Mon Jan 07, 2013 11:39 pm

I've startet a kind of "reset":

as the
https://sourceforge.net/apps/mediawiki/free-cad/index.php?title=CompileOnUnix
said,
for my debian - no windows here - "6.06"
1)
Code: Select all
git clone git://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad freecad

2)
Code: Select all
apt-get install build-essential python libcoin60-dev libsoqt4-dev libxerces-c2-dev libboost-dev libboost-date-time-dev libboost-filesystem-dev libboost-graph-dev libboost-iostreams-dev libboost-program-options-dev libboost-serialization-dev libboost-signals-dev libboost-regex-dev libqt4-dev qt4-dev-tools python2.5-dev libsimage-dev libopencascade-dev libsoqt4-dev libode-dev subversion cmake libeigen2-dev python-pivy libtool autotools-dev automake gfortran


just for beeing shure that everything is installed right;

verifying boost in particular:

Code: Select all
apt-cache showpkPackage: libboost-dev
gives

Code: Select all
Versions:
1.42.0.1 (/var/lib/apt/lists/ftp.de.debian.org_debian_dists_stable_main_binary-i386_Packages) (/var/lib/dpkg/status)
Description Language:
                 File: /var/lib/apt/lists/ftp.de.debian.org_debian_dists_stable_main_binary-i386_Packages
                  MD5: e160f7026fe3a25c03c30f42a52d8350


Reverse Depends:
  libxmmsclient++-dev,libboost-dev
  libwt-dev,libboost-dev 1.36.0
  libsource-highlight-dev,libboost-dev
  libmdds-dev,libboost-dev 1.39
  libtorrent-rasterbar-dev,libboost-dev
  libparser++-dev,libboost-dev
  libftdipp-dev,libboost-dev 1.33
  libluabind-dev,libboost-dev 1.34
  libgetfem++-dev,libboost-dev
  libgecode-dev,libboost-dev
  libdolfin0-dev,libboost-dev
  science-robotics,libboost-dev
  libdeal.ii-dev,libboost-dev
  libboost1.42-dev,libboost-dev 1.35.0
  libboost-dbg,libboost-dev 1.42.0.1
  libboost-all-dev,libboost-dev
  libasio-dev,libboost-dev
  libakonadi-dev,libboost-dev
Dependencies:
1.42.0.1 - libboost1.42-dev (0 (null))
Provides:
1.42.0.1 -
Reverse Provides:
g libboost-dev



3) cmake .
gives an error
Code: Select all
Due to the missing Eigen3 library the Sketcher module won't be built
Due to the missing Eigen3 library the Robot module won't be built


3.1)
export GIT_DISCOVERY_ACROSS_FILESYSTEM=TRUE && cmake . -DEIGEN3_INCLUDE_DIR=/mnt/hda6/FreeCADLibs_7.10_x86_VC9/include/eigen3

works without errors, saying
Code: Select all
...
-- Platform is 32-bit-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/hda6/freecad



compile (make) - fail as before

3.2)
apt-get install --reinstall libboost-dev
everything like before.
Code: Select all
[ 36%] Built target FreeCADGuiPy
Linking CXX executable ../../bin/FreeCAD
../../lib/libFreeCADApp.so: undefined reference to `boost::program_options::options_description::options_description(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)'
collect2: ld returned 1 exit status
make[2]: *** [bin/FreeCAD] Fehler 1
make[1]: *** [src/Main/CMakeFiles/FreeCADMain.dir/all] Fehler 2
make: *** [all] Fehler 2



I think this way I've used the debian boost librarys but it doesn't work. Also the try
3.3)
the cmake-preparation with -DBOOST_INCLUDE_DIR=/mnt/hda6/FreeCADLibs_7.10_x86_VC9 doesn't change the result. This librarys I've shure "not touched". Should this not alternatively work instead of my possible broken debian-boost lib?

Ralf
surfin_eddie
 
Posts: 31
Joined: Tue Nov 13, 2012 11:39 pm

Re: compile fail on debian for v13

Postby normandc » Tue Jan 08, 2013 12:51 am

surfin_eddie wrote:3) cmake .
gives an error
Code: Select all
Due to the missing Eigen3 library the Sketcher module won't be built
Due to the missing Eigen3 library the Robot module won't be built

Did you ignore my post on purpose?
User avatar
normandc
 
Posts: 3426
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: compile fail on debian for v13

Postby jmaustpc » Tue Jan 08, 2013 1:28 am

Like Norm said, check your dependencies against the Ubuntu list as it is the most likely to be up to date.

FreeCADLibs_7.10_x86_VC9

the FreeCAD libs pack is for Windows, you don't use it on Linux.

make sure you have "Eigen3" and dev packages installed, if it is not available for your OS then you will have to compile it. It seems to me to be strange if you couldn't find pre-compiled packages, but Norm could very well be correct, he is certainly more likely to know than I am, I really don't know.

I have to got out right now...back in a few hours

Jim
jmaustpc
 
Posts: 2102
Joined: Tue Jul 26, 2011 6:28 am

Re: compile fail on debian for v13

Postby normandc » Tue Jan 08, 2013 2:37 am

jmaustpc wrote:if it is not available for your OS then you will have to compile it. It seems to me to be strange if you couldn't find pre-compiled packages, but Norm could very well be correct, he is certainly more likely to know than I am, I really don't know.

I just remembered that Eigen3 was not supplied in the Ubuntu 10.04 repositories, on our PPA wmayer copied the packages from another PPA so that the daily packages would build for Lucid.

And I searched for libeigen3-dev on packages.debian.org. Debian Squeeze is the current stable version, and Eigen3 is nowhere to be found. http://packages.debian.org/search?keywo ... ection=all

The libeigen3-dev package is in Debian Testing, and it has no dependencies. Maybe he could simply copy the package and install it.
http://packages.debian.org/wheezy/libeigen3-dev
User avatar
normandc
 
Posts: 3426
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: compile fail on debian for v13

Postby wmayer » Tue Jan 08, 2013 9:40 am

The libeigen3-dev package is in Debian Testing, and it has no dependencies. Maybe he could simply copy the package and install it.
http://packages.debian.org/wheezy/libeigen3-dev

Yep, the eigen3 library is a 100% pure template library and thus doesn't need to be built and thus has no dependencies. So, this means that you can simply install the package from Debian sid for example.

the cmake-preparation with -DBOOST_INCLUDE_DIR=/mnt/hda6/FreeCADLibs_7.10_x86_VC9 doesn't change the result. This librarys I've shure "not touched". Should this not alternatively work instead of my possible broken debian-boost lib?

This is a pretty bad idea because the boost version of the Windows LibPack may not match with the version installed on your system. And such things very like leads to linker errors.

Anyway, the problem with the linker error is either because your boost package has a bug (over the last few years we had such problems a couple of times) or you have a version mismatch. The version mismatch may also come from that you tried to build with the header files from the Windows LibPack. You should run a make clean or create a new sub-directory to build the sources.

Then to see which boost libs are used at linking time go to the build directory and from there check the file: src/App/CMakeFiles/FreeCADApp.dir/build.make. Maybe you can post the file here.

As said above we had already some linker errors with boost a few times. And there the trick was to add the source code of the missing symbols into FreeCAD. See src/App/Application.cpp line 1351ff. So, as last solution you can try to add this code snippet there (no guarantee that it works):
Code: Select all
namespace boost { namespace program_options {
    options_description::options_description(const string& caption,
                                             unsigned line_length)
    : m_caption(caption), m_line_length(line_length)
    {}
}
}
wmayer
Site Admin
 
Posts: 4782
Joined: Thu Feb 19, 2009 10:32 am

Next

Return to Install / Compile

Who is online

Users browsing this forum: No registered users and 0 guests