Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 891187

Summary: kde-apps/kmail-22.08.3-r1 with net-fs/samba[ldap] libsmbconf.so.0: undefined reference to `ber_set_option@OPENLDAP_2.200'
Product: Gentoo Linux Reporter: Kosmas <kosmas>
Component: Current packagesAssignee: Gentoo's SAMBA Team <samba>
Status: CONFIRMED ---    
Severity: major CC: bkohler
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Emerge Info and Build Log
libsmbconf.so.0 objdump
Object Dump of libsmbconf.so.0 with ldap

Description Kosmas 2023-01-17 10:07:41 UTC
Created attachment 848725 [details]
Emerge Info and Build Log

Latest update kde-apps/kmail-22.08.3-r1 fails to emerge with the following errors:
/usr/lib/gcc/x86_64-pc-linux-gnu/11/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libsmbconf.so.0: undefined reference to `ber_set_option@OPENLDAP_2.200'
/usr/lib/gcc/x86_64-pc-linux-gnu/11/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/samba/libgse-samba4.so: undefined reference to `ldap_err2string@OPENLDAP_2.200'
/usr/lib/gcc/x86_64-pc-linux-gnu/11/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libsmbconf.so.0: undefined reference to `ldap_set_option@OPENLDAP_2.200'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
 * ERROR: kde-apps/kmail-22.08.3-r1::gentoo failed (compile phase):
 *   ninja -v -j1 -l0 failed

All relevant libraries have beed recompiled prior to emerging kmail (eg. openldap, qt libraries, akonadi etc).
Comment 1 Andreas Sturmlechner gentoo-dev 2023-01-17 10:09:19 UTC
But did you rebuild net-fs/samba?
Comment 2 Kosmas 2023-01-17 15:53:17 UTC
Yes, I also rebuild samba and all the libraries that kmail depends on.
Comment 3 Andreas Sturmlechner gentoo-dev 2023-01-17 16:28:15 UTC
The error is coming from samba, anyway:

