View Issue Details

IDProjectCategoryView StatusLast Update
0001322FreeCADBugpublic2015-12-15 13:18
Reporterdem0nax Assigned Towmayer  
PrioritylowSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformi386 - GNU LINUXOSDebianOS Version7.2
Product Version0.9 
Fixed in Version0.16 
Summary0001322: Multple python versions in debian causing Python 2.6 (earlier Python version) linking and failing to install FreeCAD
DescriptionMake produces multiple warnings and errors referencing pivy and other modules.
Excerpts from the make std output are attached.


Steps To Reproduce# With python2.6 and python2.7 installed;
# in freecad_build directory:
cmake ../source_directory
make
Additional InformationRequested help at debian IRC: otfc.net, channel: #debian. IRC user ID: **themill** recommended forcing cmake to compile against python 2.7.

After briefly perusing the docs on cmake, I modified the file: ../FreeCAD_sf_master/CMakeLists.txt. I changed the following line *from:*
`set(Python_ADDITIONAL_VERSIONS "2.3" "2.4" "2.5" "2.6" "2.7" "2.8" "2.9")`
*to:*
`set(Python_ADDITIONAL_VERSIONS "2.7" "2.8" "2.9")`

Then, FreeCAD compiled; I completed the basic tutorial, and it worked well.

I suppose I may have changed the order to" "2.9" "2.8" "2.7" "2.6" versus the elimination process that I implemented. I'll eventually try that and report back.

 
TagsNo tags attached.
FreeCAD Information

Activities

dem0nax

2013-12-02 00:18

reporter  

make_excerpts.log (Attachment missing)

yorik

2013-12-02 13:30

administrator   ~0003915

I'm not sure this is something we should modify on the freecad side. Setting one version as default instead of another one could solve your problem on debian but create problems on another distro.

On my debian system, the default python version is 2.7, and freecad compiles correctly with 2.7. And I have 2.6 installed too. Probably your default is 2.6 (the one that opens when you type "python") Maybe you need to change what your default python version is? Not sure how to do that, though.

wmayer

2013-12-02 14:23

administrator   ~0003918

Usually /usr/bin/python is a symbolic which e.g. links to /usr/bin/python2.6. So, to change the default python version simply delete the symbolic link and create a new one to the desired python version.

Nevertheless, I think there is a problem with the cmake test for python. In the past I didn't know of problems like this but in the last 0000010:0000012 months we had a couple of reports where the headers of python 2.x were used but the linker tried to link python 2.y and failed.

dem0nax

2013-12-03 01:17

reporter   ~0003920

Yorik, wmayer: Thank you for your response. Python 2.7 was default when I compiled FreeCAD and still is. Excerpt from `ls -halt` output on /usr/bin:

lrwxrwxrwx 1 root root 9 Sep 28 15:41 python -> python2.7
lrwxrwxrwx 1 root root 9 Sep 28 15:41 python2 -> python2.7
lrwxrwxrwx 1 root root 16 Sep 28 15:41 python-config -> python2.7-config

I understand that changes accommodating one OS may damage another. I generated this report to offer a possible work-around solution to those that happen to find it. stuart@themill.user.oftc.net reported on IRC:

"are you compiling against python 2.6 or 2.7 there? (can you force it to only compile against python 2.7? apparently the freecad build system has a nasty habit of doing the wrong thing here)"

As you mentioned, this indicates that multiple people/systems are experiencing this issue.

ulrich1a

2014-01-23 21:57

reporter   ~0004117

I have the problem too. So my workaround is to edit the cmakecache.txt file and replace all python2.6 items with python2.7.
After that you can call again cmake . and everything is fine.
The interesting thing is, there are some places where python2.7 is put in from the beginning. So I have a mix of python2.6 and python2.7 in the cmakecache.txt after the first call of cmake-gui.

mrlukeparry

2014-02-08 00:30

developer   ~0004163

Can you try setting the CMAKE Variable

-DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python2

Seemed to work fine for me using python 2.7 on Arch

Related Changesets

FreeCAD: master 8da4f1dd

2015-07-31 00:37:05

wmayer

Details Diff
+ fixes 0001322 Affected Issues
0001322
mod - CMakeLists.txt Diff File

Issue History

Date Modified Username Field Change
2013-12-02 00:18 dem0nax New Issue
2013-12-02 00:18 dem0nax File Added: make_excerpts.log
2013-12-02 13:30 yorik Note Added: 0003915
2013-12-02 14:23 wmayer Note Added: 0003918
2013-12-03 01:17 dem0nax Note Added: 0003920
2014-01-23 21:57 ulrich1a Note Added: 0004117
2014-02-08 00:30 mrlukeparry Note Added: 0004163
2015-07-30 22:37 wmayer Changeset attached => FreeCAD Master master 8da4f1dd
2015-07-30 22:37 wmayer Assigned To => wmayer
2015-07-30 22:37 wmayer Status new => closed
2015-07-30 22:37 wmayer Resolution open => fixed
2015-12-15 13:18 yorik Fixed in Version => 0.16