coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question about stdbuf on OpenWRT


From: Nicholas Fitzkee
Subject: Question about stdbuf on OpenWRT
Date: Sun, 18 Jun 2017 00:40:19 -0500

Hi all,

I'm trying to use stdbuf on OpenWRT and I'm having some problems getting the
correct behavior.  As I'm learning, cross-compiling is not easy, so I'm not
sure if this is a bug or if I'm simply doing something wrong.  Probably the
latter.

My application is rather convoluted, but I found a very nice test case on
the openwrt website (https://github.com/openwrt/packages/issues/1674) .
Running the following command buffers icmp entries when passed into awk:

tcpdump -eni eth0 -v icmp | awk '{print $1}'

If I ping an external website, the output of tcpdump is buffered so that awk
prints several lines at a time. The following command should fix this:

stdbuf -oL tcpdump -eni eth0 -v icmp | awk '{print $1}'

On my router, I get the following error message:

root@DD-WRT:/opt/bin# stdbuf -oL tcpdump -eni eth0 icmp
Error relocating /opt/bin/libstdbuf.so: __fprintf_chk: symbol not found

Libstdbuf.so is installed, and the program will work for trivial cases:

root@DD-WRT:/opt/bin# stdbuf --version
stdbuf (GNU coreutils) 8.27
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Padraig Brady.
root@DD-WRT:/opt/bin# stdbuf -oL date
Sat Jun 17 23:45:49 CDT 2017

I'm not sure where to start with this, and any advice would be appreciated.
The router/OS information is below, and the system is using libc 2.25.

Linux DD-WRT 4.9.30 #14 SMP Sat May 27 01:12:16 CEST 2017 armv7l GNU/Linux

Thanks,
Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]