trouble compiling 4.1.0p1
Luka
dhcp at ml.evriala.net
Fri Aug 7 11:10:01 UTC 2009
Hi,
I've encountered the same problem. From DHCP 4.1.1b1 changelog:
Update the code to deal with GCC 4.3. This included two sets of changes.
The first is to the configuration files to include the use of
AC_USE_SYSTME_EXTENSIONS. The second is to deal with return values that
were being ignored.
Chris Buxton wrote:
> I'm having a devil of a time compiling DHCP 4.1.0p1 on Ubuntu Linux.
> It's a stock install of Ubuntu 9.04 (32-bit). The toolchain is the
> standard for this distro version, based around gcc-4.3.3.
>
> Here's what I'm executing:
>
> ./configure \
> --prefix=/usr \
> --sysconfdir=/etc \
> --localstatedir=/var \
> --with-srv-lease-file=/var/dhcp4/dhcpd.leases \
> --with-srv6-lease-file=/var/dhcp4/dhcpd6.leases \
> --with-cli-lease-file=/var/dhcp4/dhclient.leases \
> --with-cli6-lease-file=/var/dhcp4/dhclient6.leases
> make
>
> As written there, I get a fatal error from common/parse.c because the
> return value of 'write' is ignored. The output is:
>
> if gcc -DHAVE_CONFIG_H -I. -I. -I../includes -I..
> -DLOCALSTATEDIR='"/var"' -g -O2 -Wall -Werror -fno-strict-aliasing
> -MT parse.o -MD -MP -MF ".deps/parse.Tpo" -c -o parse.o parse.c; \
> then mv -f ".deps/parse.Tpo" ".deps/parse.Po"; else rm -f
> ".deps/parse.Tpo"; exit 1; fi
> cc1: warnings being treated as errors
> parse.c: In function ‘parse_warn’:
> parse.c:5677: error: ignoring return value of ‘write’, declared with
> attribute warn_unused_result
> parse.c:5678: error: ignoring return value of ‘write’, declared with
> attribute warn_unused_result
> parse.c:5679: error: ignoring return value of ‘write’, declared with
> attribute warn_unused_result
> parse.c:5681: error: ignoring return value of ‘write’, declared with
> attribute warn_unused_result
> parse.c:5683: error: ignoring return value of ‘write’, declared with
> attribute warn_unused_result
> parse.c:5684: error: ignoring return value of ‘write’, declared with
> attribute warn_unused_result
> make[2]: Leaving directory `/home/sysadmin/dhcp/dhcp-4.1.0p1/common'
> make[1]: Leaving directory `/home/sysadmin/dhcp/dhcp-4.1.0p1/common'
> make[2]: *** [parse.o] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all-recursive] Error 1
>
> So I added the following to the beginning:
>
> sed -i '/STD_CWARNINGS=/s/-Werror//' configure
>
> Now warnings are no longer treated as errors. This gets me to more
> problems. First, those same warnings as before plus some new ones:
>
> if gcc -DHAVE_CONFIG_H -I. -I. -I../includes -I..
> -DLOCALSTATEDIR='"/var"' -g -O2 -Wall -fno-strict-aliasing -MT
> parse.o -MD -MP -MF ".deps/parse.Tpo" -c -o parse.o parse.c; \
> then mv -f ".deps/parse.Tpo" ".deps/parse.Po"; else rm -f
> ".deps/parse.Tpo"; exit 1; fi
> parse.c: In function ‘parse_warn’:
> parse.c:5677: warning: ignoring return value of ‘write’, declared with
> attribute warn_unused_result
> parse.c:5678: warning: ignoring return value of ‘write’, declared with
> attribute warn_unused_result
> parse.c:5679: warning: ignoring return value of ‘write’, declared with
> attribute warn_unused_result
> parse.c:5681: warning: ignoring return value of ‘write’, declared with
> attribute warn_unused_result
> parse.c:5683: warning: ignoring return value of ‘write’, declared with
> attribute warn_unused_result
> parse.c:5684: warning: ignoring return value of ‘write’, declared with
> attribute warn_unused_result
> if gcc -DHAVE_CONFIG_H -I. -I. -I../includes -I..
> -DLOCALSTATEDIR='"/var"' -g -O2 -Wall -fno-strict-aliasing -MT
> print.o -MD -MP -MF ".deps/print.Tpo" -c -o print.o print.c; \
> then mv -f ".deps/print.Tpo" ".deps/print.Po"; else rm -f
> ".deps/print.Tpo"; exit 1; fi
> print.c: In function ‘dump_raw’:
> print.c:311: warning: format not a string literal and no format arguments
> print.c:335: warning: format not a string literal and no format arguments
>
> Then the errors:
>
> if gcc -DHAVE_CONFIG_H -I. -I. -I../includes -I..
> -DLOCALSTATEDIR='"/var"' -g -O2 -Wall -fno-strict-aliasing -MT
> socket.o -MD -MP -MF ".deps/socket.Tpo" -c -o socket.o socket.c; \
> then mv -f ".deps/socket.Tpo" ".deps/socket.Po"; else rm -f
> ".deps/socket.Tpo"; exit 1; fi
> socket.c: In function ‘send_packet6’:
> socket.c:591: error: invalid application of ‘sizeof’ to incomplete type
> ‘struct in6_pktinfo’
> socket.c:628: error: dereferencing pointer to incomplete type
> socket.c:630: error: dereferencing pointer to incomplete type
> socket.c:631: error: dereferencing pointer to incomplete type
> socket.c: In function ‘receive_packet6’:
> socket.c:692: error: invalid application of ‘sizeof’ to incomplete type
> ‘struct in6_pktinfo’
> socket.c:744: error: dereferencing pointer to incomplete type
> socket.c:745: error: dereferencing pointer to incomplete type
> make[2]: Leaving directory `/home/sysadmin/dhcp/dhcp-4.1.0p1/common'
> make[1]: Leaving directory `/home/sysadmin/dhcp/dhcp-4.1.0p1/common'
> make[2]: *** [socket.o] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all-recursive] Error 1
>
> Can anyone tell me the correct commands to use to compile this package
> on Ubuntu 9.04?
>
> Chris Buxton
> Professional Services
> Men & Mice
> Address: Noatun 17, IS-105, Reykjavik, Iceland
> US Phone: +1 707 439 0808
> IS Phone: +354 412 1512
> Email: cbuxton at menandmice.com
> www.menandmice.com
>
> Men & Mice
> We bring control and flexibility to network management
>
> This e-mail and its attachments may contain confidential and privileged
> information only intended for the person or entity to which it is
> addressed. If the reader of this message is not the intended recipient,
> you are hereby notified that any retention, dissemination, distribution
> or copy of this e-mail is strictly prohibited. If you have received this
> e-mail in error, please notify us immediately by reply e-mail and
> immediately delete this message and all its attachment.
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
More information about the dhcp-users
mailing list