Bug 5899 - Build system: Improve python version check
Build system: Improve python version check
Status: RESOLVED FIXED
Product: Samba 4.0
Classification: Unclassified
Component: Build
unspecified
x86 Linux
: P3 normal
: ---
Assigned To: Jelmer Vernooij
Andrew Bartlett
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-14 16:15 UTC by Yuri Evfimiou
Modified: 2008-12-20 08:40 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Evfimiou 2008-11-14 16:15:10 UTC
Followed installation steps here http://wiki.samba.org/index.php/Samba4/HOWTO

At Step 4: provision Samba4 receive the following error:

[source4]# ./setup/provision --realm=domain.com --domain=SAMBA4 --adminpass=somepassword --server-role='domain controller'
  File "./setup/provision", line 37
    from samba.provision import (provision,
                                ^
SyntaxError: invalid syntax

Python 2.3.4 (#1, Jul 25 2008, 14:24:21)

[source4]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/
usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/bin/pkg-config:/usr/local/samba/lib/
:/usr/local/samba/:/usr/local/samba/bin:/perl5/Parse:/root/bin

[source4]# cat /etc/redhat-release
CentOS release 4.7 (Final)

[source4]# perl -v

This is perl, v5.8.5 built for i386-linux-thread-multi
Comment 1 Andrew Bartlett 2008-11-16 23:59:44 UTC
Jelmer,

Any idea if this is a installation error, or something else?
Comment 2 Jelmer Vernooij 2008-11-17 14:30:09 UTC
What version of Python are you running?
Comment 3 Yuri Evfimiou 2008-11-17 15:21:10 UTC
rpm -qa | grep python
python-urlgrabber-2.9.8-2
python-elementtree-1.2.6-7.el4.rf
python-devel-2.3.4-14.7.el4
gnome-python2-bonobo-2.6.0-3
gnome-python2-gtkhtml2-2.6.0-3
python-ldap-2.0.1-2
rpm-python-4.3.3-26_nonptl
gnome-python2-canvas-2.6.0-3
libxml2-python-2.6.16-12.5
dbus-python-0.22-12.EL.9
postgresql-python-7.4.19-1.el4_6.1
python-sqlite-1.1.7-1.2.1
gnome-python2-2.6.0-3
mod_python-3.1.3-5.1
python-2.3.4-14.7.el4

Cheers
Comment 4 Jelmer Vernooij 2008-11-17 17:56:59 UTC
It looks like the "from foo import (...)" (with parentheses) syntax isn't supported in Python2.3. 
Comment 5 Yuri Evfimiou 2008-11-18 18:23:34 UTC
After upgrading Python to 2.6 the problem still exists. It appears CentOS 4.7 might have other packages that are not compatible. Installing on CentOS 5.2 appears to work.
Comment 6 Jelmer Vernooij 2008-11-23 22:14:44 UTC
are you sure it's actually using python 2.6 and not one of the older versions still installed on the system?
Comment 7 Matthias Dieter Wallnöfer 2008-12-01 11:16:52 UTC
It doesn't seem to be a bug, because the Python version could be inappropriate.
Please make sure to use the right version (like Jelmer asked in the previous post).
If no other problem is found, I'll close this bug with "INVALID".
Comment 8 Yuri Evfimiou 2008-12-01 12:57:01 UTC
Shall I open another bug that says Samba should not build if the python version is not the right one? or should I change this one?
Comment 9 Matthias Dieter Wallnöfer 2008-12-08 10:14:17 UTC
I adapt the bug. It is a problem regarding the dependency test in the "configure" script.
Jelmer, I think you are the right man for improving the python version check, so I assign it up to you.
Comment 10 Matthias Dieter Wallnöfer 2008-12-08 10:15:37 UTC
Change also the description.
Comment 11 Matthias Dieter Wallnöfer 2008-12-20 08:40:41 UTC
Should be fixed now through a patch by Jelmer.