Samba-3.0.20b and Python

Randy McMurchy randy at
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

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 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 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 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

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

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


More information about the samba-technical mailing list