Alexey Brodkin <[email protected]> wrote:
> This is required to build net-snmp.

What version of net-snmp are you using? Is this because ARC is
still on uclibc instead of musl like everyone else? net-snmp
(5.4.4) built fine (and still builds fine) on uclibc in the 15.05
branch. When are you planning on moving off uclibc? snmpnetstat
isn't even installed, could you just disable building it?

Cheers,
Karl P

> 
> If that options is disabled in uClibc then net-snmp doesn't
> detect sighold support on its configuration stage and so
> defines HAVE_SIGHOLD as 0. That in its turn causes compilation
> of the following branch of timerPause() in apps/snmpnetstat:
> ------------------>8----------------
>     int             oldmask;
>     oldmask = sigblock(sigmask(SIGALRM));
>     if (!signalled) {
>         sigpause(0);
>     }
>     sigsetmask(oldmask);
> ------------------>8----------------
> 
> Now in uClibc all 3 sigblock(), sigmask() and sigsetmask() were
> removed back in 2005, see:
> https://git.busybox.net/uClibc/commit/?id=5aa7aa7fa7ec2a0fe567ac0b2595b46add6f3594
> 
> And all that causes net-snmp linkage to fail this way:
> ------------------>8---------------- .libs/if.o: In function
> `intpr': if.c:(.text+0x908): undefined reference to `sigmask'
> if.c:(.text+0x90e): undefined reference to `sigblock'
> if.c:(.text+0x924): undefined reference to `sigsetmask'
> ------------------>8----------------
> 
> If we enable UCLIBC_HAS_OBSOLETE_BSD_SIGNAL in uClibc then
> branch with sighold is used in timerPause() and everything
> builds as expected.
> 
> Signed-off-by: Alexey Brodkin <[email protected]>
> ---
>  toolchain/uClibc/config/common | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/toolchain/uClibc/config/common
> b/toolchain/uClibc/config/common index ec72701..b476639 100644
> --- a/toolchain/uClibc/config/common
> +++ b/toolchain/uClibc/config/common
> @@ -144,7 +144,7 @@ UCLIBC_HAS_LIBUTIL=y
>  UCLIBC_HAS_LONG_DOUBLE_MATH=y
>  UCLIBC_HAS_NETWORK_SUPPORT=y
>  UCLIBC_HAS_NFTW=y
> -# UCLIBC_HAS_OBSOLETE_BSD_SIGNAL is not set
> +UCLIBC_HAS_OBSOLETE_BSD_SIGNAL=y
>  # UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL is not set
>  UCLIBC_HAS_PRINTF_M_SPEC=y
>  # UCLIBC_HAS_PROFILING is not set
> -- 
> 2.5.5
> _______________________________________________
> openwrt-devel mailing list
> [email protected]
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Attachment: signature.asc
Description: OpenPGP Digital Signature

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to