Samba-3.0.20b and Python

Randy McMurchy randy at linuxfromscratch.org
Sun Dec 18 21:58:56 GMT 2005


Hi all,

Sorry if this is the wrong list and I should have sent this
message to the General Samba list.

Anyway, I tried to pass the --with-python parameter while
building Samba-3.0.20b from the source tarball. First of
all, do know that it builds perfectly if I don't pass
--with-python.

However, if I do pass it the build will fail while building
the first Python extension due to the fact that it ends up
trying to pass -lthread as a library flag. It should be
trying to pass -lpthread, but there seems to be flaw in
the setup.py file.

I have no libthread.* library on my system, so of course, I
get a failure when it tries to build the first Python extension.
I tracked the issue to the setup.py file and noted that it
is actually trying to pass the correct library flag -lpthread
but the logic that splits the library component and the flags
component in the setup.py file seems flawed.

Here is the fix that works for me. With the current directory
being .../samba-3.0.20b/source, I issue the following sed
command:

sed -i "60s/lib\[2/lib[1/" python/setup.py

Performing this sed modifies setup.py so that the correct
-lpthread is passed to the build, and everything builds fine
after that.

--
Randy




More information about the samba-technical mailing list