Unable to build ctdb with PMDA

Martin Schwenke martin at meltin.net
Thu Jun 25 00:49:02 MDT 2015


On Wed, 24 Jun 2015 22:39:40 +1000, Martin Schwenke <martin at meltin.net>
wrote:

> On Wed, 24 Jun 2015 14:00:10 +0200, Mathieu Parent
> <math.parent at gmail.com> wrote:
> 
> > In the 4.2 and master branches, I'm not able to build ctdb with PMDA.
> > It seems to come from the deletion of libctdb (ctdb_private.h symbols
> > are no longer exported).
> > 
> > See below build error
> > mathieu at ultrathieu:~/src/git.samba.org/samba/ctdb$ ./configure --enable-pmda
> > [...]
> > mathieu at ultrathieu:~/src/git.samba.org/samba/ctdb$ LANG=C make
> > [...]
> > [200/205] Linking default/ctdb/pmdactdb
> > default/ctdb/utils/pmda/pmda_ctdb_35.o: In function `pmda_ctdb_daemon_connect':
> > pmda_ctdb.c:(.text+0x246): undefined reference to `set_nonblocking'
> > pmda_ctdb.c:(.text+0x25a): undefined reference to `set_close_on_exec'
> > default/ctdb/common/system_linux_8.o: In function `ctdb_sys_send_tcp':
> > system_linux.c:(.text+0x12fc): undefined reference to `set_nonblocking'
> > system_linux.c:(.text+0x1309): undefined reference to `set_close_on_exec'
> > default/ctdb/common/system_linux_8.o: In function
> > `ctdb_sys_open_capture_socket':
> > system_linux.c:(.text+0x1779): undefined reference to `set_nonblocking'
> > system_linux.c:(.text+0x1783): undefined reference to `set_close_on_exec'
> > default/ctdb/client/ctdb_client_9.o: In function `ctdb_socket_connect':
> > ctdb_client.c:(.text+0xb9f): undefined reference to `set_nonblocking'
> > ctdb_client.c:(.text+0xbb3): undefined reference to `set_close_on_exec'
> > default/ctdb/client/ctdb_client_9.o: In function `switch_from_server_to_client':
> > ctdb_client.c:(.text+0xc1a0): undefined reference to `debug_extra'
> > default/ctdb/common/ctdb_io_6.o: In function `queue_io_read':
> > ctdb_io.c:(.text+0x4bd): undefined reference to `sys_read'
> > default/ctdb/common/ctdb_util_6.o: In function `ctdb_parse_address':
> > ctdb_util.c:(.text+0x7e4): undefined reference to `parse_ip'
> > default/ctdb/common/cmdline_6.o: In function `ctdb_cmdline_init':
> > cmdline.c:(.text+0x112): undefined reference to `parse_debug'
> > default/ctdb/common/cmdline_6.o: In function `ctdb_cmdline_client':
> > cmdline.c:(.text+0x28a): undefined reference to `parse_debug'
> > default/ctdb/common/ctdb_fork_6.o: In function `ctdb_set_child_info':
> > ctdb_fork.c:(.text+0xe3): undefined reference to `debug_extra'
> > default/ctdb/common/ctdb_fork_6.o: In function `ctdb_fork':
> > ctdb_fork.c:(.text+0x243): undefined reference to `reset_scheduler'
> > collect2: error: ld returned 1 exit status
> > Waf: Leaving directory `/home/mathieu/src/git.samba.org/samba/ctdb/bin'
> > Build failed:  -> task failed (err #1):
> >     {task: cc_link
> > samba-util.empty_4.o,pmda_ctdb_35.o,system_linux_8.o,ctdb_client_9.o,ctdb_io_6.o,ctdb_util_6.o,ctdb_ltdb_6.o,ctdb_message_6.o,cmdline_6.o,rb_tree_6.o,system_common_6.o,ctdb_fork_6.o,xfile_12.o,data_blob_12.o,util_file_12.o,time_12.o,signal_12.o,util_12.o,idtree_12.o,fault_12.o,substitute_12.o
> > -> pmdactdb}
> > Makefile:6: recipe for target 'all' failed
> > make: *** [all] Error 1
> 
> Sorry about that.  I thought we were still building every night with
> PMDA as part of our testing.  Clearly not...  :-(
> 
> I think the fix is as simple as this:
> 
> diff --git a/ctdb/wscript b/ctdb/wscript
> index b5c6087..26577cf 100755
> --- a/ctdb/wscript
> +++ b/ctdb/wscript
> @@ -422,7 +422,7 @@ def build(bld):
>          bld.SAMBA_BINARY('pmdactdb',
>                           source='utils/pmda/pmda_ctdb.c',
>                           includes='include include/internal',
> -                         deps='''ctdb-client ctdb-common ctdb-system
> +                         deps='''ctdb-common-util ctdb-client ctdb-common ctdb-system
>                                   pcp_pmda pcp''',
>                           install_path='${CTDB_PMDADIR}')
>          bld.INSTALL_FILES('${CTDB_PMDADIR}', 'utils/pmda/Install',
> 
> 
> This seems to work.  I can play around some more tomorrow to confirm...

This seems to work.  Amitay is pushing a trivial variation of this soon.

We're also adding a patch to make it easier to build RPMs with PMDA
compiled in.  While this doesn't help you, it does mean that we will
once again soon be testing the CTDB+PMDA build every night.  ;-)

peace & happiness,
martin


More information about the samba-technical mailing list