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

4.0.x - need runtime and compile time (using pcre_config and pcre2_config) checks for PCRE[2] JIT #2784

Open
gen2brain opened this issue Jul 12, 2019 · 3 comments
Assignees
Labels
defect category: a defect or misbehaviour v4.0.x meta: relates to the v4.0.x branch

Comments

@gen2brain
Copy link

I get linking error when I try to compile on ppc64le arch:

build/lib/local/.libs/libfreeradius-util.so: undefined reference to `pcre_jit_exec'
collect2: error: ld returned 1 exit status
make: *** [scripts/boiler.mk:663: build/bin/local/radict] Error 1
make: *** Waiting for unfinished jobs....
build/lib/.libs/libfreeradius-util.so: undefined reference to `pcre_jit_exec'
collect2: error: ld returned 1 exit status
make: *** [scripts/boiler.mk:664: build/bin/radict] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.LzAq3m (%build)

libpcre by default comes without JIT on ppc64le arch, it is not implemented. Last time I compiled for ppc64le, I hacked something in regex.c or regex.h, changed some PCRE define or undef something, can't remember. Now I just compiled it with --without-pcre, option, but libpcre without JIT I think still performs better than internal functions.

Not sure how to check better if libpcre is built with JIT.

@arr2036
Copy link
Member

arr2036 commented Jul 12, 2019

Can you verify 0d2ed19 fixes this?

@gen2brain
Copy link
Author

Just tried, still same error:

LINK build/lib/libfreeradius-tls.la
LINK build/lib/libfreeradius-soh.la
LINK build/lib/libfreeradius-redis.la
LINK build/lib/libfreeradius-json.la
LINK build/lib/libfreeradius-radius.la
LINK build/bin/radict
LINK build/lib/libfreeradius-tacacs.la
LINK build/lib/libfreeradius-dhcpv6.la
LINK build/lib/libfreeradius-vqp.la
build/lib/local/.libs/libfreeradius-util.so: undefined reference to `pcre_jit_exec'
collect2: error: ld returned 1 exit status
make: *** [scripts/boiler.mk:663: build/bin/local/radict] Error 1
make: *** Waiting for unfinished jobs....
build/lib/.libs/libfreeradius-util.so: undefined reference to `pcre_jit_exec'
collect2: error: ld returned 1 exit status
make: *** [scripts/boiler.mk:664: build/bin/radict] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.XFO7mk (%build)

@arr2036
Copy link
Member

arr2036 commented Jul 12, 2019

Ugh, doesn't look like PCRE_CONFIG_JIT is defined depending on whether it's actually available or not, so we'll need to do a full configure time check, building a test program and calling pcre_config

@arr2036 arr2036 changed the title 4.0.x - libpcre on ppc64le doesn't have JIT 4.0.x - need runtime and compile time (using pcre_config and pcre2_config) checks for PCRE[2] JIT Jul 12, 2019
@arr2036 arr2036 self-assigned this Jul 12, 2019
@arr2036 arr2036 added defect category: a defect or misbehaviour v4.0.x meta: relates to the v4.0.x branch labels Jul 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect category: a defect or misbehaviour v4.0.x meta: relates to the v4.0.x branch
Projects
None yet
Development

No branches or pull requests

2 participants