We have two version of python install on our system. In /usr/bin we have python 2.4.3 and in /usr/local/bin we have python 2.5. Many of the scripts are hardcoded to use /usr/bin/python.
Samba will be compiled with flags:
CPP = gcc -E
CPPFLAGS = -I./include -I. -I./lib -I./../lib/replace -I./../lib/talloc -I./.. -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H
CC = gcc
CFLAGS = -g -DDEBUG_PASSWORD -DDEVELOPER -Wall -Wshadow -Werror-implicit-function-declaration -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wmissing-format-attribute -Wformat=2 -Wdeclaration-after-statement -Wunused-macros -Wno-format-y2k -Wno-unused-parameter
PICFLAG = -fPIC
BNLD = gcc
BNLD_FLAGS = -Wl,--export-dynamic
STLD = /usr/local/bin/ar
STLD_FLAGS = -rcs
SHLD = gcc
SHLD_FLAGS = -shared -Wl,-Bsymbolic
MDLD = gcc
MDLD_FLAGS = -shared -Wl,-Bsymbolic -Wl,--allow-shlib-undefined
SHLIBEXT = so
srcdir = .
builddir = .
pwd = /storage/LSP4/contrib/samba/samba-alpha12/source4
( rm -f ./st/st_done && LD_LIBRARY_PATH=./bin/shared:$LD_LIBRARY_PATH PYTHON=/usr/local/bin/python2.5 /usr/local/bin/perl -W ./../selftest/selftest.pl --prefix=./st --builddir=. --srcdir=. --exclude=./selftest/skip --testlist="./selftest/tests.sh|" --exclude=./selftest/slow --quick --include=./selftest/quick --socket-wrapper && touch ./st/st_done ) | /usr/local/bin/perl -W ./../selftest/filter-subunit.pl --expected-failures=./selftest/knownfail | /usr/local/bin/perl -W ./../selftest/format-subunit.pl --prefix=./st --format=plain --immediate
OPTIONS --configfile=$SMB_CONF_PATH --maximum-runtime=1200 --target=samba4 --basedir=/storage/LSP4/contrib/samba/samba-alpha12/source4/st/s4client --option=torture:progress=no --format=subunit --option=torture:quick=yes
Fatal Python error: Interpreter not initialized (version mismatch?)
Unable to provision:
NSS_WRAPPER_PASSWD="/storage/LSP4/contrib/samba/samba-alpha12/source4/st/dc/etc/passwd" NSS_WRAPPER_GROUP="/storage/LSP4/contrib/samba/samba-alpha12/source4/st/dc/etc/group" /usr/local/bin/python2.5 ./setup/provision --configfile=/storage/LSP4/contrib/samba/samba-alpha12/source4/st/dc/etc/smb.conf --host-name=localdc1 --host-ip=127.0.0.1 --quiet --domain=SAMBADOMAIN --realm=SAMBA.EXAMPLE.COM --adminpass=localdcpass --krbtgtpass=krbtgtlocaldcpass --machinepass=machinelocaldcpass --root=wehrly --server-role="domain controller"
A summary with detailed information can be found in:
ALL OK (0 tests in 0 testsuites)
make: *** [quicktest] Error 1
in this case the script is being run explicitly by /usr/local/bin/python2.5 if I read the error message correctly, so the shebang lines shouldn't be relevant.
What are the python modules linked against ? (e.g. "ldd bin/python/ldb.so")
Well, to start scripts with Python 2.5 when it isn't the default one in "/usr/bin" you should use the full path name of the binary in front of the script. This isn't very nice but it is needed (otherwise you get always in conflict with the different environments). So you might consider to make the newer release the default one (probably through a symbolic link under "/usr/bin").
Regarding your problem: Did "configure" choose Python 2.5 as the preferred environment? It might has chosen the other one and then you fell into this issue.
Other possible error: did you compile Python 2.5 on your own? Then you have to make sure to create the standard library as shared object (libpython2.5.so). This is doable with a "configure" option ("--enable-shared" or something like this) before the build. We don't support linking against a static standard library.
Yes, the python scripts are linked against bin/python/ldb.so.
Here are my configure options:
PYTHON_VER=2.5 ./configure.developer --prefix=/usr/local --enable-fhs
Python in /usr/bin is installed via yum. Python in /usr/local/bin is compiled from source.
libpython2.5.so exists in /usr/local/lib.
One question: do you really need the Python 2.5 installation? Since s4 supports also Python 2.4. And we would recommend to use always the system provided version since as you see it's a pain to get this working with two different releases.
We only dropped Python 2.3 support a month ago or so.
Forgot one comment: sometimes developers add accidentally Python 2.4 incompatible code to our source. If you realize such a problem (you can prove that by looking at the source code on the specified line and then do a lookup in the Python reference guide) write us at "email@example.com".
We have several libraries in /usr/local/lib linked against python 2.5. These include dbus-python, gnome-python, libxml2-python, libxslt-python, pycairo, ... any a couple more. We have /usr/local/bin before /usr/bin in the path. We would like to compile samba against python 2.5 as well.
Btw did you try once the python 2.4 compilation? I would strongly suggest to use that, so you don't need to call all scripts using the python2.5 binary as prefix and there shouldn't be needed any configurations settings at all.
Jelmer (our python specialist) has tested this on his own computer where it works and answered your email. So please discuss your problem with him on the mailing list which fits better.
Closing this with "INVALID" here.
This appears to be a problem in the merged build, not in Samba 4 itself. We don't appear to have a product for that in bugzilla though.