[Samba] Samba4 with python2.7 and python3

Ng Oon-Ee ngoonee at gmail.com
Tue Jan 11 16:23:48 MST 2011


Hi all,

Arch Linux (a rolling release distro) has updated to python3 a while
back. python2 is still installed in parallel, but part of the
ramifications of this move is the following:-0
1. /usr/bin/python points to /usr/bin/python3 instead of /usr/bin/python2
2. /usr/bin/python-config points to /usr/bin/python3-config instead of
/usr/bin/python2-config

I'm having problems with make for samba4 (am installing it to be able
to install openchange->evolution-mapi. Initial problems were simply
that various scripts don't reference the PYTHON env variable, so I ran
a sed as follows:-
  sed -i -e "s|/usr/bin/env python$|/usr/bin/env python2|" \
         -e "s|python-config|python2-config|" \
         -e "s|bin/python|bin/python2|" \
    $(find ${samba-4.0.0alpha13 -type f)

This gets me all the way past configure, but now I have this error:-

'configure' finished successfully (29.915s)
WAF_MAKE=1 ../buildtools/bin/waf build
Waf: Entering directory
`/var/abs/local/aur/samba4/src/samba-4.0.0alpha13/source4/bin'
Checking project rules ...
Project rules pass
Waf: Leaving directory
`/var/abs/local/aur/samba4/src/samba-4.0.0alpha13/source4/bin'
find_or_declare found a source file where a build file was expected
'lib/Parse/Pidl/IDL.pm'
make: *** [all] Error 1
    Aborting...

Confusingly, replacing /usr/bin/python and /usr/bin/python-config with
symlinks to the python2 equivalent works fine (compiles completely)
but is quite a hackish way to solving it. Would appreciate advise.
Thank you all.


More information about the samba mailing list