Bug 11374 - Undefined reference to ctdb symbols while building on Debian
Undefined reference to ctdb symbols while building on Debian
Status: NEW
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build
4.2.2
All Linux
: P5 normal
: ---
Assigned To: Björn Jacke
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-01 22:50 UTC by Michael Evans
Modified: 2015-07-02 09:26 UTC (History)
1 user (show)

See Also:


Attachments
Modified version of debian's samba4-4.1.17 'debian' folder for 4.2.2 (212.97 KB, application/x-xz)
2015-07-01 22:50 UTC, Michael Evans
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Evans 2015-07-01 22:50:22 UTC
Created attachment 11222 [details]
Modified version of debian's samba4-4.1.17 'debian' folder for 4.2.2

I've started having replication issues after trying to setup an OpenChange+SOGo DC.  Since the changelogs indicate that Samba 4.2 has improvements in that area, I was hoping to compile 4.2.x so that I could see if this solved the problem, or at least gave more useful data.

My current build environment is a Debian testing VM, which has the Debian Samba 4.1.17 build-dep installed, as well as the following .deb files:

25014 May 25 12:43 ../req-deb/libnss-wrapper_1.0.3-2_amd64.deb
28784 Jun  5 05:03 ../req-deb/libsocket-wrapper_1.1.3-2_amd64.deb
13780 Nov 22  2014 ../req-deb/libuid-wrapper_1.0.2-2_amd64.deb

I've made some modifications to the default debian build scripts in attempts to iterate through possible changes that might allow the build to succeed; however even force-enabling cluster support appears to leave the source3 component unable to link against the ctdb libraries.


Including some of the unused cruft, I'm attaching the current 'debian' build/rules directory.

cd .. ; rm -r samba-4.2.2+dfsg ; tar axf samba_4.2.2+dfsg.orig.tar.gz ; mv samba-4.2.2 samba-4.2.2+dfsg ; cp -a debian samba-4.2.2+dfsg/ ; cd samba-4.2.2+dfsg ; dpkg-buildpackage -us -uc -nc -d


