Building on FreeBSD

busybox doesn't have a time applet that supports -f on both Debian and FreeBSD (and likely more). The above-mentioned pre-req check fails miserably everywhere, as busybox time returning BusyBox doesn't mean that busybox time -f <format string> is functional.

jeff@deb-devel:~$ busybox time
BusyBox v1.22.1 (Debian 1:1.22.0-19+b3) multi-call binary.

Usage: time [-v] PROG ARGS

Run PROG, display resource usage when it exits

	-v	Verbose

jeff@deb-devel:~$ busybox time -f '%E' echo fails            
time: invalid option -- 'f'
BusyBox v1.22.1 (Debian 1:1.22.0-19+b3) multi-call binary.

Usage: time [-v] PROG ARGS

Run PROG, display resource usage when it exits

	-v	Verbose

@balanga -- basically you need to remove the check for the GNU-specific, non-standard behavior of time -f from prereq-buid.mk and change the call in include/subdir.mk to remove the -f flag and its argument.

It is possible that there is code that parses all of the logging output files in the public repo. I haven't checked, but it should be easy enough to find if it bombs at the end of the run. As unless you've explicitly enabled file logging there won't be log files, it shouldn't be a problem even if there is such code.

1 Like

I implemented a Perl based drop-in replacement for that time command in master now.

3 Likes

What was the reason for the second thread on this issue: OpenWrt Build System on FreeBSD ?

1 Like

The first was to find out if anyone had it working, the second was basically an announcement that I had actually come up with something should anyone be interested in trying it out.