> /usr/lib/gcc/x86_64-pc-linux-gnu/11/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libsmbconf.so.0: undefined reference to `ber_set_option@OPENLDAP_2.200'
> /usr/lib/gcc/x86_64-pc-linux-gnu/11/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/samba/libgse-samba4.so: undefined reference to `ldap_err2string@OPENLDAP_2.200'
> /usr/lib/gcc/x86_64-pc-linux-gnu/11/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libsmbconf.so.0: undefined reference to `ldap_set_option@OPENLDAP_2.200'

It is unrelated to kmail, it is just that the link interface of one of its deps is broken.
Comment 4 Kosmas 2023-01-17 16:30:46 UTC
I thought of that, and I completely removed samba (unmerge) and re-emerged it, but unfortunately the same things happen.

I will emerge samba without ldap for now, and I will report back.
Comment 5 Kosmas 2023-01-17 16:40:16 UTC
I rebuilt samba without ldap and ads and now kmail compiles correctly. I will try to re-enable openldap and report back.
Comment 6 Kosmas 2023-01-17 16:54:01 UTC
Confirmed!

Recompiling samba with ldap (and ads) flags, will make kmail fail.
I just recompiled it and kmail fails compiling again.

Please let me know if you need any more information.

Failing samba flags:
 + + abi_x86_32                      : 32-bit (x86) libraries
 + + acl                             : Add support for Access Control Lists
 - - addc                            : Enable Active Directory Domain Controller support
 + + ads                             : Enable Active Directory support
 - - ceph                            : Enable support for Ceph distributed filesystem via sys-cluster/ceph
 + + client                          : Enables the client part
 - - cluster                         : Enable support for clustering
 + + cpu_flags_x86_aes               : Enable support for Intel's AES instruction set (AES-NI)
 + + cups                            : Add support for CUPS (Common Unix Printing System)
 - - debug                           : Enable extra debug codepaths, like asserts and extra output. If you
                                       want to get meaningful backtraces see
                                       https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
 + + glusterfs                       : Enable support for Glusterfs filesystem via sys-cluster/glusterfs
 - - gpg                             : Use app-crypt/gpgme for AD DC
 - - iprint                          : Enabling iPrint technology by Novell
 + + json                            : Enable json audit support through dev-libs/jansson
 + + ldap                            : Add LDAP support (Lightweight Directory Access Protocol)
 - - llvm-libunwind                  : Use sys-libs/llvm-libunwind instead of sys-libs/libunwind
 + + pam                             : Add support for PAM (Pluggable Authentication Modules) - DANGEROUS to
                                       arbitrarily flip
 - - profiling-data                  : Enables support for collecting profiling data
 + + python                          : Add optional support/bindings for the Python language
 + + python_single_target_python3_10 : Build for Python 3.10 only
 - - python_single_target_python3_9  : Build for Python 3.9 only
 - - quota                           : Enables support for user quotas
 + + regedit                         : Enable support for regedit command-line tool
 - - snapper                         : Enable vfs_snapper module (requires sys-apps/dbus)
 - - spotlight                       : Enable support for spotlight backend
 + + syslog                          : Enable support for syslog
 + + system-mitkrb5                  : Use app-crypt/mit-krb5 instead of app-crypt/heimdal.
 + + systemd                         : Enable use of systemd-specific libraries and features like socket
                                       activation or session tracking
 - - unwind                          : Enable libunwind usage for backtraces
 + + winbind                         : Enables support for the winbind auth daemon
 - - zeroconf                        : Support for DNS Service Discovery (DNS-SD)

Working Samba flags:
 + + abi_x86_32                      : 32-bit (x86) libraries
 + + acl                             : Add support for Access Control Lists
 - - addc                            : Enable Active Directory Domain Controller support
 - - ads                             : Enable Active Directory support
 - - ceph                            : Enable support for Ceph distributed filesystem via sys-cluster/ceph
 + + client                          : Enables the client part
 - - cluster                         : Enable support for clustering
 + + cpu_flags_x86_aes               : Enable support for Intel's AES instruction set (AES-NI)
 + + cups                            : Add support for CUPS (Common Unix Printing System)
 - - debug                           : Enable extra debug codepaths, like asserts and extra output. If you
                                       want to get meaningful backtraces see
                                       https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
 + + glusterfs                       : Enable support for Glusterfs filesystem via sys-cluster/glusterfs
 - - gpg                             : Use app-crypt/gpgme for AD DC
 - - iprint                          : Enabling iPrint technology by Novell
 + + json                            : Enable json audit support through dev-libs/jansson
 - - ldap                            : Add LDAP support (Lightweight Directory Access Protocol)
 - - llvm-libunwind                  : Use sys-libs/llvm-libunwind instead of sys-libs/libunwind
 + + pam                             : Add support for PAM (Pluggable Authentication Modules) - DANGEROUS to
                                       arbitrarily flip
 - - profiling-data                  : Enables support for collecting profiling data
 + + python                          : Add optional support/bindings for the Python language
 + + python_single_target_python3_10 : Build for Python 3.10 only
 - - python_single_target_python3_9  : Build for Python 3.9 only
 - - quota                           : Enables support for user quotas
 + + regedit                         : Enable support for regedit command-line tool
 - - snapper                         : Enable vfs_snapper module (requires sys-apps/dbus)
 - - spotlight                       : Enable support for spotlight backend
 + + syslog                          : Enable support for syslog
 + + system-mitkrb5                  : Use app-crypt/mit-krb5 instead of app-crypt/heimdal.
 + + systemd                         : Enable use of systemd-specific libraries and features like socket
                                       activation or session tracking
 - - unwind                          : Enable libunwind usage for backtraces
 + + winbind                         : Enables support for the winbind auth daemon
 - - zeroconf                        : Support for DNS Service Discovery (DNS-SD)
Comment 7 Ben Kohler gentoo-dev 2023-03-10 14:15:49 UTC
Can you attach the output of "objdump -p /usr/lib64/libsmbconf.so.0" ?

Thanks
Comment 8 Kosmas 2023-03-11 08:34:45 UTC
Created attachment 857257 [details]
libsmbconf.so.0 objdump

libsmbconf.so.0 objdump
Comment 9 Kosmas 2023-03-11 08:35:28 UTC
Hi Ben,

Unfortunately I had to rebuild without LDAP, in order to continue working, so I don't know if it will help.

Kosmas.
Comment 10 Ben Kohler gentoo-dev 2023-03-11 13:33:48 UTC
Can you build it with LDAP, but not fully install it, and run the objdump command on the (presumably) misbuilt libsmbconf.so.0.0.1?

If you have gentoolkit (for equery):

USE="ldap" ebuild $(equery w samba) clean install

This will stage the installation at /var/tmp/portage/net-fs/samba-*/image/ but not install to the live system.  I think you should see the library at /var/tmp/portage/net-fs/samba-*/image/usr/lib64/libsmbconf.so.0.0.1
Comment 11 Kosmas 2023-03-12 07:10:43 UTC
Created attachment 857355 [details]
Object Dump of libsmbconf.so.0 with ldap