Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jq was compiled without ONIGURUMA regex libary #1

Open
Woogz-git opened this issue May 19, 2022 · 2 comments
Open

jq was compiled without ONIGURUMA regex libary #1

Woogz-git opened this issue May 19, 2022 · 2 comments

Comments

@Woogz-git
Copy link

Woogz-git commented May 19, 2022

Trying run this on OpenWRT but getting the below error:

root@GL-MT1300:~/pia-wg# ./pia-wg.sh
Generating new private key`
Setting default location: any
Setting default wireguard interface name: pia
Cannot read '/pia-wg/pia-wg.conf', generating a default one
Please enter your privateinternetaccess.com username: XXXXXXX
./pia-wg.sh: line 122: /pia-wg/pia-wg.conf: No such file or directory
Config saved
jq: error (at /var/cache/pia-wg/data_new.json:1): jq was compiled without ONIGURUMA regex libary. match/test/sub and related functions are not available.
Location not found!
Options are:
./pia-wg.sh: line 206: column: command not found
Please edit /pia-wg/pia-wg.conf and change your desired location, then try again

Here's the steps I've taken so far

opkg update
opkg install git-http
opkg install ca-bundle
opkg install libmbedtls12
opkg install coreutils-realpath
opkg install nano
opkg install coreutils-shuf
opkg install oniguruma5
git clone http://github.com/triffid/pia-wg.git
cd pia-wg
nano pia-config.sh
change "CONFIG="/etc/pia-wg/pia-wg.conf" to "CONFIG="/root/pia-wg/pia-wg.conf"
./pia-wg.sh

I have ONIGURUMA installed so not sure why it's giving me that error.

the pia-wg folder is in /root/

@triffid
Copy link
Owner

triffid commented May 20, 2022

While that is an obstacle for running the script on OpenWRT, it's not actually an issue with the script itself - you might have to report this to OpenWRT so they can package jq and its libraries properly.

In the meantime, you could try to specify an exact location (in your /etc/pia-wg/pia-wg.conf) so the script doesn't fall back to regex match.

column not found is an odd one, does OpenWRT not offer util-linux? You could probably just remove column invocations from the script, all it does is prettify the server list output. I guess I should test for its availability before trying to use it

@rodhammond
Copy link

rodhammond commented Feb 19, 2023

@Woogz-git

Here are my steps to compile a version of jq compatible with OpenWRT. I did this code build on my LinkSys WRT3200ACM.

This builds a jq version that includes the "Qniguruma" libraries.

REF: https://github.com/stedolan/jq
$ opkg install libtool-bin autoconf automake python3-dev
$ pip3 install --upgrade setuptools
$ rm -rf /tmp/jq*
$ cd /tmp
$ git clone https://github.com/stedolan/jq.git
$ cd jq*
$ git submodule update --init
$ autoreconf -fi
$ ./configure --with-oniguruma=builtin --disable-maintainer-mode
$ make LDFLAGS=-all-static
$ mv /usr/bin/jq /usr/bin/jq.bak
$ cp -rf /tmp/jq/jq /usr/bin/jq
$ jq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants