Cannot compile with gcc 4.8

Vernon Schryver vjs@rhyolite.com
Fri Jun 13 14:02:45 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



More information about the DCC mailing list

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