Bug 11458 - --bundled-libraries=!ldb,!pyldb,!pyldb-util doesn't disable ldb build and install
Summary: --bundled-libraries=!ldb,!pyldb,!pyldb-util doesn't disable ldb build and ins...
Status: CLOSED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build (show other bugs)
Version: 4.3.0rc1
Hardware: All All
: P5 regression (vote)
Target Milestone: 4.3
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
: 11468 (view as bug list)
Depends on:
Blocks: 10695
  Show dependency treegraph
 
Reported: 2015-08-19 16:04 UTC by Lars Müller
Modified: 2021-02-11 14:14 UTC (History)
4 users (show)

See Also:


Attachments
rpm buildlog of an openSUSE 13.2 x86_64 build (934.47 KB, text/plain)
2015-08-19 16:04 UTC, Lars Müller
no flags Details
config.log bzip2 compressed (220.64 KB, application/x-bzip)
2015-08-19 16:40 UTC, Lars Müller
no flags Details
config.h (30.58 KB, text/plain)
2015-08-19 16:41 UTC, Lars Müller
no flags Details
config.log with added !pyldb-util as requested with comment #6 (42.85 KB, application/x-bzip)
2015-08-25 21:12 UTC, Lars Müller
no flags Details
Possible patches for master (9.35 KB, patch)
2015-08-27 12:32 UTC, Stefan Metzmacher
no flags Details
Patch for v4-3-test (1.72 KB, patch)
2015-08-31 20:34 UTC, Stefan Metzmacher
lars: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Müller 2015-08-19 16:04:59 UTC
Created attachment 11352 [details]
rpm buildlog of an openSUSE 13.2 x86_64 build

Building with --bundled-libraries=!ldb,!pyldb worked for 4.2 and earlier
versions.

I've tried a manual configure && make too.  The full list of configure
options while the failing manual build had been:

--prefix=/usr
--localstatedir=/var
--sysconfdir=/etc/samba
--with-configdir=/etc/samba
--libdir=/usr/lib64/samba
--with-lockdir=/var/lib/samba
--with-logfilebase=/var/log/samba
--mandir=/usr/share/man
--with-modulesdir=/usr/lib64/samba
--disable-rpath
--disable-rpath-install
--enable-cups
--enable-debug
--enable-fhs
--with-acl-support
--with-automount
--with-dnsupdate
--with-pam
--with-pammodulesdir=/lib64/security
--with-pam_smbpass
--with-piddir=/run/samba
--with-privatedir=/etc/samba
--with-quotas
--with-syslog
--enable-avahi
--with-systemd
--with-utmp
--with-winbind
--with-shared-modules=vfs_cacheprime,vfs_readahead,idmap_ad,idmap_adex,idmap_hash,idmap_ldap,idmap_rid,idmap_tdb2
--with-system-mitkrb5
--without-ad-dc
--bundled-libraries=!heimdal,!popt,!zlib,!ldb,!pyldb,!talloc,!pytalloc,!pytalloc-util,!tdb,!pytdb,!tevent,!pytevent
Comment 1 Stefan Metzmacher 2015-08-19 16:20:33 UTC
You need to install pyldb-util, see:

commit fcf4a891945b22dc6eccdc71fd441f1a879f556a
Author:     Jelmer Vernooij <jelmer@samba.org>
AuthorDate: Wed Jan 21 02:58:49 2015 +0100
Commit:     Andreas Schneider <asn@cryptomilk.org>
CommitDate: Tue Feb 17 15:41:11 2015 +0100

    Force rebuild of ldb if pyldb-util is not available.
    
    This is necessary since pyldb-util uses ldb_private.h, so we want to
    build against the same source ldb.
    
    Change-Id: I802974b9eef7deb102fea15b67ec5f87e8e353bd
    Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
    Reviewed-by: Andreas Schneider <asn@samba.org>
Comment 2 Lars Müller 2015-08-19 16:40:49 UTC
Created attachment 11353 [details]
config.log bzip2 compressed
Comment 3 Lars Müller 2015-08-19 16:41:32 UTC
Created attachment 11354 [details]
config.h
Comment 4 Lars Müller 2015-08-19 17:02:48 UTC
pyldb-devel-1.1.21 is installed which provides:

/usr/include/pyldb.h
/usr/lib64/libpyldb-util.so
/usr/lib64/pkgconfig/pyldb-util.pc

It is present on the system where I called configure manually too.
Comment 5 Lars Müller 2015-08-19 18:15:32 UTC
Metze is right with his comment #1  Commit
fcf4a891945b22dc6eccdc71fd441f1a879f556a causes this issue.

