Link Errors With Today's Master

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
wandererfan
Veteran
Posts: 6320
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Link Errors With Today's Master

Post by wandererfan »

From master downloaded this morning:

Code: Select all

Linking CXX shared library ../../../../Mod/Part/Part.so
/usr/bin/ld: Geom2d/CMakeFiles/PartGeom2dPy.dir/ArcOfCircle2dPyImp.cpp.o: relocation R_X86_64_32S against `_ZTVN4Part15ArcOfCircle2dPyE' can not be used when making a shared object; recompile with -fPIC
Geom2d/CMakeFiles/PartGeom2dPy.dir/ArcOfCircle2dPyImp.cpp.o: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [Mod/Part/Part.so] Error 1
make[1]: *** [src/Mod/Part/App/CMakeFiles/Part.dir/all] Error 2
Beyond me, I'm afraid.

OS: Ubuntu 12.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9008 +2 (Git)
Build type: debug
Branch: PreProd
Hash: 53e9acfc71f842ac839a43cfd3c0bdfec547c61f
Python version: 2.7.3
Qt version: 4.8.1
Coin version: 3.1.3
OCC version: 7.0.0
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Link Errors With Today's Master

Post by wmayer »

Which cmake version do you use there?

The Linux travis builds fail too but with this error:
[ 34%] Building CXX object src/Gui/CMakeFiles/FreeCADGui.dir/CallTips.cpp.o
[ 34%] Building CXX object src/Gui/CMakeFiles/FreeCADGui.dir/EditorView.cpp.o
[ 34%] /home/travis/build/FreeCAD/FreeCAD/src/Mod/Part/App/Geom2d/Geometry2dPyImp.cpp: In member function ‘PyObject* Part::Geometry2dPy::transform(PyObject*)’:
/home/travis/build/FreeCAD/FreeCAD/src/Mod/Part/App/Geom2d/Geometry2dPyImp.cpp:144:9: error: ‘class gp_Trsf2d’ has no member named ‘SetValues’
trf.SetValues(a11,a12,a13,a21,a22,a23);
^
make[2]: *** [src/Mod/Part/App/Geom2d/CMakeFiles/PartGeom2dPy.dir/Geometry2dPyImp.cpp.o] Error 1
Building CXX object src/Gui/CMakeFiles/FreeCADGui.dir/PythonConsole.cpp.o
make[1]: *** [src/Mod/Part/App/Geom2d/CMakeFiles/PartGeom2dPy.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 34%] Building CXX object src/Gui/CMakeFiles/FreeCADGui.dir/PythonConsolePy.cpp.o
which means that it needs a special treatment for older OCC versions.
User avatar
wandererfan
Veteran
Posts: 6320
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Link Errors With Today's Master

Post by wandererfan »

wmayer wrote:Which cmake version do you use there?

Code: Select all

user@sage:~/freecad-draw2-build$ cmake --version
cmake version 3.2.3
CMake suite maintained and supported by Kitware (kitware.com/cmake).
If it is of any use, here is the cmake generate output:

Code: Select all

prefix: /usr/local
datadir: data
docdir: doc
includedir: include
libdir: /usr/local/lib
Boost version: 1.55.0
Found the following Boost libraries:
  filesystem
  program_options
  regex
  signals
  system
  thread
Found Xerces-C: /usr/lib/libxerces-c.so
PyCXX found:
  Headers:  /home/user/FreeCAD-src/src
  Sources:  /home/user/FreeCAD-src/src/CXX
-- Found OCE/OpenCASCADE version: 7.0.0
-- OCE/OpenCASCADE include directory: /usr/local/include/opencascade
-- OCE/OpenCASCADE shared libraries directory: /usr/local/lib
checking for module 'Coin'
  package 'Coin' not found
Could NOT find Spnav (missing:  SPNAV_LIBRARY SPNAV_INCLUDE_DIR) 
libshiboken built for Release
Found PySide Tools: /usr/bin/pyside-uic, /usr/bin/pyside-rcc
-- matplotlib-1.1.1rc has been found.
Platform is 64-bit, set -D_OCC64
Build type: debug
git
/home/user/freecad-draw2-build/src/Build/Version.h written

/home/user/freecad-draw2-build/src/Mod/Part/App/Geom2d/ArcOfCircle2dPy.cpp
/home/user/freecad-draw2-build/src/Mod/Part/App/Geom2d/ArcOfConic2dPy.cpp
/home/user/freecad-draw2-build/src/Mod/Part/App/Geom2d/ArcOfEllipse2dPy.cpp
/home/user/freecad-draw2-build/src/Mod/Part/App/Geom2d/ArcOfHyperbola2dPy.cpp
/home/user/freecad-draw2-build/src/Mod/Part/App/Geom2d/ArcOfParabola2dPy.cpp
/home/user/freecad-draw2-build/src/Mod/Part/App/Geom2d/BezierCurve2dPy.cpp
/home/user/freecad-draw2-build/src/Mod/Part/App/Geom2d/BSplineCurve2dPy.cpp
/home/user/freecad-draw2-build/src/Mod/Part/App/Geom2d/Circle2dPy.cpp
/home/user/freecad-draw2-build/src/Mod/Part/App/Geom2d/Conic2dPy.cpp
/home/user/freecad-draw2-build/src/Mod/Part/App/Geom2d/Ellipse2dPy.cpp
/home/user/freecad-draw2-build/src/Mod/Part/App/Geom2d/Geometry2dPy.cpp
/home/user/freecad-draw2-build/src/Mod/Part/App/Geom2d/Hyperbola2dPy.cpp
/home/user/freecad-draw2-build/src/Mod/Part/App/Geom2d/Curve2dPy.cpp
/home/user/freecad-draw2-build/src/Mod/Part/App/Geom2d/Line2dSegmentPy.cpp
/home/user/freecad-draw2-build/src/Mod/Part/App/Geom2d/OffsetCurve2dPy.cpp
/home/user/freecad-draw2-build/src/Mod/Part/App/Geom2d/Parabola2dPy.cpp
Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
=======================================
Now run 'make' to build FreeCAD
=======================================

Configuring done
Generating done
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Link Errors With Today's Master

Post by wmayer »

What I am trying to achieve is that I have a sub-directory Geom2d in the part module -- just to avoid to have all source files inside one directory.
Originally I had the CMakeLists.txt file (under Part/App) to control all the source files of the Geom2d sub-directory. This worked well for all the travis and AppVeyor builds and also my local Windows build. However, it failed for my local Linux (Ubuntu 14.04) build because it didn't create the Geom2d directory in the build directory.

I found this https://cmake.org/Wiki/CMake/Tutorials/Object_Library which actually worked well for Windows again and seems to work for OSX, too. Unfortunately, it doesn't work for me either under Ubuntu.
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Link Errors With Today's Master

Post by wmayer »

OK, I have restored the old version and have found a way to make sure to create the needed sub-directory. The travis builds have already succeeded again...
User avatar
wandererfan
Veteran
Posts: 6320
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Link Errors With Today's Master

Post by wandererfan »

wmayer wrote:OK, I have restored the old version and have found a way to make sure to create the needed sub-directory. The travis builds have already succeeded again...
Works here too. Thank you.
Post Reply