Package: dhcp3-dev
Version: 3.0.1-2
Severity: normal

Hi,

I'am trying to build the dhcpctl sample from the omapi (3) man page.

/*** C Code ***/
#include <stdarg.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <stdio.h>
#include <netinet/in.h>

#include <dhcpctl.h>
#include <isc-dhcp/dst.h>
#include <isc-dhcp/result.h>

int main (int argc, char **argv) {

        dhcpctl_data_string ipaddrstring = NULL;
        dhcpctl_data_string value = NULL;

        dhcpctl_handle connection = NULL;
        dhcpctl_handle lease = NULL;
        isc_result_t waitstatus;
        struct in_addr convaddr;

        dhcpctl_initialize ();
...
/*** end of C code ***/

It's the code from the omapi (3) man page.
But this code does not build because libdst is missing.

$ gcc -o test  test.o  -L /usr/lib -ldhcpctl -lomapi
/usr/lib/libomapi.a(connection.o)(.text+0x18d7): In function `make_dst_key':
: undefined reference to `dst_buffer_to_key'
/usr/lib/libomapi.a(connection.o)(.text+0x1998): In function
`omapi_connection_sign_data':
: undefined reference to `dst_sig_size'
/usr/lib/libomapi.a(connection.o)(.text+0x1a38): In function
`omapi_connection_sign_data':
: undefined reference to `dst_sign_data'
/usr/lib/libomapi.a(connection.o)(.text+0x1b1f): In function
`omapi_connection_output_auth_length':
: undefined reference to `dst_sig_size'
/usr/lib/libomapi.a(connection.o)(.text+0x1be4): In function
`omapi_connection_set_value':
: undefined reference to `dst_free_key'
/usr/lib/libomapi.a(connection.o)(.text+0x1cba): In function
`omapi_connection_set_value':
: undefined reference to `dst_free_key'
/usr/lib/libomapi.a(connection.o)(.text+0x1e8b): In function
`omapi_connection_get_value':
: undefined reference to `dst_sig_size'
/usr/lib/libomapi.a(connection.o)(.text+0x1fc9): In function
`omapi_connection_get_value':
: undefined reference to `dst_sig_size'
/usr/lib/libomapi.a(support.o)(.text+0x7): In function `omapi_init':
: undefined reference to `dst_init'
collect2: ld returned 1 exit status

All the dst_* functions are in lib dst.

If I copy libdst.a from dhcp3-3.0.1/work.linux-2.2/dst to /usr/lib.

The sample will work :

$ gcc -o test  test.o  -L /usr/lib -ldhcpctl -lomapi -ldst
$  ./test

I suggest to add libdst.a in the libdst.a in the dhcp3-dev package.

Best Regards,

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (66, 'testing'), (33, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.8-2-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages dhcp3-dev depends on:
ii  libc6-dev                   2.3.2.ds1-22 GNU C Library: Development
Librari

-- no debconf information

-- 
FANI Project
http://www.fani-project.org


Reply via email to