The system used for a manual configure had fitting pyldb, ldb, and devel
packages installed.  The build service ensures this anyhow.  And that's
also visible from the build log attached with the initial comment.
Comment 6 Jelmer Vernooij 2015-08-23 13:38:50 UTC
Can you reproduce this if you also specify !pyldb-util?
Comment 7 Andreas Schneider 2015-08-25 20:20:45 UTC
*** Bug 11468 has been marked as a duplicate of this bug. ***
Comment 8 Andreas Schneider 2015-08-25 20:27:20 UTC
If I specify

  --bundled-libraries=!ldb,!pyldb,!pyld-util

I get the following error:

ERROR: Use of system library pyldb-util depends on missing system library/libraries ['ldb']


configure did not search for system ldb before this error occurred.



krikkit:~ # rpm -ql pyldb
/usr/lib64/libpyldb-util.so.1
/usr/lib64/libpyldb-util.so.1.1.21
/usr/lib64/python2.7/site-packages/ldb.so
krikkit:~ # rpm -ql pyldb-devel
/usr/include/pyldb.h
/usr/lib64/libpyldb-util.so
/usr/lib64/pkgconfig/pyldb-util.pc
/usr/share/man/man3/PyLdbControlObject.3.gz
/usr/share/man/man3/PyLdbDnObject.3.gz
/usr/share/man/man3/PyLdbMessageElementObject.3.gz
/usr/share/man/man3/PyLdbMessageObject.3.gz
/usr/share/man/man3/PyLdbModuleObject.3.gz
/usr/share/man/man3/PyLdbObject.3.gz
/usr/share/man/man3/PyLdbResultObject.3.gz
/usr/share/man/man3/PyLdbTreeObject.3.gz
Comment 9 Jelmer Vernooij 2015-08-25 20:53:03 UTC
Have you tried not spelling pyldb-util as "pyld-util" ? :P
Comment 10 Lars Müller 2015-08-25 20:57:49 UTC
Adding 

  !pyldb-util

as additional --bundled-libraries argument results in:

[   67s] Checking for python headers                           :  using cache 
[   67s] ERROR: Use of system library pyldb-util depends on missing system library/libraries ['ldb']
[   67s] error: Bad exit status from /var/tmp/rpm-tmp.26nyUv (%build)
Comment 11 Lars Müller 2015-08-25 21:03:55 UTC
Comment #10 was the reply to comment #6.
Comment 12 Lars Müller 2015-08-25 21:12:00 UTC
Created attachment 11369 [details]
config.log with added !pyldb-util as requested with comment #6
Comment 13 Jelmer Vernooij 2015-08-25 21:52:41 UTC
Hmm, I think you might also have to specify !talloc,!tdb,!tevent and possibly other dependencies of ldb.

FWIW, in Debian we do build against the system ldb, pyldb and pyldb-util by specifying the following:

--bundled-libraries=NONE,pytevent,iniparser,roken,wind,hx509,asn1,heimbase,hcrypto,krb5,gssapi,heimntlm,hdb,kdc,com_err,compile_et,asn1_compile
Comment 14 Lars Müller 2015-08-25 22:20:11 UTC
!talloc,!tdb,!tevent and many more are excluded.

For the full list see the initial comment plus the later added !pyldb-util

Also trying --bundled-libraries=NONE results in the same:

[   68s] Checking for Python version >= 2.4.2                  : ok 2.7.8 
[   68s] Checking for python headers                           : using cache 
[   68s] ERROR: Use of system library pyldb-util depends on missing system library/libraries ['ldb']
Comment 15 Jelmer Vernooij 2015-08-26 01:51:58 UTC
I suspect this is a regression from Petr's changes (https://lists.samba.org/archive/samba-technical/2015-August/108972.html). We now check for system pyldb-util *before* checking for ldb itself. Since pyldb-util depends on ldb, this breaks.
Comment 16 Jelmer Vernooij 2015-08-26 01:52:15 UTC
See line 58 of lib/ldb/wscript in master
Comment 17 Stefan Metzmacher 2015-08-27 12:32:19 UTC
Created attachment 11371 [details]
Possible patches for master
Comment 18 Stefan Metzmacher 2015-08-27 12:38:56 UTC
(In reply to Jelmer Vernooij from comment #16)

Jelmer, the problem is really your commit fcf4a891945b22dc6eccdc71fd441f1a879f556a.

The onlyif list for the pyldb-util check contains 'ldb', but
the check for ldb is not yet done.

If it still works with --bundled-libraries=NONE,... it's pure luck.

Lars, Andreas, I think using --bundled-libraries=NONE,...
and listing explicit what will be bundled would be
a better way for your spec files.
Comment 19 Stefan Metzmacher 2015-08-31 20:34:08 UTC
Created attachment 11386 [details]
Patch for v4-3-test
Comment 20 Stefan Metzmacher 2015-09-01 07:31:11 UTC
Pushed to autobuild-v4-3-test.
Comment 21 Stefan Metzmacher 2015-09-01 13:22:00 UTC
Pushed to v4-3-test