Menu

#157 musl build failure due to tuntap since version 2.1.4

2.0
pending
None
2024-04-16
2021-10-25
No

The build of iperf fails on musl since at least version 2.1.4 and https://sourceforge.net/p/iperf2/code/ci/b81ab0f1efdbe693ab485b2500ddd71e1e1ce453:

In file included from /home/giuliobenetti/autobuild/run/instance-0/output-1/host/i586-buildroot-linux-musl/sysroot/usr/include/net/ethernet.h:10,
                 from ../include/headers.h:117,
                 from Thread.c:72:
/home/giuliobenetti/autobuild/run/instance-0/output-1/host/i586-buildroot-linux-musl/sysroot/usr/include/netinet/if_ether.h:116:8: error: redefinition of 'struct ethhdr'
  116 | struct ethhdr {
      |        ^~~~~~
In file included from /home/giuliobenetti/autobuild/run/instance-0/output-1/host/i586-buildroot-linux-musl/sysroot/usr/include/linux/if_tun.h:20,
                 from ../include/headers.h:110,
                 from Thread.c:72:
/home/giuliobenetti/autobuild/run/instance-0/output-1/host/i586-buildroot-linux-musl/sysroot/usr/include/linux/if_ether.h:148:8: note: originally defined here
  148 | struct ethhdr {
      |        ^~~~~~

The build could be fixed by manually disabling tuntap-tap and tuntap-tun. In this case, configure.ac would have to be updated to move AM_CONDITIONALcalls outside AS_IF conditions.

An other option would be to update AC_CHECK_DECLS to include linux/if_ether.h before linux/if_tun.h to detect musl conflicts and automatically disable tuntap-tap and tuntap-tun.

Full build log: http://autobuild.buildroot.org/results/d81/d815b864cb2dd719815af2436b919b8e093d3c1b/build-end.log

Discussion

  • Robert McMahon

    Robert McMahon - 2021-10-26
    • status: open --> accepted
    • assigned_to: Robert McMahon
     
  • Robert McMahon

    Robert McMahon - 2024-04-16

    I think this might fix this.

     
  • Robert McMahon

    Robert McMahon - 2024-04-16
    • status: accepted --> pending
     
  • Robert McMahon

    Robert McMahon - 2024-04-16

    Thanks for confirming this.

     

Log in to post a comment.

MongoDB Logo MongoDB