Bug 7905 - Pytalloc installs talloc.so into the wrong directory
Summary: Pytalloc installs talloc.so into the wrong directory
Alias: None
Product: TALLOC
Classification: Unclassified
Component: libtalloc (show other bugs)
Version: unspecified
Hardware: x64 Linux
: P3 normal
Target Milestone: ---
Assignee: Andrew Tridgell
QA Contact: Samba QA Contact
Depends on:
Reported: 2011-01-10 07:49 UTC by Stephen Gallagher
Modified: 2020-12-11 11:23 UTC (History)
0 users

See Also:

Patch to install python bindings into an arch-specific location (1.24 KB, patch)
2011-01-12 14:10 UTC, Stephen Gallagher
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Gallagher 2011-01-10 07:49:49 UTC
On 64-bit systems, the talloc build system does not put talloc.so into the 64-bit arch-specific location.

e.g. On Fedora 14 it would be: 

It is instead put into 

The build system should be using the platform specific Python library as identified by distutils.sysconfig.get_python_lib(plat_specific=1)

Steps to reproduce:

1) Create distribution tarball of talloc-2.0.5
2) Extract tarball, cd into it
3) ./autogen.sh
4) ./configure \
--build=x86_64-unknown-linux-gnu \
--host=x86_64-unknown-linux-gnu \
--target=x86_64-redhat-linux-gnu \
--program-prefix= \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--sysconfdir=/etc \
--datadir=/usr/share \
--includedir=/usr/include \
--libdir=/usr/lib64 \
--libexecdir=/usr/libexec \
--localstatedir=/var \
--sharedstatedir=/var/lib \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
5) make
6) make install
Comment 1 Stephen Gallagher 2011-01-12 14:10:21 UTC
Created attachment 6196 [details]
Patch to install python bindings into an arch-specific location
Comment 2 Andrew Tridgell 2011-01-14 00:34:44 UTC
Thanks for this bug report!

I've updated us to a newer version of waf-1.5, which has a PYTHONARCHDIR variable which does the right thing. I tested it on a x86_64 Fedora system.

Patch is in autobuild now
Comment 3 Stephen Gallagher 2011-01-14 06:08:56 UTC
Would you mind attaching the WAF patch to this ticket? I'd like to include that in my RPM builds for Fedora until a new version of libtalloc is released upstream.
Comment 4 Andrew Bartlett 2011-01-31 23:32:56 UTC
Unfortunately the fix for this is incorrect in the general case, despite working for talloc and tdb etc.  Samba4 now cannot install on any 64 bit system, because python does not read the lib64 directory once it finds the pure python parts under lib.

We may need to install all our python scripts under lib64 to work around this issue.  (it isn't a matter of the paths being wrong, I've already spent the day writing code to fix the sys.path to contain both lib and lib64). 
Comment 5 Andrew Bartlett 2011-02-02 17:24:09 UTC
All Samba components (binaries and scripts) are now installed in lib64 where that exists.