Cannot compile with gcc 4.8

Sven Willenberger sven@dmv.com
Fri Jun 13 15:23:22 UTC 2014


> > From: dcc@jelmail.com
> 
> > I maintain a DCC package for the Arch Linux distribution and have
> > just tried to update it to the latest version 1.3.154. I have found
> > that I cannot compile it with the current gcc toolchain (version
> > 4.8.2.8). I have tried to compile it with an older toolchain
> > (4.6.3) and that works without issue.
> 
> > ../include/dcc_socket.h:79:16: error: conflicting types for
> > _sa_family_t_ typedef u_char sa_family_t;
> 
> By "gcc toolchain" do you mean only gcc and cpp 
> or you include all of /usr/include?
> 
> It looks as if ./configure is not finding the definition of
> sa_family_t. It does that with an equilvalent to this shell script:
>  .......
> 
> #! /bin/sh
> cpp <<EOF | grep sa_family_t
> #include <sys/types.h>
> #include <netinet/in.h>
> #include <sys/socket.h>
> #ifdef sa_family_t
>  " sa_family_t "
> #endif
> EOF
> 
>  ......
> 
> On a system where `gcc -v` says "gcc version 4.7.2 (Debian 4.7.2-5)"
> that script yields this:
> 
> typedef unsigned short int sa_family_t;
>     sa_family_t sa_family;
>     sa_family_t ss_family;
>     sa_family_t sin_family;
>     sa_family_t sin6_family;
> 
> What does it do on your systems?
> 
> 
> Vernon Schryver    vjs@rhyolite.com

The package build tool on Archlinux uses the CPP flag:
CPPFLAGS="-D_FORTIFY_SOURCE=2" 
by default. Commenting this line out
in /etc/makepkg.conf results in a successful build using the makepkg
tool. (For the record, FORTIFY_SOURCE=1 fails as well).

From what I can tell, during configure the conflict in sa_family_t
definitions causes the test to fail when using the FORTIFY_SOURCE flag,
making configure believe that the system has no definition of
sa_family_t (or any other INET related definitions).

-- 
Sven Willenberger
Delmarva Online

key:    http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xCAB7246B
key-id: 0xCAB7246B

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://www.rhyolite.com/pipermail/dcc/attachments/20140613/9e92af5d/attachment.bin>


More information about the DCC mailing list

Contact vjs@rhyolite.com by mail or use the form.