Problem with dhcpctl.

phil lemelin phil.lemelin at gmail.com
Tue Apr 21 14:13:29 UTC 2009


Good morning list.

Following yesterday help from Jeremy, I advanced a little bit. I'm now
having some link error. Again, same thing under ubuntu or centos. Very sorry
if this is obvious but my C is really rusty.

My includes are the following :

#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdarg.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <isc-dhcp/result.h>
#include <isc-dhcp/dst.h>
#include <dhcpctl.h>

The actual error.

[phil at krum tmp]$ gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP
-MF"dhcpctl_test.d" -MT"dhcpctl_test.d" -o"dhcpctl_test.o" "dhcpctl_test.c"
dhcpctl_test.c: In function ‘main’:
dhcpctl_test.c:42: warning: implicit declaration of function ‘inet_pton’
dhcpctl_test.c:90: warning: implicit declaration of function ‘ctime’
dhcpctl_test.c:90: warning: format ‘%s’ expects type ‘char *’, but argument
3 has type ‘int’
dhcpctl_test.c:91: warning: control reaches end of non-void function

[phil at krum tmp]$ gcc -L/usr/lib64 -o"DhcpCtl"  dhcpctl_test.o   -ldhcpctl
-ldst -lomapi
/usr/lib64/libomapi.a(connection.o): In function
`omapi_connection_output_auth_length':
(.text+0x167): undefined reference to `dst_sig_size'
/usr/lib64/libomapi.a(connection.o): In function `make_dst_key':
(.text+0x335): undefined reference to `dst_buffer_to_key'
/usr/lib64/libomapi.a(connection.o): In function
`omapi_connection_sign_data':
(.text+0x3bd): undefined reference to `dst_sign_data'
/usr/lib64/libomapi.a(connection.o): In function
`omapi_connection_sign_data':
(.text+0x418): undefined reference to `dst_sig_size'
/usr/lib64/libomapi.a(connection.o): In function
`omapi_connection_sign_data':
(.text+0x463): undefined reference to `dst_sign_data'
/usr/lib64/libomapi.a(connection.o): In function
`omapi_connection_get_value':
(.text+0x5f8): undefined reference to `dst_sig_size'
/usr/lib64/libomapi.a(connection.o): In function
`omapi_connection_get_value':
(.text+0x6ca): undefined reference to `dst_sig_size'
/usr/lib64/libomapi.a(connection.o): In function
`omapi_connection_set_value':
(.text+0x7bc): undefined reference to `dst_free_key'
/usr/lib64/libomapi.a(connection.o): In function
`omapi_connection_set_value':
(.text+0x8a3): undefined reference to `dst_free_key'
/usr/lib64/libomapi.a(support.o): In function `omapi_init':
(.text+0xa16): undefined reference to `dst_init'
collect2: ld returned 1 exit status

[phil at krum tmp]$ rpm -qf  /usr/lib64/libdhcpctl.a
dhcp-devel-3.0.5-18.el5
[phil at krum tmp]$ rpm -qf  /usr/lib64/libdst.a
dhcp-devel-3.0.5-18.el5
[phil at krum tmp]$ rpm -qf  /usr/lib64/libomapi.a
dhcp-devel-3.0.5-18.el5

[phil at krum tmp]$ rpm -qf /usr/include/dhcpctl.h
dhcp-devel-3.0.5-18.el5
[phil at krum tmp]$ rpm -qf /usr/include/isc-dhcp/dst.h
dhcp-devel-3.0.5-18.el5
[phil at krum tmp]$ rpm -qf /usr/include/isc-dhcp/result.h
dhcp-devel-3.0.5-18.el5


Best regards.

-- 
Philippe-Alexandre Lemelin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20090421/3c1579ee/attachment.html>


More information about the dhcp-users mailing list