ezrosent / frawk Goto Github PK
View Code? Open in Web Editor NEWan efficient awk-like language
License: Apache License 2.0
an efficient awk-like language
License: Apache License 2.0
I'm not sure if this is already covered in #24
This is a simplified failing case:
$ seq 3 > f1
$ seq 10 15 > f2
# works as expected
$ frawk 'NR==FNR{print NR, FNR}' f1 f2
1 1
2 2
3 3
# write the code in a file
$ echo 'NR==FNR{print NR, FNR}' > test.frawk
$ cat test.frawk
NR==FNR{print NR, FNR}
# code fails
$ frawk -f test.frawk f1 f2
1 1
2 2
3 3
4 4
5 5
6 6
In case it makes a difference, this is how I installed:
sudo apt install rustc # version 1.47.0
cargo install frawk --no-default-features --features use_jemalloc,allow_avx2
It's really good to see that great AWK language is not death, and modern implementation is developed. My congratulation!
I used to use AWK a lot, especially to calculate some statistics like sum, mean or standard deviation from data included in text files (usually logs produced by my software). But many time I had to switch to Python, to calculate them accurately. Python has:
Please consider adding some of these futures (especially arbitrary precision integers) to frawk.
Hi! Super cool project!
I was looking at your io related code an noticed you are using std::io::stdout
, which has issues: rust-lang/rust#60673
I've worked around this in other libraries of my own by using burtsushi's https://docs.rs/grep-cli/0.1.5/grep_cli/, which provides a correctly buffering stdout method when piping to a file, and line buffering when connected to a TTY.
I've seen significant speedups in my own libraries switching to buffered stdout. This may help close the single threaded gap with tsv utils.
Since llvm10 is EOL now (as of writing, only 11+ are available), can frawk update it's LLVM dependency, or perhaps document an easier way to find llvm10?
Awk sub
and gsub
handle the &
character in the replacement string as a reference to the matched substring of the original string being rewritten. frawk doesn't do this; but it should. In general, sub
and gsub
could probably use more attention. Thanks to ghuls for pointing this out in #37.
This might sound crazy but still I wanted to propose a feature request about parquet files.
You might ask, why? Parquet files are becoming more widespread and might even be considered as "the new csv". There are specialized tools such as duckdb to run sql commands on them. I didn't see or came across any awk-like utility which can process parquet files.
IMHO, supporting parquet files by frawk will be a huge win for "data analysis at the commandline" camp.
$ cat fields.txt
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx yyyyyyyyyyyyyyyyyyyyyyyyyyyy 111111
xxxxxxxxxxxxxxxxxxxxxxxxxxx yyyyyyyyyyyyyyyyyyyyyyyy 222222
xxxxxxxxxxxxxxxxxxxxxxxxxxxx yyyyyyyyyyyyyyyyyyyyyyyyyyyy 3333333
xxxxxxxxxxxxxxxxxxxxxxxxxx yyyyyyyyyyyyyyyyyyyyyyyy 4444444
# wrong output for 2nd and 4th lines, and the failure is different
$ frawk '{print NR ":" $3 }' fields.txt
1:111111
2:yyyyyyyyyyyyyyyyyyyyyyyy
3:3333333
4:
# works correctly if those lines are given as the sole input
$ sed -n '2p' fields.txt | frawk '{print NR ":" $3 }'
1:222222
$ sed -n '4p' fields.txt | frawk '{print NR ":" $3 }'
1:4444444
The failure also seems to depend on the length of the input lines or something like that, which is why I have those long x
and y
in the input, couldn't find a simpler failing case.
Seeing as how awk
would be greatly enhanced by the addition of first-class functions (FCFs), it would be nice to add them to frawk
.
It turns out that gawk
already has an implementation of FCFs in the form of Indirect Calls, introduced in version 4.0. Here's an example:
function call(f, x) { return @f(x) }
function double(x) { return x*2 }
BEGIN { print call("double", 2) }
While an extra sigal @
is introduced, and the function is called in a "stringly-typed" manner, I still think it would be wise to hop onto an already-existing implementation (and hopefully indirect calls make it into POSIX!) instead of trying to create some alternate.
Since I'm new to LLVM/cranelift, if I was willing to volunteer to implement this, @ezrosent, would you support it/help me work through the codebase to implement it?
Hi. Primary tsv-utils
author here.
First, I want to congratulate you on the project work. Haven't tried it yet, but looking through the documentation, it looks really well thought out. There have been multiple attempts to improve Awk performance over the years. This looks like a winner on the performance front, with CSV support built-in. Very nice!
Also very much appreciate that tsv-utils
is included in the benchmark suite. A very minor thing - The csv2tsv
tool mentioned in the benchmark doc has had some significant performance improvements in the latest releases (2.1.0, 2.1.1). 40-60% faster depending on the nature of CSV-escaping used in the input files. The improvement won't change the conclusion in the report: that a running a CSV aware tool will be faster than converting CSV to TSV and passing to a TSV aware tool. But, the performance improvements do make the conversion more palatable.
Again, congrats on some really nice work!
--Jon
Add goawk to the benchmark: https://github.com/benhoyt/goawk
Also for mawk you should use 1.3.4 on Linux. The 1.3.3 version is very old and is missing a lot of bug fixes. The last Debian version finally updated to mawk 1.3.4:
https://invisible-island.net/mawk/
It would also be good to use the march flag so more advanced CPU features can be used to have a more fair comparison with frawk:
wget ftp://ftp.invisible-island.net/mawk/mawk.tar.gz
tar xzf mawk.tar.gz
cd mawk-1.3.4-20171017/
# Use CPU optimalisations.
./configure EXTRA_CFLAGS=-march=native
make
Is it possilbe to build frawk with musl?
cargo +nightly build --release --target x86_64-unknown-linux-musl
I always run in to problems with jemalloc.
I just want to have a static version so I can run frawk
on a cluster on which I can't install LLVM. It has an older version of glibc than my laptop, so the default build won't work.
Compiling libc v0.2.80
Compiling proc-macro2 v1.0.24
Compiling memchr v2.3.4
Compiling rand_core v0.4.2
Compiling autocfg v1.0.1
Compiling unicode-xid v0.2.1
Compiling autocfg v0.1.7
Compiling byteorder v1.3.4
Compiling cfg-if v0.1.10
Compiling lazy_static v1.4.0
Compiling syn v1.0.48
Compiling log v0.4.11
Compiling typenum v1.12.0
Compiling siphasher v0.2.3
Compiling serde_derive v1.0.117
Compiling cc v1.0.62
Compiling regex-syntax v0.6.21
Compiling maybe-uninit v2.0.0
Compiling version_check v0.9.2
Compiling string_cache_shared v0.3.0
Compiling serde v1.0.117
Compiling byte-tools v0.3.1
Compiling getrandom v0.1.15
Compiling semver-parser v0.7.0
Compiling either v1.6.1
Compiling precomputed-hash v0.1.1
Compiling opaque-debug v0.2.3
Compiling fixedbitset v0.1.9
Compiling strsim v0.9.3
Compiling fake-simd v0.1.2
Compiling fs_extra v1.2.0
Compiling ordermap v0.3.5
Compiling bit-vec v0.6.2
Compiling new_debug_unreachable v1.0.4
Compiling scopeguard v1.1.0
Compiling unicode-segmentation v1.7.0
Compiling lalrpop-util v0.17.2
Compiling bitflags v1.2.1
Compiling diff v0.1.12
Compiling unicode-xid v0.1.0
Compiling ppv-lite86 v0.2.10
Compiling fnv v1.0.7
Compiling unicode-width v0.1.8
Compiling ryu v1.0.5
Compiling hashbrown v0.9.1
Compiling termcolor v1.1.0
Compiling os_str_bytes v2.4.0
Compiling stable_deref_trait v1.2.0
Compiling strsim v0.10.0
Compiling same-file v1.0.6
Compiling vec_map v0.8.2
Compiling hashbrown v0.3.1
Compiling rand_core v0.3.1
Compiling rand_jitter v0.1.4
Compiling crossbeam-utils v0.7.2
Compiling memoffset v0.5.6
Compiling crossbeam-epoch v0.8.2
Compiling indexmap v1.6.0
Compiling rand_pcg v0.1.2
Compiling rand_chacha v0.1.1
Compiling rand v0.6.5
Compiling phf_shared v0.7.24
Compiling thread_local v1.0.1
Compiling proc-macro-error-attr v1.0.4
Compiling proc-macro-error v1.0.4
Compiling block-padding v0.1.5
Compiling semver v0.9.0
Compiling itertools v0.8.2
Compiling bit-set v0.5.2
Compiling jemalloc-sys v0.3.2
Compiling petgraph v0.4.13
Compiling heck v0.3.1
Compiling textwrap v0.12.1
Compiling itertools v0.9.0
Compiling elsa v1.3.2
Compiling rand_hc v0.1.0
Compiling rand_xorshift v0.1.1
Compiling rand_isaac v0.1.1
Compiling rand_os v0.1.3
Compiling dirs v1.0.5
Compiling atty v0.2.14
Compiling aho-corasick v0.7.15
Compiling quote v1.0.7
Compiling num_cpus v1.13.0
Compiling regex-automata v0.1.9
Compiling ena v0.13.1
Compiling smallvec v0.6.13
Compiling generic-array v0.12.3
Compiling term v0.5.2
Compiling regex v1.4.2
Compiling rand_core v0.5.1
Compiling crossbeam-channel v0.4.4
Compiling crossbeam-queue v0.2.3
Compiling bstr v0.2.14
Compiling ascii-canvas v2.0.0
Compiling llvm-sys v100.2.0
Compiling block-buffer v0.7.3
Compiling digest v0.8.1
Compiling rand_chacha v0.2.2
Compiling crossbeam-deque v0.7.3
Compiling globset v0.4.6
Compiling phf_generator v0.7.24
Compiling sha2 v0.8.2
The following warnings were emitted during compilation:
warning: "`background_threads_runtime_support` not supported for `x86_64-unknown-linux-musl`"
error: failed to run custom build command for `jemalloc-sys v0.3.2`
Caused by:
process didn't exit successfully: `/programs/frawk/target/release/build/jemalloc-sys-5fe65c35d70d1b7d/build-script-build` (exit code: 101)
--- stdout
TARGET=x86_64-unknown-linux-musl
HOST=x86_64-unknown-linux-gnu
NUM_JOBS=4
OUT_DIR="/programs/frawk/target/x86_64-unknown-linux-musl/release/build/jemalloc-sys-029465a0016254ff/out"
BUILD_DIR="/programs/frawk/target/x86_64-unknown-linux-musl/release/build/jemalloc-sys-029465a0016254ff/out/build"
SRC_DIR="~/.cargo/registry/src/github.com-1ecc6299db9ec823/jemalloc-sys-0.3.2"
OPT_LEVEL = Some("3")
TARGET = Some("x86_64-unknown-linux-musl")
HOST = Some("x86_64-unknown-linux-gnu")
CC_x86_64-unknown-linux-musl = None
CC_x86_64_unknown_linux_musl = None
TARGET_CC = None
CC = None
CROSS_COMPILE = None
CFLAGS_x86_64-unknown-linux-musl = None
CFLAGS_x86_64_unknown_linux_musl = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = Some("adx,aes,avx,avx2,bmi1,bmi2,cmpxchg16b,ermsb,f16c,fma,fxsr,lzcnt,movbe,pclmulqdq,popcnt,rdrand,rdseed,sse,sse2,sse3,sse4.1,sse4.2,ssse3,xsave,xsavec,xsaveopt,xsaves")
CC="musl-gcc"
CFLAGS="-O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall"
JEMALLOC_REPO_DIR="jemalloc"
JEMALLOC_SRC_DIR="/programs/frawk/target/x86_64-unknown-linux-musl/release/build/jemalloc-sys-029465a0016254ff/out/jemalloc"
cargo:warning="`background_threads_runtime_support` not supported for `x86_64-unknown-linux-musl`"
cargo:rustc-cfg=prefixed
--with-jemalloc-prefix=_rjem_
running: "sh" "/programs/frawk/target/x86_64-unknown-linux-musl/release/build/jemalloc-sys-029465a0016254ff/out/jemalloc/configure" "--disable-cxx" "--with-jemalloc-prefix=_rjem_" "--with-private-namespace=_rjem_" "--host=x86_64-unknown-linux-musl" "--build=x86_64-unknown-linux-gnu" "--prefix=/programs/frawk/target/x86_64-unknown-linux-musl/release/build/jemalloc-sys-029465a0016254ff/out"
checking for xsltproc... ~/anaconda3/bin/xsltproc
checking for x86_64-unknown-linux-musl-gcc... musl-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether musl-gcc accepts -g... yes
checking for musl-gcc option to accept ISO C89... none needed
checking whether compiler is cray... no
checking whether compiler supports -std=gnu11... yes
checking whether compiler supports -Wall... yes
checking whether compiler supports -Wshorten-64-to-32... no
checking whether compiler supports -Wsign-compare... yes
checking whether compiler supports -Wundef... yes
checking whether compiler supports -Wno-format-zero-length... yes
checking whether compiler supports -pipe... yes
checking whether compiler supports -g3... yes
checking how to run the C preprocessor... musl-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking size of void *... 8
checking size of int... 4
checking size of long... 8
checking size of long long... 8
checking size of intmax_t... 8
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-musl
checking whether pause instruction is compilable... yes
checking number of significant virtual address bits... 57
checking for x86_64-unknown-linux-musl-ar... no
checking for ar... ar
checking for x86_64-unknown-linux-musl-nm... no
checking for nm... nm
checking for gawk... gawk
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking whether malloc_usable_size definition can use const argument... no
checking for library containing log... none required
checking whether __attribute__ syntax is compilable... yes
checking whether compiler supports -fvisibility=hidden... yes
checking whether compiler supports -fvisibility=hidden... no
checking whether compiler supports -Werror... yes
checking whether compiler supports -herror_on_warning... no
checking whether tls_model attribute is compilable... yes
checking whether compiler supports -Werror... yes
checking whether compiler supports -herror_on_warning... no
checking whether alloc_size attribute is compilable... yes
checking whether compiler supports -Werror... yes
checking whether compiler supports -herror_on_warning... no
checking whether format(gnu_printf, ...) attribute is compilable... yes
checking whether compiler supports -Werror... yes
checking whether compiler supports -herror_on_warning... no
checking whether format(printf, ...) attribute is compilable... yes
checking for a BSD-compatible install... ~/anaconda3/bin/install -c
checking for x86_64-unknown-linux-musl-ranlib... no
checking for ranlib... ranlib
checking for ld... /usr/bin/ld
checking for autoconf... /usr/bin/autoconf
checking for memalign... yes
checking for valloc... yes
checking whether compiler supports -O3... yes
checking whether compiler supports -O3... no
checking whether compiler supports -funroll-loops... yes
checking configured backtracing method... N/A
checking for sbrk... yes
checking whether utrace(2) is compilable... no
checking whether a program using __builtin_unreachable is compilable... yes
checking whether a program using __builtin_ffsl is compilable... yes
checking LG_PAGE... 12
Missing VERSION file, and unable to generate it; creating bogus VERSION
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pthread_create in -lpthread... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for dlsym... yes
checking whether pthread_atfork(3) is compilable... yes
checking whether pthread_setname_np(3) is compilable... yes
checking for library containing clock_gettime... none required
checking whether clock_gettime(CLOCK_MONOTONIC_COARSE, ...) is compilable... yes
checking whether clock_gettime(CLOCK_MONOTONIC, ...) is compilable... yes
checking whether mach_absolute_time() is compilable... no
checking whether compiler supports -Werror... yes
checking whether syscall(2) is compilable... yes
checking for secure_getenv... no
checking for sched_getcpu... yes
checking for sched_setaffinity... yes
checking for issetugid... yes
checking for _malloc_thread_cleanup... no
checking for _pthread_mutex_init_calloc_cb... no
checking for TLS... yes
checking whether C11 atomics is compilable... yes
checking whether GCC __atomic atomics is compilable... yes
checking whether GCC __sync atomics is compilable... yes
checking whether Darwin OSAtomic*() is compilable... no
checking whether madvise(2) is compilable... yes
checking whether madvise(..., MADV_FREE) is compilable... yes
checking whether madvise(..., MADV_DONTNEED) is compilable... yes
checking whether madvise(..., MADV_DO[NT]DUMP) is compilable... yes
checking whether madvise(..., MADV_[NO]HUGEPAGE) is compilable... yes
checking whether to force 32-bit __sync_{add,sub}_and_fetch()... no
checking whether to force 64-bit __sync_{add,sub}_and_fetch()... no
checking for __builtin_clz... yes
checking whether Darwin os_unfair_lock_*() is compilable... no
checking whether Darwin OSSpin*() is compilable... no
checking whether glibc malloc hook is compilable... no
checking whether glibc memalign hook is compilable... no
checking whether pthreads adaptive mutexes is compilable... no
checking whether compiler supports -D_GNU_SOURCE... yes
checking whether compiler supports -Werror... yes
checking whether compiler supports -herror_on_warning... no
checking whether strerror_r returns char with gnu source is compilable... no
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating jemalloc.pc
config.status: creating doc/html.xsl
config.status: creating doc/manpages.xsl
config.status: creating doc/jemalloc.xml
config.status: creating include/jemalloc/jemalloc_macros.h
config.status: creating include/jemalloc/jemalloc_protos.h
config.status: creating include/jemalloc/jemalloc_typedefs.h
config.status: creating include/jemalloc/internal/jemalloc_preamble.h
config.status: creating test/test.sh
config.status: creating test/include/test/jemalloc_test.h
config.status: creating config.stamp
config.status: creating bin/jemalloc-config
config.status: creating bin/jemalloc.sh
config.status: creating bin/jeprof
config.status: creating include/jemalloc/jemalloc_defs.h
config.status: creating include/jemalloc/internal/jemalloc_internal_defs.h
config.status: creating test/include/test/jemalloc_test_defs.h
config.status: executing include/jemalloc/internal/public_symbols.txt commands
config.status: executing include/jemalloc/internal/private_symbols.awk commands
config.status: executing include/jemalloc/internal/private_symbols_jet.awk commands
config.status: executing include/jemalloc/internal/public_namespace.h commands
config.status: executing include/jemalloc/internal/public_unnamespace.h commands
config.status: executing include/jemalloc/internal/size_classes.h commands
config.status: executing include/jemalloc/jemalloc_protos_jet.h commands
config.status: executing include/jemalloc/jemalloc_rename.h commands
config.status: executing include/jemalloc/jemalloc_mangle.h commands
config.status: executing include/jemalloc/jemalloc_mangle_jet.h commands
config.status: executing include/jemalloc/jemalloc.h commands
===============================================================================
jemalloc version : 0.0.0-0-g0000000000000000000000000000000000000000
library revision : 2
CONFIG : --disable-cxx --with-jemalloc-prefix=_rjem_ --with-private-namespace=_rjem_ --host=x86_64-unknown-linux-musl --build=x86_64-unknown-linux-gnu --prefix=/programs/frawk/target/x86_64-unknown-linux-musl/release/build/jemalloc-sys-029465a0016254ff/out build_alias=x86_64-unknown-linux-gnu host_alias=x86_64-unknown-linux-musl CC=musl-gcc 'CFLAGS=-O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall' 'LDFLAGS=-O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall' 'CPPFLAGS=-O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall'
CC : musl-gcc
CONFIGURE_CFLAGS : -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops
SPECIFIED_CFLAGS : -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall
EXTRA_CFLAGS :
CPPFLAGS : -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT
CXX :
CONFIGURE_CXXFLAGS :
SPECIFIED_CXXFLAGS :
EXTRA_CXXFLAGS :
LDFLAGS : -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall
EXTRA_LDFLAGS :
DSO_LDFLAGS : -shared -Wl,-soname,$(@F)
LIBS : -lpthread
RPATH_EXTRA :
XSLTPROC : ~/anaconda3/bin/xsltproc
XSLROOT : /usr/share/xml/docbook/stylesheet/docbook-xsl
PREFIX : /programs/frawk/target/x86_64-unknown-linux-musl/release/build/jemalloc-sys-029465a0016254ff/out
BINDIR : /programs/frawk/target/x86_64-unknown-linux-musl/release/build/jemalloc-sys-029465a0016254ff/out/bin
DATADIR : /programs/frawk/target/x86_64-unknown-linux-musl/release/build/jemalloc-sys-029465a0016254ff/out/share
INCLUDEDIR : /programs/frawk/target/x86_64-unknown-linux-musl/release/build/jemalloc-sys-029465a0016254ff/out/include
LIBDIR : /programs/frawk/target/x86_64-unknown-linux-musl/release/build/jemalloc-sys-029465a0016254ff/out/lib
MANDIR : /programs/frawk/target/x86_64-unknown-linux-musl/release/build/jemalloc-sys-029465a0016254ff/out/share/man
srcroot : /programs/frawk/target/x86_64-unknown-linux-musl/release/build/jemalloc-sys-029465a0016254ff/out/jemalloc/
abs_srcroot : /programs/frawk/target/x86_64-unknown-linux-musl/release/build/jemalloc-sys-029465a0016254ff/out/jemalloc/
objroot :
abs_objroot : /programs/frawk/target/x86_64-unknown-linux-musl/release/build/jemalloc-sys-029465a0016254ff/out/build/
JEMALLOC_PREFIX : _rjem_
JEMALLOC_PRIVATE_NAMESPACE
: _rjem_je_
install_suffix :
malloc_conf :
autogen : 0
debug : 0
stats : 1
prof : 0
prof-libunwind : 0
prof-libgcc : 0
prof-gcc : 0
fill : 1
utrace : 0
xmalloc : 0
log : 0
lazy_lock : 0
cache-oblivious : 1
cxx : 0
===============================================================================
running: "make" "srcroot=../jemalloc/" "-j" "4"
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/jemalloc.sym.o ../jemalloc/src/jemalloc.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/background_thread.sym.o ../jemalloc/src/background_thread.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/arena.sym.o ../jemalloc/src/arena.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/base.sym.o ../jemalloc/src/base.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/bin.sym.o ../jemalloc/src/bin.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/bitmap.sym.o ../jemalloc/src/bitmap.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/ckh.sym.o ../jemalloc/src/ckh.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/ctl.sym.o ../jemalloc/src/ctl.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/div.sym.o ../jemalloc/src/div.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/extent.sym.o ../jemalloc/src/extent.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/extent_dss.sym.o ../jemalloc/src/extent_dss.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/extent_mmap.sym.o ../jemalloc/src/extent_mmap.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/hash.sym.o ../jemalloc/src/hash.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/hooks.sym.o ../jemalloc/src/hooks.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/large.sym.o ../jemalloc/src/large.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/log.sym.o ../jemalloc/src/log.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/malloc_io.sym.o ../jemalloc/src/malloc_io.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/mutex.sym.o ../jemalloc/src/mutex.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/mutex_pool.sym.o ../jemalloc/src/mutex_pool.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/nstime.sym.o ../jemalloc/src/nstime.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/pages.sym.o ../jemalloc/src/pages.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/prng.sym.o ../jemalloc/src/prng.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/prof.sym.o ../jemalloc/src/prof.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/rtree.sym.o ../jemalloc/src/rtree.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/stats.sym.o ../jemalloc/src/stats.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/sz.sym.o ../jemalloc/src/sz.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/tcache.sym.o ../jemalloc/src/tcache.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/ticker.sym.o ../jemalloc/src/ticker.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/tsd.sym.o ../jemalloc/src/tsd.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/witness.sym.o ../jemalloc/src/witness.c
nm -a src/jemalloc.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/jemalloc.sym
nm -a src/arena.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/arena.sym
nm -a src/background_thread.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/background_thread.sym
nm -a src/base.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/base.sym
nm -a src/bin.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/bin.sym
nm -a src/bitmap.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/bitmap.sym
nm -a src/ckh.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/ckh.sym
nm -a src/div.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/div.sym
nm -a src/extent.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/extent.sym
nm -a src/extent_dss.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/extent_dss.sym
nm -a src/extent_mmap.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/extent_mmap.sym
nm -a src/hash.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/hash.sym
nm -a src/hooks.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/hooks.sym
nm -a src/large.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/large.sym
nm -a src/log.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/log.sym
nm -a src/malloc_io.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/malloc_io.sym
nm -a src/mutex.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/mutex.sym
nm -a src/mutex_pool.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/mutex_pool.sym
nm -a src/nstime.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/nstime.sym
nm -a src/pages.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/pages.sym
nm -a src/prng.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/prng.sym
nm -a src/prof.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/prof.sym
nm -a src/rtree.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/rtree.sym
nm -a src/sz.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/sz.sym
nm -a src/tcache.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/tcache.sym
nm -a src/ticker.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/ticker.sym
nm -a src/tsd.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/tsd.sym
nm -a src/witness.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/witness.sym
nm -a src/ctl.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/ctl.sym
nm -a src/stats.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/stats.sym
/bin/sh ../jemalloc/include/jemalloc/internal/private_namespace.sh src/jemalloc.sym src/arena.sym src/background_thread.sym src/base.sym src/bin.sym src/bitmap.sym src/ckh.sym src/ctl.sym src/div.sym src/extent.sym src/extent_dss.sym src/extent_mmap.sym src/hash.sym src/hooks.sym src/large.sym src/log.sym src/malloc_io.sym src/mutex.sym src/mutex_pool.sym src/nstime.sym src/pages.sym src/prng.sym src/prof.sym src/rtree.sym src/stats.sym src/sz.sym src/tcache.sym src/ticker.sym src/tsd.sym src/witness.sym > include/jemalloc/internal/private_namespace.gen.h
cp include/jemalloc/internal/private_namespace.gen.h include/jemalloc/internal/private_namespace.gen.h
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/jemalloc.pic.o ../jemalloc/src/jemalloc.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/arena.pic.o ../jemalloc/src/arena.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/background_thread.pic.o ../jemalloc/src/background_thread.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/base.pic.o ../jemalloc/src/base.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/bin.pic.o ../jemalloc/src/bin.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/bitmap.pic.o ../jemalloc/src/bitmap.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/ckh.pic.o ../jemalloc/src/ckh.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/ctl.pic.o ../jemalloc/src/ctl.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/div.pic.o ../jemalloc/src/div.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/extent.pic.o ../jemalloc/src/extent.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/extent_dss.pic.o ../jemalloc/src/extent_dss.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/extent_mmap.pic.o ../jemalloc/src/extent_mmap.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/hash.pic.o ../jemalloc/src/hash.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/hooks.pic.o ../jemalloc/src/hooks.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/large.pic.o ../jemalloc/src/large.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/log.pic.o ../jemalloc/src/log.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/malloc_io.pic.o ../jemalloc/src/malloc_io.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/mutex.pic.o ../jemalloc/src/mutex.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/mutex_pool.pic.o ../jemalloc/src/mutex_pool.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/nstime.pic.o ../jemalloc/src/nstime.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/pages.pic.o ../jemalloc/src/pages.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/prng.pic.o ../jemalloc/src/prng.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/prof.pic.o ../jemalloc/src/prof.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/rtree.pic.o ../jemalloc/src/rtree.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/stats.pic.o ../jemalloc/src/stats.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/sz.pic.o ../jemalloc/src/sz.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/tcache.pic.o ../jemalloc/src/tcache.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/ticker.pic.o ../jemalloc/src/ticker.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/tsd.pic.o ../jemalloc/src/tsd.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -fPIC -DPIC -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/witness.pic.o ../jemalloc/src/witness.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/jemalloc.o ../jemalloc/src/jemalloc.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/arena.o ../jemalloc/src/arena.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/background_thread.o ../jemalloc/src/background_thread.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/base.o ../jemalloc/src/base.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/bin.o ../jemalloc/src/bin.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/bitmap.o ../jemalloc/src/bitmap.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/ckh.o ../jemalloc/src/ckh.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/ctl.o ../jemalloc/src/ctl.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/div.o ../jemalloc/src/div.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/extent.o ../jemalloc/src/extent.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/extent_dss.o ../jemalloc/src/extent_dss.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/extent_mmap.o ../jemalloc/src/extent_mmap.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/hash.o ../jemalloc/src/hash.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/hooks.o ../jemalloc/src/hooks.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/large.o ../jemalloc/src/large.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/log.o ../jemalloc/src/log.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/malloc_io.o ../jemalloc/src/malloc_io.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/mutex.o ../jemalloc/src/mutex.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/mutex_pool.o ../jemalloc/src/mutex_pool.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/nstime.o ../jemalloc/src/nstime.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/pages.o ../jemalloc/src/pages.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/prng.o ../jemalloc/src/prng.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/prof.o ../jemalloc/src/prof.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/rtree.o ../jemalloc/src/rtree.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/stats.o ../jemalloc/src/stats.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/sz.o ../jemalloc/src/sz.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/tcache.o ../jemalloc/src/tcache.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/ticker.o ../jemalloc/src/ticker.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/tsd.o ../jemalloc/src/tsd.c
musl-gcc -std=gnu11 -Wall -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -c -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -D_GNU_SOURCE -D_REENTRANT -Iinclude -I../jemalloc/include -o src/witness.o ../jemalloc/src/witness.c
ar crus lib/libjemalloc_pic.a src/jemalloc.pic.o src/arena.pic.o src/background_thread.pic.o src/base.pic.o src/bin.pic.o src/bitmap.pic.o src/ckh.pic.o src/ctl.pic.o src/div.pic.o src/extent.pic.o src/extent_dss.pic.o src/extent_mmap.pic.o src/hash.pic.o src/hooks.pic.o src/large.pic.o src/log.pic.o src/malloc_io.pic.o src/mutex.pic.o src/mutex_pool.pic.o src/nstime.pic.o src/pages.pic.o src/prng.pic.o src/prof.pic.o src/rtree.pic.o src/stats.pic.o src/sz.pic.o src/tcache.pic.o src/ticker.pic.o src/tsd.pic.o src/witness.pic.o
musl-gcc -shared -Wl,-soname,libjemalloc.so.2 -o lib/libjemalloc.so.2 src/jemalloc.pic.o src/arena.pic.o src/background_thread.pic.o src/base.pic.o src/bin.pic.o src/bitmap.pic.o src/ckh.pic.o src/ctl.pic.o src/div.pic.o src/extent.pic.o src/extent_dss.pic.o src/extent_mmap.pic.o src/hash.pic.o src/hooks.pic.o src/large.pic.o src/log.pic.o src/malloc_io.pic.o src/mutex.pic.o src/mutex_pool.pic.o src/nstime.pic.o src/pages.pic.o src/prng.pic.o src/prof.pic.o src/rtree.pic.o src/stats.pic.o src/sz.pic.o src/tcache.pic.o src/ticker.pic.o src/tsd.pic.o src/witness.pic.o -O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall -lpthread
Makefile:386: recipe for target 'lib/libjemalloc.so.2' failed
--- stderr
configure: WARNING: using cross tools not prefixed with host triplet
ar: `u' modifier ignored since `D' is the default (see `U')
/usr/bin/ld: src/jemalloc.pic.o: relocation R_X86_64_32 against `.rodata.malloc_conf_init.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: src/arena.pic.o: relocation R_X86_64_32S against hidden symbol `_rjem_je_h_steps' can not be used when making a shared object
/usr/bin/ld: src/background_thread.pic.o: relocation R_X86_64_32S against hidden symbol `_rjem_je_h_steps' can not be used when making a shared object
/usr/bin/ld: src/base.pic.o: relocation R_X86_64_32S against hidden symbol `_rjem_je_sz_size2index_tab' can not be used when making a shared object
/usr/bin/ld: src/bin.pic.o: relocation R_X86_64_32 against `.rodata._rjem_je_bin_init.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: src/ckh.pic.o: relocation R_X86_64_32S against hidden symbol `_rjem_je_sz_size2index_tab' can not be used when making a shared object
/usr/bin/ld: src/ctl.pic.o: relocation R_X86_64_32 against `.rodata.super_arenas_bin_i_node' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: src/extent.pic.o: relocation R_X86_64_32 against undefined hidden symbol `_rjem_je_extents_rtree' can not be used when making a shared object
/usr/bin/ld: src/large.pic.o: relocation R_X86_64_32S against undefined hidden symbol `_rjem_je_arenas' can not be used when making a shared object
/usr/bin/ld: src/log.pic.o: relocation R_X86_64_32 against undefined hidden symbol `_rjem_je_log_var_names' can not be used when making a shared object
/usr/bin/ld: src/malloc_io.pic.o: relocation R_X86_64_32S against `.rodata._rjem_je_malloc_strtoumax' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: src/mutex.pic.o: relocation R_X86_64_32 against `.rodata._rjem_je_malloc_mutex_postfork_child.str1.8' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: src/pages.pic.o: relocation R_X86_64_32 against `.rodata._rjem_je_pages_map.str1.8' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: src/prof.pic.o: relocation R_X86_64_32 against `.rodata.prof_dump_open_impl.str1.8' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: src/rtree.pic.o: relocation R_X86_64_32 against `.rodata._rjem_je_rtree_new.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: src/stats.pic.o: relocation R_X86_64_32S against `.rodata.mutex_stats_init_cols.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: src/tcache.pic.o: relocation R_X86_64_32S against undefined hidden symbol `_rjem_je_arenas' can not be used when making a shared object
/usr/bin/ld: src/tsd.pic.o: relocation R_X86_64_32 against `.rodata._rjem_je_tsd_cleanup.str1.8' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: src/witness.pic.o: relocation R_X86_64_32 against `.rodata.witness_lock_error_impl.str1.8' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make: *** [lib/libjemalloc.so.2] Error 1
make: *** Waiting for unfinished jobs....
thread 'main' panicked at 'command did not execute successfully: "make" "srcroot=../jemalloc/" "-j" "4"
expected success, got: exit code: 2', ~/.cargo/registry/src/github.com-1ecc6299db9ec823/jemalloc-sys-0.3.2/build.rs:392:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
Can you add builded files for linux/etc?
Today, frawk supports awk-style splits that populate an array with all of the relevant sub-strings in an (optional) separator. It would be both more succinct and more efficient to support syntax like:
a, b = splitstr("hi:there", ":")
Or similar. Where, the behavior of splitstr compiles down to something like splitn
with n
given by the number of variables on the left-hand side of the assignment.
This would be particularly helpful when unpacking map keys that are punctuated by SUBSEP
.
tolower(str): returns a copy of the stringstr, with all the upper-case characters in str translated to their corresponding lower-case counterparts. Nonalphabetic characters are left un-changed
toupper(str): returns a copy of the stringstr, with all the lower-case characters in str translated to their corresponding upper-case counterparts. Nonalphabetic characters are left un-changed.
https://github.com/onetrueawk/awk/blob/master/FIXES
awk 'BEGIN { x = "HaLlo"; print tolower(x); }'
tolower
and toupper
are supported by at least nawk
, gawk
, mawk
and goawk
.
error[E0554]: `#![feature]` may not be used on the stable release channel
--> src/main.rs:2:43
|
2 | #![cfg_attr(feature = "unstable", feature(core_intrinsics))]
| ^^^^^^^^^^^^^^^
error[E0554]: `#![feature]` may not be used on the stable release channel
--> src/main.rs:3:43
|
3 | #![cfg_attr(feature = "unstable", feature(test))]
| ^^^^
error[E0554]: `#![feature]` may not be used on the stable release channel
--> src/main.rs:4:43
|
4 | #![cfg_attr(feature = "unstable", feature(write_all_vectored))]
| ^^^^^^^^^^^^^^^^^^
For more information about this error, try `rustc --explain E0554`.
error: could not compile `frawk` due to 3 previous errors
FreeBSD 13.1
cargo install frawk
outside the repo currently fails because the frawk
on crates.io
requires nightly. cargo +nightly install frawk
works. Probably could just fix the README
for now.
frawk makes particular use of AVX2 instructions; with custom routines that use runtime feature detection. In addition to that, frawk compiles with -C native
by default, which leads to emitting AVX instructions outside of these hand-coded SIMD routines that check requisite features are enabled at runtime. Using -C native
seems to provide nontrivial performance benefits, so it makes sense to keep it as the default for those who cargo install
frawk and thereby build from source.
As we make frawk more generally available via binary releases, however, it'll be helpful to develop a setup (e.g. via QEMU or some similar technology) to build and then validate frawk binaries intended for older architectures. This issue tracks that work.
frawk panics when using substr when start position is higher than length of string to subset.
$ echo 'test' | frawk '{ print substr($0, 3, 10); }'
st
$ echo 'tes' | frawk '{ print substr($0, 3, 10); }'
s
$ echo 'te' | frawk '{ print substr($0, 3, 10); }'
$ echo 't' | frawk '{ print substr($0, 3, 10); }'
thread 'main' panicked at 'internal error: invalid index len=1, from=2, to=1', src/runtime/str_impl.rs:711:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
Aborted
$ echo '' | frawk '{ print substr($0, 3, 10); }'
thread 'main' panicked at 'internal error: invalid index len=0, from=2, to=0', src/runtime/str_impl.rs:711:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
Aborted
I am likely missing something:
$ rustup install nightly
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.54.0-nightly (676ee1472 2021-05-06)
$ cargo +nightly install --path .
Installing frawk v0.4.0 (/home/bo/work/frawk)
Updating crates.io index
Compiling frawk v0.4.0 (/home/bo/work/frawk)
error[E0554]: `#![feature]` may not be used on the stable release channel
--> src/main.rs:2:35
|
2 | #![cfg_attr(feature = "unstable", feature(core_intrinsics))]
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0554]: `#![feature]` may not be used on the stable release channel
--> src/main.rs:3:35
|
3 | #![cfg_attr(feature = "unstable", feature(test))]
| ^^^^^^^^^^^^^
error[E0554]: `#![feature]` may not be used on the stable release channel
--> src/main.rs:4:35
|
4 | #![cfg_attr(feature = "unstable", feature(write_all_vectored))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0554`.
error: failed to compile `frawk v0.4.0 (/home/bo/work/frawk)`, intermediate artifacts can be found at `/home/bo/work/frawk/target`
Caused by:
could not compile `frawk`
To learn more, run the command again with --verbose.
OK, plan B:
cargo install frawk
error[E0554]: `#![feature]` may not be used on the stable release channel
--> /home/bo/.cargo/registry/src/github.com-1ecc6299db9ec823/frawk-0.4.0/src/main.rs:2:35
|
2 | #![cfg_attr(feature = "unstable", feature(core_intrinsics))]
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0554]: `#![feature]` may not be used on the stable release channel
--> /home/bo/.cargo/registry/src/github.com-1ecc6299db9ec823/frawk-0.4.0/src/main.rs:3:35
|
3 | #![cfg_attr(feature = "unstable", feature(test))]
| ^^^^^^^^^^^^^
error[E0554]: `#![feature]` may not be used on the stable release channel
--> /home/bo/.cargo/registry/src/github.com-1ecc6299db9ec823/frawk-0.4.0/src/main.rs:4:35
|
4 | #![cfg_attr(feature = "unstable", feature(write_all_vectored))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0554`.
error: failed to compile `frawk v0.4.0`, intermediate artifacts can be found at `/tmp/cargo-installuy6UkM`
Caused by:
could not compile `frawk`
To learn more, run the command again with --verbose.
I guess, it is not finished yet...
fast-float
can be removed when using a recent rust compiler. Similar algoritm now in standard library:
https://www.reddit.com/r/rust/comments/omelz4/making_rust_float_parsing_fast_libcore_edition/
pola-rs/polars#1010
When I was running the file info/scripts/groupby.sh
I encountered an error at the following line:
time $FRAWK -bllvm -F'\t' -f "$SCRIPT_FILE" "${TSV}"
When I was trying to trıubleshoot the problem I noticed that
cat datafile | frawk -f scriptfile # works
frawk datafile -f scriptfile # works
frawk -f scriptfile datafile # fails
after trying different options, I found out that in case of frawk -f scriptfile datafile
the datafile needs to be provided with --
. Let me demonstrate the case:
frawk works fine with pipe:
$ echo -e "a,b,c\n1,2,3\n4,5,6"
a,b,c
1,2,3
4,5,6
$ echo -e "a,b,c\n1,2,3\n4,5,6" | frawk -icsv '{ print $2; }'
b
2
5
If we save the script as file, it woks fine in pipe
$ echo '{ print $2; }' > test.awk
$ echo -e "a,b,c\n1,2,3\n4,5,6" | frawk -icsv -f test.awk
b
2
5
if both data and script are from file, then fails
$ echo -e "a,b,c\n1,2,3\n4,5,6" > test.dat
$ frawk -icsv -f test.awk test.dat
Unrecognized token `,` found at line 3, column 4:line 3, column 5
Expected one of "\n", "[" or "{"
workaround is using --
$ frawk -icsv -f test.awk -- test.dat
b
2
5
Not sure if this is bug or a feature but still it would be great if frawk
can be drop-in replacement for awk, by simply replacing awk with frawk in scripts , everything should work. So, it would be great if frawk can run just like awk where datafile is provided after script file.
I'm using frawk version 0.4.2 in Linux.
# Deleting an element from an array works.
❯ frawk 'BEGIN { data[1] = "x"; data[2] = "y"; delete data[1]; }'
# Deleting a whole array at once, not:
❯ frawk 'BEGIN { data[1] = "x"; data[2] = "y"; delete data; }'
Unrecognized token `;` found at line 1, column 50:line 1, column 51
Expected one of "["
# From gawk manual
An element may be deleted from an array using the delete statement. The delete statement may also be used to delete the entire contents of an array, just by specifying the array name without a subscript.
# From mawk manual
The statement, delete array[expr], causes array[expr] not to exist. mawk supports an extension, delete array, which deletes all elements of array.
It looks like this syntax is now also offically supported in the POSIX awk spec:
https://www.austingroupbugs.net/view.php?id=544
I'm having difficulty generating multidimensional maps with frawk.
let's try to get yearly sales report for some products. here's data
$ echo -n -e "year,product,sold\n2021,A,50\n2021,B,100\n2021,A,70\n2020,A,10" > sales.csv
$ cat sales.csv
year,product,sold
2021,A,50
2021,B,100
2021,A,70
2020,A,10
with awk we can do
$ awk -F"," 'NR>1 {sales[$1][$2] += $3}END{for (year in sales){ for (prod in sales[year]){print year, prod, sales[year][prod]}}}' sales.csv
2020 A 10
2021 A 120
2021 B 100
let's try with frawk (I omitted print part, just trying to build the map)
$ cat sales.csv | frawk -icsv -H '{sales[$1][$2] += $3}'
error compiling cranelift: [src/types.rs:525:40] kinds do not match. Map { key: None, val: Some(Int) } vs Scalar(None)
what is the trick to generate multidimensional maps in frawk? do we need some sort of initialization at the beginning?
It might be useful to export the number parsing module as a reusable library.
I have compared
nawk with frawk on a macOS Darwin: i7 with 16GB RAM.
I used a 17GB .csv file for test using:
frawk 'BEGIN{FS=","};{count[NF]++};END{for(i in count){print "With " i " fields - count is: " count[i]}}' aggregated.csv
results:
frawk - 2 min
nawk - 23 min
Impressive. Thank for the work on frawk.
Hi,
I'm not a rust programmer so I might be doing something wrong here but I couldn't compile frawk.
I tried following ways to install
cargo +nightly install --path .
cargo install frawk
cargo +nightly install --path . --no-default-features --features use_jemalloc,allow_avx2,unstable
cargo +nightly install --path . --no-default-features --features allow_avx2,unstable
all failed with the following message:
error[E0599]: no method named `multiple` found for struct `clap::Arg` in the current scope
--> src/main.rs:306:15
|
306 | .multiple(true)
| ^^^^^^^^ method not found in `clap::Arg<'_>`
error[E0599]: no method named `multiple` found for struct `clap::Arg` in the current scope
--> src/main.rs:329:15
|
329 | .multiple(true)
| ^^^^^^^^ method not found in `clap::Arg<'_>`
error[E0599]: no method named `multiple` found for struct `clap::Arg` in the current scope
--> src/main.rs:350:15
|
350 | .multiple(true))
| ^^^^^^^^ method not found in `clap::Arg<'_>`
For more information about this error, try `rustc --explain E0599`.
warning: `frawk` (bin "frawk") generated 2 warnings
error: failed to compile `frawk v0.4.2 (/usr/src/myapp)`, intermediate artifacts can be found at `/usr/src/myapp`
I'm using ubuntu 20.04 and I ran rustup default nightly
for nightly compilation. Here are the version numbers in case they are needed:
# cargo --version
cargo 1.56.0-nightly (e96bdb0c3 2021-08-17)
# rustc --version
rustc 1.56.0-nightly (ad02dc46b 2021-08-26)
# rustup --version
rustup 1.24.3 (ce5817a94 2021-05-31)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.56.0-nightly (ad02dc46b 2021-08-26)`
If possible minimize clash between gawk and frawk flags:
❯ frawk -h
frawk 0.4
Eli R.
frawk is a pattern scanning and (semi-structured) text processing language
USAGE:
frawk [FLAGS] [OPTIONS] [--] [ARGS]
ARGS:
<program> The frawk program to execute
<input-files>... Input files to be read by frawk program
FLAGS:
-A, --arbitrary-shell
--dump-bytecode print bytecode for input program
--dump-cfg print untyped SSA form for input program
-h, --help Prints help information
-H, --parse-header consume the first line of input and populate the `FI` variable with
column names mapping to column indexes
--utf8 validate all input as UTF-8, returning an error if it is invalid
-V, --version Prints version information
OPTIONS:
-b, --backend <backend>
The backend used to run the frawk program, ranging from fastest to compile and slowest
to execute, and slowest to compile and fastest to execute. Cranelift is the default
[possible values: interp, cranelift, llvm]
-F, --field-separator <SEPARATOR> Field separator for frawk program.
-i, --input-format <input-format>
Input is split according to the rules of (csv|tsv). $0 contains the unescaped line.
Assigning to columns does nothing. [possible values: csv, tsv]
-j <jobs>
Number or worker threads to launch when executing in parallel, requires '-p' flag to be
set
-O, --opt-level <opt-level>
the optimization level for the program. Positive levels determine the optimization level
for LLVM. Level -1 forces bytecode interpretation [possible values: 0, 1, 2, 3]
--out-file <FILE> the output file used in place of standard input
-o, --output-format <output-format>
If set, records output via print are escaped according to the rules of the corresponding
format [possible values: csv, tsv]
-p <parallel-strategy>
Attempt to execute the script in parallel. Strategy r[ecord] parallelizes within and
accross files. Strategy f[ile] parallelizes between input files. [possible values: r,
record, f, file]
-f, --program-file <FILE> a file containing frawk program
-v, --var <var>... Has the form <identifier>=<expr>
❯ ./gawk --help
Usage: gawk [POSIX or GNU style options] -f progfile [--] file ...
Usage: gawk [POSIX or GNU style options] [--] 'program' file ...
POSIX options: GNU long options: (standard)
-f progfile --file=progfile
-F fs --field-separator=fs
-v var=val --assign=var=val
Short options: GNU long options: (extensions)
-b --characters-as-bytes
-c --traditional
-C --copyright
-d[file] --dump-variables[=file]
-D[file] --debug[=file]
-e 'program-text' --source='program-text'
-E file --exec=file
-g --gen-pot
-h --help
-i includefile --include=includefile
-l library --load=library
-L[fatal|invalid|no-ext] --lint[=fatal|invalid|no-ext]
-M --bignum
-N --use-lc-numeric
-n --non-decimal-data
-o[file] --pretty-print[=file]
-O --optimize
-p[file] --profile[=file]
-P --posix
-r --re-interval
-s --no-optimize
-S --sandbox
-t --lint-old
-V --version
To report bugs, see node `Bugs' in `gawk.info'
which is section `Reporting Problems and Bugs' in the
printed version. This same information may be found at
https://www.gnu.org/software/gawk/manual/html_node/Bugs.html.
PLEASE do NOT try to report bugs by posting in comp.lang.awk,
or by using a web forum such as Stack Overflow.
gawk is a pattern scanning and processing language.
By default it reads standard input and writes standard output.
Examples:
gawk '{ sum += $1 }; END { print sum }' file
gawk -F: '{ print $1 }' /etc/passwd
Or keep frawk and have a bird / dinosaur logo.
Given foobar.csv:
foo,bar
1,2
3,4
I'd like to be able to write bar_mean.awk:
{ acc += FIELDS["bar"] }
END { print "bar's mean is " acc/NR }
and run it like this:
$ frawk -icsv --headers -f bar_mean.awk <foobar.csv
bar's mean is 3
Differences when --headers
is passed:
NR
.FIELDS
for the sake of the example above) which maps header name to field value.If you're open to going crazy with the syntax, you could even do something like $"bar"
. (I think $bar
is probably going too far, since that's already valid AWK.)
Hi there! I got this error while trying to build frawk
with cargo
:
no method named about found for struct clap::Arg in the current scope
The context of this error is shown below:
error[E0599]: no method named `about` found for struct `clap::Arg` in the current scope
--> src/main.rs:320:15
|
320 | ... .about("the optimization level for the program. Positive levels determine the optimization level for LLVM. Level -1 forces bytecode...
| ^^^^^ method not found in `clap::Arg<'_>`
any idea about how to deal with it?
I tried installing frawk
with stable Rust (1.46.0) on Linux and got these errors:
error[E0554]: `#![feature]` may not be used on the stable release channel
--> /home/wmoore/.cargo/registry/src/github.com-1ecc6299db9ec823/frawk-0.2.0/src/main.rs:2:1
|
2 | #![feature(core_intrinsics)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0554]: `#![feature]` may not be used on the stable release channel
--> /home/wmoore/.cargo/registry/src/github.com-1ecc6299db9ec823/frawk-0.2.0/src/main.rs:3:1
|
3 | #![feature(test)]
| ^^^^^^^^^^^^^^^^^
error[E0554]: `#![feature]` may not be used on the stable release channel
--> /home/wmoore/.cargo/registry/src/github.com-1ecc6299db9ec823/frawk-0.2.0/src/main.rs:4:1
|
4 | #![feature(write_all_vectored)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0554`.
error: failed to compile `frawk v0.2.0`, intermediate artifacts can be found at `/tmp/cargo-install0PjZoF`
Caused by:
could not compile `frawk`.
It looks like frawk
requires nightly and a subsequent cargo +nightly install frawk
did succeed. If this is intentional it might be worth adding a note to the README.
I am trying to build frawk without LLVM (#67) and am getting:
$ cargo +nightly install --path . --no-default-features --features use_jemalloc,allow_avx2,unstable
Compiling cranelift-jit v0.75.0
error[E0034]: multiple applicable items in scope
--> /home/motiejus/.cargo/registry/src/github.com-1ecc6299db9ec823/lalrpop-0.17.2/src/message/horiz.rs:22:14
|
22 | .intersperse(self.separate)
| ^^^^^^^^^^^ multiple `intersperse` found
|
= note: candidate #1 is defined in an impl of the trait `Iterator` for the type `std::iter::Map<I, F>`
= note: candidate #2 is defined in an impl of the trait `Itertools` for the type `T`
help: disambiguate the associated function for candidate #1
|
19 ~ Iterator::intersperse(self.items
20 + .iter()
21 + .map(|c| c.min_width()), self.separate)
|
help: disambiguate the associated function for candidate #2
|
19 ~ Itertools::intersperse(self.items
20 + .iter()
21 + .map(|c| c.min_width()), self.separate)
I recognize it's a broken dependency and should be reported upstream. However, I looked upstream, but didn't find a way to compile the standalone project and report it there. Guidance would be appreciated; I am new to rust ecosystem.
motiejus ~/code/frawk $ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home: /home/motiejus/.rustup
nightly-x86_64-unknown-linux-gnu (default)
rustc 1.57.0-nightly (fdf65053e 2021-09-07)
motiejus ~/code/frawk $ rustc --version
rustc 1.57.0-nightly (fdf65053e 2021-09-07)
motiejus ~/code/frawk $ cargo --version
cargo 1.56.0-nightly (18751dd3f 2021-09-01)
motiejus ~/code/frawk $
Weird behaviour mixing float calculations and string in print.
❯ printf '1\t2\t3\t4\n' | frawk -F '\t' '{print $1 / 2 "\t" $2; }'
0.5
motif_collections_data/cluster_buster/all on master
❯ printf '1\t2\t3\t4\n' | frawk -F '\t' '{print ($1 / 2) "\t" $2; }'
0.5 2
❯ printf '1\t2\t3\t4\n' | frawk -F '\t' '{print $1 / 2 "\t" $2 / 3; }'
0.16666666666666666
motif_collections_data/cluster_buster/all on master
❯ printf '1\t2\t3\t4\n' | frawk -F '\t' '{print $1 / 2 "\t" ($2 / 3); }'
0.5
motif_collections_data/cluster_buster/all on master
❯ printf '1\t2\t3\t4\n' | frawk -F '\t' '{print ($1 / 2) "\t" ($2 / 3); }'
0.5 0.6666666666666666
Hi,
I'm trying to package frawk for nixos/nixpkgs, but I cannot do that without a Cargo.lock package. Are there any reasons why one isn't included? Thanks.
Scientific notation is not supported in awk script, but works for parsing files with scientific notation.
$ printf '6.18163e-27\n1.80782e-40\n2.38296e-05\n1.92843e-09\n7.37465e-39\n' | frawk '$1 <= 1e-8'
$ printf '6.18163e-27\n1.80782e-40\n2.38296e-05\n1.92843e-09\n7.37465e-39\n' | frawk '$1 <= 1E-8'
$ printf '6.18163e-27\n1.80782e-40\n2.38296e-05\n1.92843e-09\n7.37465e-39\n' | frawk '$1 <= 10^-8'
6.18163e-27
1.80782e-40
1.92843e-09
7.37465e-39
# It understands scientific notation when parsing files itself.
$ printf '6.18163e-27\n1.80782e-40\n2.38296e-05\n1.92843e-09\n7.37465e-39\n' | frawk '{ if ($1 <= 10^-8) { print $1, ($1 + 0.0); } }'
6.18163e-27 6.18163e-27
1.80782e-40 1.80782e-40
1.92843e-09 1.92843e-9
7.37465e-39 7.37465e-39
$ printf '6.18163e-27\n1.80782e-40\n2.38296e-05\n1.92843e-09\n7.37465e-39\n' | gawk '$1 <= 1e-8'
6.18163e-27
1.80782e-40
1.92843e-09
7.37465e-39
$ printf '6.18163e-27\n1.80782e-40\n2.38296e-05\n1.92843e-09\n7.37465e-39\n' | gawk '$1 <= 1E-8'
6.18163e-27
1.80782e-40
1.92843e-09
7.37465e-39
$ printf '6.18163e-27\n1.80782e-40\n2.38296e-05\n1.92843e-09\n7.37465e-39\n' | gawk '$1 <= 10^-8'
6.18163e-27
1.80782e-40
1.92843e-09
7.37465e-39
Other awks don't print trailing zeros when printing floats.
This feature would be great to have in frawk too as now when adding an integer value to a column which contained an integer will give you back a float which is quite annoying in my usecase.
I have for example BED files with chromosomal coordinates in column 2 and 3.
chr1 1000 2000 ...
Like shown here, those intervals are extended:
https://github.com/ghuls/extendBed/blob/master/extendBed.sh
Test case:
for AWK in frawk gawk mawk; do
echo "${AWK}:";
echo '1 9.0 5.5 6.600' | ${AWK} '
BEGIN { OFS="\t" }
{
print "column 1:", $1, $1 + 0, 0 + $1, $1 + 1.0;
print "column 2:", $2, $2 + 0, 0 + $2, $2 + 1.0;
print "column 3:", $3, $3 + 0, 0 + $3, $3 + 0.5;
print "column 4:", $4, $4 + 0, 0 + $4, $4 + 0.4;
}';
echo;
done
frawk:
column 1: 1 1.0 1.0 2.0
column 2: 9.0 9.0 9.0 10.0
column 3: 5.5 5.5 5.5 6.0
column 4: 6.600 6.6 6.6 7.0
gawk:
column 1: 1 1 1 2
column 2: 9.0 9 9 10
column 3: 5.5 5.5 5.5 6
column 4: 6.600 6.6 6.6 7
mawk:
column 1: 1 1 1 2
column 2: 9.0 9 9 10
column 3: 5.5 5.5 5.5 6
column 4: 6.600 6.6 6.6 7
When using archimetric operators in print, strings are ignored (or converted to 0).
❯ frawk 'BEGIN { print "test" 6}'
test6
# Should print "test11"
❯ frawk 'BEGIN { print "test" 6 + 5 }'
5
❯ frawk 'BEGIN { print "test" (6 + 5) }'
test11
❯ frawk 'BEGIN { print 6 "test" }'
6test
# Should print "11test"
❯ frawk 'BEGIN { print 6 + 5 "test" }'
11
❯ frawk 'BEGIN { print (6 + 5) "test" }'
11test
Allow more than one -f
argument. Now it results in this error message:
error: The argument '--program-file <FILE>' was provided more than once, but cannot be used multiple times
To my surprise, this crate compiles with cargo build --no-default-features
on Windows 10! Woot, awk
on Windows! :D
Attempting to compile with the use_jemalloc
against x86_64-pc-windows-msvc
(the most common Windows target AFAIK), one gets a compile error of the form:
$ cargo check # `default` features enable `use_jemalloc`
<snip>
The following warnings were emitted during compilation:
warning: "jemalloc support for `x86_64-pc-windows-msvc` is untested"
error: failed to run custom build command for `tikv-jemalloc-sys v0.4.2+5.2.1-patched.2`
Caused by:
process didn't exit successfully: `<snip>\frawk\target\debug\build\tikv-jemalloc-sys-8070626b6b43d50a\build-script-build` (exit code: 101)
--- stdout
TARGET=x86_64-pc-windows-msvc
HOST=x86_64-pc-windows-msvc
NUM_JOBS=8
OUT_DIR="<snip>\\target\\debug\\build\\tikv-jemalloc-sys-1f5ef3a81eb3f627\\out"
BUILD_DIR="<snip>\\target\\debug\\build\\tikv-jemalloc-sys-1f5ef3a81eb3f627\\out\\build"
SRC_DIR="<snip>\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\tikv-jemalloc-sys-0.4.2+5.2.1-patched.2"
cargo:warning="jemalloc support for `x86_64-pc-windows-msvc` is untested"
cargo:rustc-cfg=prefixed
OPT_LEVEL = Some("0")
TARGET = Some("x86_64-pc-windows-msvc")
HOST = Some("x86_64-pc-windows-msvc")
CC_x86_64-pc-windows-msvc = None
CC_x86_64_pc_windows_msvc = None
HOST_CC = None
CC = None
CFLAGS_x86_64-pc-windows-msvc = None
CFLAGS_x86_64_pc_windows_msvc = None
HOST_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("aes,avx,avx2,bmi1,bmi2,fma,fxsr,lzcnt,pclmulqdq,popcnt,rdrand,rdseed,sse,sse2,sse3,sse4.1,sse4.2,ssse3,xsave,xsavec,xsaveopt,xsaves")
DEBUG = Some("true")
CC="C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.12.25827\\bin\\HostX64\\x64\\cl.exe"
CFLAGS="-nologo -MD -Z7 -Brepro -W4"
JEMALLOC_REPO_DIR="jemalloc"
--with-jemalloc-prefix=_rjem_
running: "sh" "<snip>/frawk/target/debug/build/tikv-jemalloc-sys-1f5ef3a81eb3f627/out/build/configure" "--disable-cxx" "--with-jemalloc-prefix=_rjem_" "--with-private-namespace=_rjem_" "--host=x86_64-pc-win32" "--build=x86_64-pc-win32" "--prefix=<snip>\\frawk\\target\\debug\\build\\tikv-jemalloc-sys-1f5ef3a81eb3f627\\out"
checking for xsltproc... /usr/bin/xsltproc
checking for x86_64-pc-win32-gcc... C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX64\x64\cl.exe
checking whether the C compiler works... no
running: "tail" "-n" "100" "<snip>\\frawk\\target\\debug\\build\\tikv-jemalloc-sys-1f5ef3a81eb3f627\\out\\build\\config.log"
exe=''
exec_prefix='<snip>\frawk\target\debug\build\tikv-jemalloc-sys-1f5ef3a81eb3f627\out'
EXEEXT=''
EXTRA_CFLAGS=''
EXTRA_CXXFLAGS=''
EXTRA_LDFLAGS=''
GREP=''
HAVE_CXX14=''
host_alias='x86_64-pc-win32'
host_cpu=''
host_os=''
host_vendor=''
host='x86_64-pc-win32'
htmldir='${docdir}'
importlib=''
includedir='${prefix}/include'
INCLUDEDIR='<snip>frawktargetdebugbuildtikv-jemalloc-sys-1f5ef3a81eb3f627out/include'
infodir='${datarootdir}/info'
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
install_suffix=''
je_=''
JEMALLOC_CPREFIX=''
JEMALLOC_PREFIX=''
jemalloc_version_bugfix=''
jemalloc_version_gid=''
jemalloc_version_major=''
jemalloc_version_minor=''
jemalloc_version_nrev=''
jemalloc_version=''
LD_PRELOAD_VAR=''
LD=''
LDFLAGS='-nologo -MD -Z7 -Brepro -W4'
LDTARGET=''
libdir='${exec_prefix}/lib'
LIBDIR='<snip>frawktargetdebugbuildtikv-jemalloc-sys-1f5ef3a81eb3f627out/lib'
libdl=''
libexecdir='${exec_prefix}/libexec'
LIBOBJS=''
libprefix=''
LIBS=''
link_whole_archive=''
LM=''
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
LTLIBOBJS=''
mandir='${datarootdir}/man'
MANDIR='<snip>frawk\target\debug\build\tikv-jemalloc-sys-1f5ef3a81eb3f627\out/share/man'
MKLIB=''
NM=''
o=''
OBJEXT=''
objroot=''
oldincludedir='/usr/include'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
pdfdir='${docdir}'
PIC_CFLAGS=''
PREFIX='<snip>\frawk\target\debug\build\tikv-jemalloc-sys-1f5ef3a81eb3f627\out'
prefix='<snip>\frawk\target\debug\build\tikv-jemalloc-sys-1f5ef3a81eb3f627\out'
private_namespace=''
program_transform_name='s,x,x,'
psdir='${docdir}'
RANLIB=''
rev='2'
RPATH_EXTRA=''
RPATH=''
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
SHELL='/bin/sh'
so=''
SOREV=''
SPECIFIED_CFLAGS='-nologo -MD -Z7 -Brepro -W4'
SPECIFIED_CXXFLAGS=''
srcroot=''
sysconfdir='${prefix}/etc'
target_alias=''
TEST_LD_MODE=''
XSLROOT=''
XSLTPROC='/usr/bin/xsltproc'
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
configure: exit 77
--- stderr
configure: error: in `<snip>/frawk/target/debug/build/tikv-jemalloc-sys-1f5ef3a81eb3f627/out/build':
configure: error: C compiler cannot create executables
See `config.log' for more details
thread 'main' panicked at 'command did not execute successfully: "sh" "<snip>/frawk/target/debug/build/tikv-jemalloc-sys-1f5ef3a81eb3f627/out/build/configure" "--disable-cxx" "--with-jemalloc-prefix=_rjem_" "--with-private-namespace=_rjem_" "--host=x86_64-pc-win32" "--build=x86_64-pc-win32" "--prefix=C:\\Users\\K0RYU\\workspace\\frawk\\target\\debug\\build\\tikv-jemalloc-sys-1f5ef3a81eb3f627\\out"
expected success, got: exit code: 77', C:\Users\K0RYU\.cargo\registry\src\github.com-1ecc6299db9ec823\tikv-jemalloc-sys-0.4.2+5.2.1-patched.2\build.rs:333:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
Basically, jemalloc
isn't something we should expect to compile on Windows right now. I think this is unfortunate, given that it's currently impossible to define a feature that only is default
for a specific platform.
frawk does not detect start of program without -- when -v is last argument before program start.
❯ seq 1 10 | frawk -v multiplier=20 '{ print $0 * multiplier }'
must specify program at command line, or in a file via -f
❯ seq 1 10 | frawk -v multiplier=20 -- '{ print $0 * multiplier }'
20.0
40.0
60.0
80.0
100.0
120.0
140.0
160.0
180.0
200.0
❯ seq 1 10 | frawk -F '\t' -v multiplier=20 '{ print $0 * multiplier }'
must specify program at command line, or in a file via -f
~/Downloads via ☕ v1.8.0 via 🐍 v3.6.7
❯ seq 1 10 | frawk -v multiplier=20 -F '\t' '{ print $0 * multiplier }'
20.0
40.0
60.0
80.0
100.0
120.0
140.0
160.0
180.0
200.0
frawk also seems to have problems with parsing variables with dashes (and maybe other special characters):
❯ seq 1 10 | awk -v multiplier=20 -v var_with_dash=variable-with-dash -F '\t' '{ print $0 * multiplier, var_with_dash }'
20 variable-with-dash
40 variable-with-dash
60 variable-with-dash
80 variable-with-dash
100 variable-with-dash
120 variable-with-dash
140 variable-with-dash
160 variable-with-dash
180 variable-with-dash
200 variable-with-dash
❯ seq 1 10 | frawk -v multiplier=20 -v var_with_dash=variable-with-dash -F '\t' '{ print $0 * multiplier, var_with_dash }'
failed to parse var at index 2:
var_with_dash=variable-with-dash
error:UnrecognizedToken { token: (Loc { line: 0, col: 22, offset: 22 }, Sub, Loc { line: 0, col: 23, offset: 23 }), expected: ["\"[\""] }
❯ seq 1 10 | frawk -v multiplier=20 -v 'var_with_dash=variable-with-dash' -F '\t' '{ print $0 * multiplier, var_with_dash }'
failed to parse var at index 2:
var_with_dash=variable-with-dash
error:UnrecognizedToken { token: (Loc { line: 0, col: 22, offset: 22 }, Sub, Loc { line: 0, col: 23, offset: 23 }), expected: ["\"[\""] }
❯ seq 1 10 | frawk -v multiplier=20 -v 'var_with_dash="variable-with-dash"' -F '\t' '{ print $0 * multiplier, var_with_dash }'
20.0 variable-with-dash
40.0 variable-with-dash
60.0 variable-with-dash
80.0 variable-with-dash
100.0 variable-with-dash
120.0 variable-with-dash
140.0 variable-with-dash
160.0 variable-with-dash
180.0 variable-with-dash
200.0 variable-with-dash
❯ seq 1 10 | frawk -v multiplier=20 -v var_with_dash="variable-with-dash" -F '\t' '{ print $0 * multiplier, var_with_dash }'
failed to parse var at index 2:
var_with_dash=variable-with-dash
error:UnrecognizedToken { token: (Loc { line: 0, col: 22, offset: 22 }, Sub, Loc { line: 0, col: 23, offset: 23 }), expected: ["\"[\""] }
If passed vars are not a number, the variable will be empty if not quoted (once for bash and once for frawk)). Which is quite different from normal awk.
❯ seq 1 10 | frawk -v multiplier=20 -v X=A -v 'var_with_dash="variable-with-dash"' -F '\t' '{ print $0 * multiplier, X, var_with_dash }'
20.0 variable-with-dash
40.0 variable-with-dash
60.0 variable-with-dash
80.0 variable-with-dash
100.0 variable-with-dash
120.0 variable-with-dash
140.0 variable-with-dash
160.0 variable-with-dash
180.0 variable-with-dash
200.0 variable-with-dash
❯ seq 1 10 | frawk -v multiplier=20 -v 'X=A' -v 'var_with_dash="variable-with-dash"' -F '\t' '{ print $0 * multiplier, X, var_with_dash }'
20.0 variable-with-dash
40.0 variable-with-dash
60.0 variable-with-dash
80.0 variable-with-dash
100.0 variable-with-dash
120.0 variable-with-dash
140.0 variable-with-dash
160.0 variable-with-dash
180.0 variable-with-dash
200.0 variable-with-dash
❯ seq 1 10 | frawk -v multiplier=20 -v 'X="A"' -v 'var_with_dash="variable-with-dash"' -F '\t' '{ print $0 * multiplier, X, var_with_dash }'
20.0 A variable-with-dash
40.0 A variable-with-dash
60.0 A variable-with-dash
80.0 A variable-with-dash
100.0 A variable-with-dash
120.0 A variable-with-dash
140.0 A variable-with-dash
160.0 A variable-with-dash
180.0 A variable-with-dash
200.0 A variable-with-dash
Mininal awk code with omitted {} or ; does not work:
❯ frawk 'BEGIN { if (1 == 1) print "yes" }'
Unrecognized token `}` found at line 1, column 33:line 1, column 34
Expected one of "\n" or ";"
❯ frawk 'BEGIN { if (1 == 1) { print "yes" } }'
yes
❯ frawk 'BEGIN { if (1 == 1) print "yes"; }'
yes
Personally I always use the second way, but a lot of awk code omits braces.
substr is implemented wrong: parameter 3 is length of the string and not the end index
❯ printf '12345678901234567890\n' | awk '{ print substr($0, 5, 2)}'
56
~/Downloads via ☕ v1.8.0 via 🐍 v3.6.7
❯ printf '12345678901234567890\n' | frawk '{ print substr($0, 5, 2)}'
thread 'main' panicked at 'assertion failed: from <= to', src/runtime/str_impl.rs:564:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
~/Downloads via ☕ v1.8.0 via 🐍 v3.6.7
❯ printf '12345678901234567890\n' | frawk '{ print substr($0, 5, 6)}'
56
I suggest emphasizing that one needs to rustup update nightly
before trying to build frawk
.
exit opt_expr
An exit statement causes immediate execution of the END actions or program termination if there are none or if the exit occurs in an END action. The opt_expr sets the exit value of the program unless overridden by a later exit or subsequent error.
❯ seq 1 10 | mawk '{ print $0; if ($1 >= 8) { last = $0; exit 33; } } END { print "last line before exit: " last;}' ; echo "Exit code: $?";
1
2
3
4
5
6
7
8
last line before exit: 8
Exit code: 33
❯ seq 1 10 | frawk '{ print $0; if ($1 >= 8) { last = $0; exit 33; } } END { print "last line before exit: " last;}' ; echo "Exit code: $?";
1
2
3
4
5
6
7
8
9
10
last line before exit: 10
Exit code: 0
# Same but with exit with extra parentheses (frawk does not remove extra (), (print had this issue too in the past)):
❯ seq 1 10 | mawk '{ print $0; if ($1 >= 8) { last = $0; exit(33); } } END { print "last line before exit: " last;}' ; echo "Exit code: $?";
1
2
3
4
5
6
7
8
last line before exit: 8
Exit code: 33
❯ seq 1 10 | frawk '{ print $0; if ($1 >= 8) { last = $0; exit(33); } } END { print "last line before exit: " last;}' ; echo "Exit code: $?";
failed to create program context: [src/cfg.rs:1641:21] Call to unknown function "exit"
Exit code: 1
yay -Sy frawk
.................
Compiling frawk v0.4.6 (/tmp/makepkg/frawk/src/frawk-0.4.6)
Compiling tikv-jemallocator v0.4.3
error[E0554]: #![feature]
may not be used on the stable release channel
--> src/main.rs:2:43
|
2 | #![cfg_attr(feature = "unstable", feature(core_intrinsics))]
| ^^^^^^^^^
error[E0554]: #![feature]
may not be used on the stable release channel
--> src/main.rs:3:43
|
3 | #![cfg_attr(feature = "unstable", feature(test))]
| ^^^^
error[E0554]: #![feature]
may not be used on the stable release channel
--> src/main.rs:4:43
|
4 | #![cfg_attr(feature = "unstable", feature(write_all_vectored))]
| ^^^^^^^^^^^^^^^^^^
For more information about this error, try rustc --explain E0554
.
error: could not compile frawk
due to 3 previous errors
==> ERROR: A failure occurred in build().
$ echo 'test' | frawk '{print}'
$ echo 'test' | frawk '{print }'
test
$ echo 'test' | frawk '{print;}'
test
$ echo 'test' | frawk '{print $0}'
test
Run some of the mawk test in the mawk tarball in the test directory to detect some bugs or missing features:
https://invisible-island.net/mawk/
-F '\0'
is not supported (due to regex crate I assume):
❯ mawk -F '\0' -f nulls0.awk null-rs.dat
1: 11 - 6 8
❯ mawk -F '\000' -f nulls0.awk null-rs.dat
1: 11 - 6 8
❯ mawk -F '\x00' -f nulls0.awk null-rs.dat
1: 11 - 6 8
❯ frawk -F '\0' -f nulls0.awk null-rs.dat
failure in runtime nf: [src/runtime/mod.rs:173:27] regex parse error:
\0
^^
error: backreferences are not supported. Halting execution
❯ frawk -F '\000' -f nulls0.awk null-rs.dat
failure in runtime nf: [src/runtime/mod.rs:173:27] regex parse error:
\000
^^
error: backreferences are not supported. Halting execution
❯ frawk -F '\x00' -f nulls0.awk null-rs.dat
1: 11 - 6 8
The mawk repo contains an awk script that gives a lot of problems when parsing it: wfrq0.awk
do
in the function name (changing down
to DOWN
allows parsing further) 18 │ function down_heap(i, k,hold)
19 │ {
20 │ while ( 1 )
21 │ {
22 │ if ( compare(heap[2*i], heap[2*i+1]) <= 0 ) k = 2*i
23 │ else k = 2*i + 1
24 │
25 │ if ( compare(heap[i],heap[k]) <= 0 ) return
26 │
27 │ hold = heap[k] ; heap[k] = heap[i] ; heap[i] = hold
28 │ i = k
29 │ }
30 │ }
Unrecognized token `do` found at line 18, column 10:line 18, column 12
Expected one of "CALLSTART"
frawk does not like that {
is on a new line and not at the end of function
, while,
for, ... ```Unrecognized token
\n` found at line 17, column 34:line 19, column 1
Expected one of "{"```
frawk does not like functions after BEGIN {} {} END {}
Unrecognized token `function` found at line 60, column 1:line 60, column 9
Expected one of "\n"
failed to create program context: [src/cfg.rs:1397:20] break statement must be inside a loop
# Minimal test case:
❯ echo "" | frawk 'END { for (i=1; i < 100; i++) { if (i == 10) {break}; print i} }'
failed to create program context: [src/cfg.rs:1397:20] break statement must be inside a loop
# Running the same in the BEGIN section gives a panic:
❯ echo "" | frawk 'BEGIN { for (i=1; i < 100; i++) { if (i == 10) {break}; print i} }'
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/cfg.rs:1494:31
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Run test:
❯ mawk -f wfrq0.awk mawktest.dat | cmp -s - wfrq-awk.out ; echo $?
0
❯ frawk -f wfrq0.awk mawktest.dat | cmp -s - wfrq-awk.out ; echo $?
Unrecognized token `do` found at line 18, column 10:line 18, column 12
Expected one of "CALLSTART"
1
Make awk script slightly more runnable:
# Circumvent "Unrecognized token 'do'" problem.
sed -e 's/down/DOWN/g' wfrq0.awk > wfrq0_fix_do_problem.awk
# Pretty format awk script (adds {}).
gawk -owfrq0_pretty.awk -f wfrq0_fix_do_problem.awk mawktest.dat
# Move functions from the bottom to the top of the file (will give "failed to create program context: [src/cfg.rs:1397:20] break statement must be inside a loop").
wfrq0_final.awk
The Overview doc says "I suspect [frawk] would run much slower on a 64-bit non-x86 architecture." Does that mean it frawk would be slower on ARM than frawk on x84, or that frawk would be slower than gawk/mawk/etc? In other words, would frawk still be faster, or should it be avoided on ARM if performance is a goal?
frawk currently requires a nightly compiler, but it only depends on a small amount of functionality (some, only for tests). It's worth making it possible to build frawk on stable Rust, at least optionally.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.