[2965/3345] Linking default/source3/nmbd/nmbd
21:45:44 runner /usr/bin/gcc default/source3/profile/profile_dummy_88.o default/source3/nmbd/asyncdns_144.o default/source3/nmbd/nmbd_144.o default/source3/nmbd/nmbd_become_dmb_144.o default/source3/nmbd/nmbd_become_lmb_144.o default/sou
rce3/nmbd/nmbd_browserdb_144.o default/source3/nmbd/nmbd_browsesync_144.o default/source3/nmbd/nmbd_elections_144.o default/source3/nmbd/nmbd_incomingdgrams_144.o default/source3/nmbd/nmbd_incomingrequests_144.o default/source3/nmbd/nmbd
_lmhosts_144.o default/source3/nmbd/nmbd_logonnames_144.o default/source3/nmbd/nmbd_mynames_144.o default/source3/nmbd/nmbd_namelistdb_144.o default/source3/nmbd/nmbd_namequery_144.o default/source3/nmbd/nmbd_nameregister_144.o default/s
ource3/nmbd/nmbd_namerelease_144.o default/source3/nmbd/nmbd_nodestatus_144.o default/source3/nmbd/nmbd_packets_144.o default/source3/nmbd/nmbd_processlogon_144.o default/source3/nmbd/nmbd_responserecordsdb_144.o default/source3/nmbd/nmb
d_sendannounce_144.o default/source3/nmbd/nmbd_serverlistdb_144.o default/source3/nmbd/nmbd_subnetdb_144.o default/source3/nmbd/nmbd_winsproxy_144.o default/source3/nmbd/nmbd_winsserver_144.o default/source3/nmbd/nmbd_workgroupdb_144.o d
efault/source3/nmbd/nmbd_synclists_144.o -o ~/samba/samba-4.2.2+dfsg/bin/default/source3/nmbd/nmbd -pie -Wl,-z,relro,-z,now -lpthread -Wl,-no-undefined -Wl,--export-dynamic -Wl,--as-needed -fstack-protector -Ldefault/source4/lib/sock
et -Ldefault/libcli/nbt -Ldefault/auth -Ldefault/libds/common -Ldefault/source4/libcli/ldap -Ldefault/lib/ldb-samba -Ldefault/lib/param -Ldefault/source4/auth/kerberos -Ldefault/source4/dsdb -Ldefault/nsswitch -Ldefault/source4/lib/event
s -Ldefault/libcli/registry -Ldefault/lib/tdb_wrap -Ldefault/auth/gensec -Ldefault/lib/krb5_wrap -Ldefault/libcli/smb -Ldefault/libcli/auth -Ldefault/libcli/cldap -Ldefault/auth/credentials -Ldefault/libcli/ldap -Ldefault/nsswitch/libwbc
lient -Ldefault/lib/addns -Ldefault/librpc -Ldefault/lib -Ldefault/libcli/util -Ldefault/libcli/security -Ldefault/lib/dbwrap -Ldefault/lib/socket -Ldefault/lib/util -Ldefault/source3 -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/heimdal
-Wl,-Bdynamic -lpopt-samba3-samba4 -lsamba-util -linterfaces-samba4 -ltevent-util -llibsmb-samba4 -ldbwrap-samba4 -lsamba-security-samba4 -lerrors-samba4 -lsmbconf -lsamba-cluster-support-samba4 -lsamba3-util-samba4 -lutil-tdb-samba4 -ls
ocket-blocking-samba4 -lsamba-sockets-samba4 -lndr -lutil-cmdline-samba4 -lsamba-debug-samba4 -lutil-setid-samba4 -laddns-samba4 -lwbclient -lcli-ldap-common-samba4 -lsamba-credentials -lndr-samba-samba4 -lcli-cldap-samba4 -lcliauth-samb
a4 -lcli-smb-common-samba4 -lkrb5samba-samba4 -lgse-samba4 -lgensec -lutil-ntdb-samba4 -ltdb-wrap-samba4 -lsmbregistry-samba4 -lCHARSET3-samba4 -lutil-reg-samba4 -lndr-nbt -levents-samba4 -lsecrets3-samba4 -lwinbind-client-samba4 -lasn1u
til-samba4 -lsamdb-common-samba4 -lauthkrb5-samba4 -lsamba-hostconfig -lldbsamba-samba4 -lndr-krb5pac -lndr-standard -lcli-ldap-samba4 -lsmb-transport-samba4 -lsamba-modules-samba4 -lsamdb -lsmbd-shim-samba4 -lflag-mapping-samba4 -lauth-
sam-reply-samba4 -lserver-role-samba4 -lcli-nbt-samba4 -lnetif-samba4 -lresolv -lcrypt -lattr -lnsl -ldl -lrt -lbsd -lgssapi -lasn1 -lcom_err -lkrb5 -lroken -lz -lgnutls -lldb -ltalloc -lntdb -llber -lldap -lcups -lcap -ltdb -ltevent -lp
opt -Wl,-z,relro -Wl,--as-needed
[2966/3345] Linking default/source3/libmsrpc3-samba4.so
21:45:44 runner /usr/bin/gcc default/libcli/auth/netlogon_creds_cli_10.o default/source3/rpc_client/cli_pipe_11.o default/source3/rpc_client/rpc_transport_np_11.o default/source3/rpc_client/rpc_transport_sock_11.o default/source3/rpc_cli
ent/rpc_transport_tstream_11.o default/source3/librpc/rpc/dcerpc_helpers_11.o -o ~/samba/samba-4.2.2+dfsg/bin/default/source3/libmsrpc3-samba4.so -lpthread -Wl,-no-undefined -Wl,--export-dynamic -Wl,--as-needed -fstack-protector -sha
red -Wl,--version-script=~/samba/samba-4.2.2+dfsg/bin/default/source3/msrpc3.vscript -Ldefault/source4/lib/socket -Ldefault/libcli/nbt -Ldefault/libcli/registry -Ldefault/auth -Ldefault/libds/common -Ldefault/source4/libcli/ldap -Lde
fault/nsswitch -Ldefault/lib/socket -Ldefault/source4/lib/events -Ldefault/lib/ldb-samba -Ldefault/lib/tdb_wrap -Ldefault/source4/auth/kerberos -Ldefault/source4/dsdb -Ldefault/auth/gensec -Ldefault/lib/krb5_wrap -Ldefault/libcli/smb -Ld
efault/libcli/cldap -Ldefault/libcli/ldap -Ldefault/nsswitch/libwbclient -Ldefault/lib/addns -Ldefault/libcli/util -Ldefault/lib -Ldefault/libcli/security -Ldefault/source4/librpc -Ldefault/libcli/auth -Ldefault/lib/dbwrap -Ldefault/lib/
param -Ldefault/librpc -Ldefault/auth/credentials -Ldefault/source3 -Ldefault/lib/util -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/heimdal -Wl,-Bdynamic -lsamba-util -ltevent-util -llibsmb-samba4 -lsamba-credentials -lndr-samba-samba4 -
lsamba-hostconfig -ldbwrap-samba4 -lndr-nbt -lcliauth-samba4 -ldcerpc-binding -lndr-samba4 -lutil-tdb-samba4 -lgse-samba4 -lndr-standard -lsamba-security-samba4 -ldcerpc-samba-samba4 -lsamba-sockets-samba4 -lndr -lsamba-debug-samba4 -lut
il-setid-samba4 -lsocket-blocking-samba4 -lerrors-samba4 -laddns-samba4 -lwbclient -lcli-ldap-common-samba4 -lcli-cldap-samba4 -lcli-smb-common-samba4 -lkrb5samba-samba4 -lutil-cmdline-samba4 -lgensec -lsamdb-common-samba4 -lauthkrb5-sam
ba4 -ltdb-wrap-samba4 -lldbsamba-samba4 -levents-samba4 -lndr-krb5pac -lasn1util-samba4 -lserver-role-samba4 -lutil-ntdb-samba4 -linterfaces-samba4 -lsmbconf -lsamba-cluster-support-samba4 -lsamba3-util-samba4 -lsecrets3-samba4 -lwinbind -client-samba4 -lcli-ldap-samba4 -lsmb-transport-samba4 -lsamba-modules-samba4 -lsamdb -lflag-mapping-samba4 -lauth-sam-reply-samba4 -lsmbregistry-samba4 -lCHARSET3-samba4 -lutil-reg-samba4 -lcli-nbt-samba4 -lnetif-samba4 -lsmbd-shim-samba4 -lresolv -lasn1 -lgssapi -lcom_err -lldb -ltalloc -lkrb5 -lgnutls -lz -lroken -lntdb -lcups -lldap -llber -lcap -lbsd -lrt -ldl -lnsl -lattr -lcrypt -ltdb -ltevent -Wl,-z,relro -Wl,--as-needed
default/source3/libsmbregistry-samba4.so: undefined reference to `state_path'
default/source3/libsamba-cluster-support-samba4.so: undefined reference to `lp__ctdbd_socket'
default/source3/libsamba-cluster-support-samba4.so: undefined reference to `messaging_tevent_context'
default/source3/libsamba-cluster-support-samba4.so: undefined reference to `g_lock_lock'
default/source3/libsamba-cluster-support-samba4.so: undefined reference to `set_my_vnn'
default/source3/libsamba-cluster-support-samba4.so: undefined reference to `g_lock_unlock'
default/source3/libsamba-cluster-support-samba4.so: undefined reference to `messaging_dispatch_rec'
default/source3/libsmbregistry-samba4.so: undefined reference to `lp_unix_charset'
default/source3/libsamba-cluster-support-samba4.so: undefined reference to `messaging_init'
default/source3/libsamba-cluster-support-samba4.so: undefined reference to `g_lock_ctx_init'
default/source3/libsamba-cluster-support-samba4.so: undefined reference to `lp_clustering'
default/source3/libsmbregistry-samba4.so: undefined reference to `lp_use_mmap'
default/source3/libsamba-cluster-support-samba4.so: undefined reference to `ndr_print_messaging_rec'
default/source3/libsamba-cluster-support-samba4.so: undefined reference to `messaging_server_id'
default/source3/libsamba-cluster-support-samba4.so: undefined reference to `poll_one_fd'
default/source3/libsamba-cluster-support-samba4.so: undefined reference to `lp_parm_int'
default/source3/libsamba-cluster-support-samba4.so: undefined reference to `ndr_push_messaging_rec'
default/source3/libsamba-cluster-support-samba4.so: undefined reference to `read_data'
default/source3/libsamba-cluster-support-samba4.so: undefined reference to `messaging_send'
default/source3/libsamba-cluster-support-samba4.so: undefined reference to `ndr_pull_messaging_rec'
default/source3/libsamba-cluster-support-samba4.so: undefined reference to `get_my_vnn'
default/source3/libsamba-cluster-support-samba4.so: undefined reference to `lp_ctdb_locktime_warn_threshold'
default/source3/libsamba-cluster-support-samba4.so: undefined reference to `lp_ctdb_timeout'
default/source3/libsmbregistry-samba4.so: undefined reference to `lp_dos_charset'
default/source3/libsamba-cluster-support-samba4.so: undefined reference to `iov_buf'
default/source3/libsmbregistry-samba4.so: undefined reference to `db_open'
default/source3/libsamba-cluster-support-samba4.so: undefined reference to `loadparm_s3_helpers'
default/source3/libsamba-cluster-support-samba4.so: undefined reference to `write_data_iov'
collect2: error: ld returned 1 exit status
Waf: Leaving directory `~/samba/samba-4.2.2+dfsg/bin'
Build failed:  -> task failed (err #1):
        {task: cc_link client_1.o,popt_common_5.o,smbreadline_1.o,popt_credentials_6.o,clilsa_2.o -> smbclient4}
debian/rules:90: recipe for target 'override_dh_auto_build' failed
make[1]: *** [override_dh_auto_build] Error 1
make[1]: Leaving directory '~/samba/samba-4.2.2+dfsg'
debian/rules:69: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2




Please note that I have made changes to the debian/rules file and the debian/patchs/series file, as well as re-worked a few patches.  Some of that work should probably actually be moved in to the design of Samba, but I was trying to take the path of least resistance to get a usable result.