Created
June 13, 2019 00:12
-
-
Save kmark/8cc419b99892ec8d36b3d8947b7021bb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Rebuilds flex to avoid the following: | |
# flex-2.5.39: loadlocale.c:130: _nl_intern_locale_data: | |
# Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed. | |
# Aborted (core dumped) | |
# -- | |
# Run this in your repo root after a repo sync | |
# Tested on Ubuntu 18.04.02 LTS | |
cd prebuilts/misc/linux-x86/flex | |
rm flex-2.5.39 | |
tar xf flex-2.5.39.tar.gz | |
cd flex-2.5.39 | |
./configure | |
make CFLAGS='-static' LDFLAGS='-static' | |
rm flex | |
make CFLAGS='-static' LDFLAGS='-static' flex | |
gcc -static -o flex ccl.o dfa.o ecs.o scanflags.o gen.o main.o misc.o nfa.o parse.o scan.o skel.o sym.o tblcmp.o yylex.o options.o scanopt.o buf.o tables.o tables_shared.o filter.o regex.o /usr/lib/x86_64-linux-gnu/libm.a | |
mv flex .. | |
cd .. | |
rm -rf flex-2.5.39 | |
mv flex flex-2.5.39 | |
./flex-2.5.39 -V |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment