#18175: Lots of packages will not build with musl
-----------------------+------------------------
 Reporter:  anonymous  |      Owner:  developers
     Type:  defect     |     Status:  new
 Priority:  normal     |  Milestone:
Component:  packages   |    Version:  Trunk
 Keywords:             |
-----------------------+------------------------
 Now that musl can build the base, there are still a lot of packages that
 will throw errors when compiling. I tried both gcc 4.8 and 4.9, same
 errors. A small selection:

 libffmpeg-mini:
 {{{
 mips-openwrt-linux-musl-gcc -I. -I./ -D_ISOC99_SOURCE
 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -DHAVE_AV_CONFIG_H -Os
 -pipe -march=24kc -mtune=24kc -mno-branch-likely -fno-caller-saves
 -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -mips16
 -minterlink-mips16 -I/home/anton/openwrt/ar71xx/trunk/staging_dir/target-
 mips_34kc_musl-1.1.5/usr/include
 -I/home/anton/openwrt/ar71xx/trunk/staging_dir/target-
 mips_34kc_musl-1.1.5/include
 -I/home/anton/openwrt/ar71xx/trunk/staging_dir/toolchain-
 mips_34kc_gcc-4.8-linaro_musl-1.1.5/usr/include
 -I/home/anton/openwrt/ar71xx/trunk/staging_dir/toolchain-
 mips_34kc_gcc-4.8-linaro_musl-1.1.5/include -fpic   -std=c99 -fomit-frame-
 pointer -fPIC -mips32r2 -pthread -Wdeclaration-after-statement -Wall
 -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings
 -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast
 -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-
 zero-length -Wno-pointer-sign -Os -fno-math-errno -fno-signed-zeros -fno-
 tree-vectorize -Werror=format-security -Werror=implicit-function-
 declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla
 -Wformat -Wno-maybe-uninitialized  -MMD -MF libavutil/error.d -MT
 libavutil/error.o -c -o libavutil/error.o libavutil/error.c
 libavutil/error.c: In function 'av_strerror':
 libavutil/error.c:68:9: error: implicit declaration of function
 'strerror_r' [-Werror=implicit-function-declaration]
          ret = AVERROR(strerror_r(AVUNERROR(errnum), errbuf,
 errbuf_size));
          ^
 cc1: some warnings being treated as errors
 make[4]: *** [libavutil/error.o] Error 1
 }}}

 miniupnpd:
 {{{
 mips-openwrt-linux-musl-gcc -DIPTABLES_143 -lnfnetlink -lip4tc -lip6tc -Os
 -pipe -march=24kc -mtune=24kc -mno-branch-likely -fno-caller-saves
 -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -mips16
 -minterlink-mips16  -I/home/anton/openwrt/ar71xx/trunk/staging_dir/target-
 mips_34kc_musl-1.1.5/usr/include
 -I/home/anton/openwrt/ar71xx/trunk/staging_dir/target-
 mips_34kc_musl-1.1.5/include
 -I/home/anton/openwrt/ar71xx/trunk/staging_dir/toolchain-
 mips_34kc_gcc-4.8-linaro_musl-1.1.5/usr/include
 -I/home/anton/openwrt/ar71xx/trunk/staging_dir/toolchain-
 mips_34kc_gcc-4.8-linaro_musl-1.1.5/include  -fno-strict-aliasing -fno-
 common -Wall -Wextra -Wstrict-prototypes -Wdeclaration-after-statement
 -I/home/anton/openwrt/ar71xx/trunk/staging_dir/target-
 mips_34kc_musl-1.1.5/usr/include  -D_GNU_SOURCE  -c -o miniupnpd.o
 miniupnpd.c
 miniupnpd.c:44:24: fatal error: sys/sysctl.h: No such file or directory
  #include <sys/sysctl.h>
                         ^
 compilation terminated.
 make[4]: *** [miniupnpd.o] Error 1
 }}}

 vnstat:
 {{{
 mips-openwrt-linux-musl-gcc -Os -pipe -march=24kc -mtune=24kc -mno-branch-
 likely -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable
 -msoft-float -mips16 -minterlink-mips16   -c -o dbaccess.o dbaccess.c
 dbaccess.c: In function 'backupdb':
 dbaccess.c:268:25: error: 'O_RDONLY' undeclared (first use in this
 function)
   if ((c = open(current, O_RDONLY)) == -1) {
                          ^
 dbaccess.c:268:25: note: each undeclared identifier is reported only once
 for each function it appears in
 make[5]: *** [dbaccess.o] Error 1
 }}}

 etherwake:
 {{{
 mips-openwrt-linux-musl-gcc -Os -pipe -march=24kc -mtune=24kc -mno-branch-
 likely -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable
 -msoft-float -mips16 -minterlink-mips16 -D__UCLIBC__
 /home/anton/openwrt/ar71xx/trunk/build_dir/target-
 mips_34kc_musl-1.1.5/etherwake-1.09.orig/ether-wake.c -o
 /home/anton/openwrt/ar71xx/trunk/build_dir/target-
 mips_34kc_musl-1.1.5/etherwake-1.09.orig/etherwake
 In file included from /home/anton/openwrt/ar71xx/trunk/staging_dir
 /toolchain-
 mips_34kc_gcc-4.8-linaro_musl-1.1.5/include/netinet/ether.h:4:0,
                  from /home/anton/openwrt/ar71xx/trunk/build_dir/target-
 mips_34kc_musl-1.1.5/etherwake-1.09.orig/ether-wake.c:94:
 /home/anton/openwrt/ar71xx/trunk/staging_dir/toolchain-
 mips_34kc_gcc-4.8-linaro_musl-1.1.5/include/netinet/if_ether.h:96:8:
 error: redefinition of 'struct ethhdr'
  struct ethhdr {
         ^
 In file included from /home/anton/openwrt/ar71xx/trunk/build_dir/target-
 mips_34kc_musl-1.1.5/etherwake-1.09.orig/ether-wake.c:91:0:
 /home/anton/openwrt/ar71xx/trunk/staging_dir/toolchain-
 mips_34kc_gcc-4.8-linaro_musl-1.1.5/include/linux/if_ether.h:133:8: note:
 originally defined here
  struct ethhdr {
         ^
 make[3]: *** [/home/anton/openwrt/ar71xx/trunk/build_dir/target-
 mips_34kc_musl-1.1.5/etherwake-1.09.orig/.built] Error 1
 }}}

 aiccu:
 {{{
 mips-openwrt-linux-musl-gcc  -W -Wall -Wshadow -Wpointer-arith -Wcast-
 align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-
 prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs
 -Winline -Wbad-function-cast -fshort-enums -fstrict-aliasing -fno-common
 -Wpadded -pedantic -D_REENTRANT -Os -pipe -march=24kc -mtune=24kc -mno-
 branch-likely -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-
 variable -msoft-float -mips16 -minterlink-mips16 -D_GNU_SOURCE -D
 AICCU_CONSOLE -D_LINUX -D HAS_IFHEAD -D AICCU_TYPE="\"linux\""   -c -o
 main.o main.c
 In file included from /home/anton/openwrt/ar71xx/trunk/staging_dir
 /toolchain-
 mips_34kc_gcc-4.8-linaro_musl-1.1.5/include/linux/if_tun.h:20:0,
                  from ../common/common.h:97,
                  from ../common/aiccu.h:17,
                  from main.c:13:
 /home/anton/openwrt/ar71xx/trunk/staging_dir/toolchain-
 mips_34kc_gcc-4.8-linaro_musl-1.1.5/include/linux/if_ether.h:133:8: error:
 redefinition of 'struct ethhdr'
  struct ethhdr {
         ^
 In file included from ../common/common.h:94:0,
                  from ../common/aiccu.h:17,
                  from main.c:13:
 /home/anton/openwrt/ar71xx/trunk/staging_dir/toolchain-
 mips_34kc_gcc-4.8-linaro_musl-1.1.5/include/netinet/if_ether.h:96:8: note:
 originally defined here
  struct ethhdr {
         ^
 make[5]: *** [main.o] Error 1
 }}}

 ipsec-tools:
 {{{
 mips-openwrt-linux-musl-gcc  -W -Wall -Wshadow -Wpointer-arith -Wcast-
 align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-
 prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs
 -Winline -Wbad-function-cast -fshort-enums -fstrict-aliasing -fno-common
 -Wpadded -pedantic -D_REENTRANT -Os -pipe -march=24kc -mtune=24kc -mno-
 branch-likely -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-
 variable -msoft-float -mips16 -minterlink-mips16 -D_GNU_SOURCE -D
 AICCU_CONSOLE -D_LINUX -D HAS_IFHEAD -D AICCU_TYPE="\"linux\""   -c -o
 main.o main.c
 In file included from /home/anton/openwrt/ar71xx/trunk/staging_dir
 /toolchain-
 mips_34kc_gcc-4.8-linaro_musl-1.1.5/include/linux/if_tun.h:20:0,
                  from ../common/common.h:97,
                  from ../common/aiccu.h:17,
                  from main.c:13:
 /home/anton/openwrt/ar71xx/trunk/staging_dir/toolchain-
 mips_34kc_gcc-4.8-linaro_musl-1.1.5/include/linux/if_ether.h:133:8: error:
 redefinition of 'struct ethhdr'
  struct ethhdr {
         ^
 In file included from ../common/common.h:94:0,
                  from ../common/aiccu.h:17,
                  from main.c:13:
 /home/anton/openwrt/ar71xx/trunk/staging_dir/toolchain-
 mips_34kc_gcc-4.8-linaro_musl-1.1.5/include/netinet/if_ether.h:96:8: note:
 originally defined here
  struct ethhdr {
         ^
 make[5]: *** [main.o] Error 1
 }}}

--
Ticket URL: <https://dev.openwrt.org/ticket/18175>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to