-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Cant compile with JSON support using YAJL 2 #804
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
Comments
Hi @rpfilomeno, Are you using --with-yajl=PATH? do you mind to share your config.log via gist (https://gist.github.com/)? Br., |
Here is the yajl make and the modsecurity ./configure --with-yajl=/usr/local/include/yajl outputs: I noticed in find_yajl.m4 that its looking for yajl.h but under /usr/local/include/yajl I only got |
Hi @rpfilomeno, it seem to be a bug, it should be looking for: yajl_parse.h Let me fix this. |
The script was looking for the wrong header file. Instead of look for yajl_parse.h it was looking for yajl.h. Originally reported by @rpfilomeno at #804.
@rpfilomeno fix is on our buildbots, just checking if it is not breaking any other platform. Can you test the branch: Thanks, |
Confirmed able to to build on Centos 6.5 64bit with
Thanks |
thank you for the report. patch is merged into our mainline. |
The script was looking for the wrong header file. Instead of look for yajl_parse.h it was looking for yajl.h. Originally reported by @rpfilomeno at #804.
I still cannot compile:
checking for libyajl config script... no |
Hi @z-vr which version of ModSecurity are you trying? |
hi @zimmerle I used the test branch that you referenced above. |
Hi @z-vr, those modifications are already merged on the top of our latest release candidate. Can you try it? If it does not work, can you please paste the config.log into a gist (https://gist.github.com/) and share the link? |
sure ls /usr/local/yajl-2.1/ ls /usr/local/yajl-2.1/lib s /usr/local/yajl-2.1/include/yajl/ -halt |
@zimmerle, still running into issues with this. It should work, but it doesn't. Excerpts below: configure [root@7f54d68b5240 mod_security-2.9.0]# ./configure --prefix=/opt/modsecurity --with-yajl=/usr/include/yajl
...
checking for libyajl config script... no
checking for yajl install... no
configure: optional yajl library not found proof of yajl [root@7f54d68b5240 mod_security-2.9.0]# rpm -qa | grep yajl
yajl-devel-1.0.7-3.el6.x86_64
yajl-1.0.7-3.el6.x86_64
[root@7f54d68b5240 mod_security-2.9.0]# ls -al /usr/include/yajl
total 28
drwxr-xr-x 2 root root 4096 Mar 12 05:12 .
drwxr-xr-x 48 root root 4096 Mar 12 05:12 ..
-rw-r--r-- 1 root root 3136 Oct 29 2009 yajl_common.h
-rw-r--r-- 1 root root 5638 Oct 29 2009 yajl_gen.h
-rw-r--r-- 1 root root 7900 Oct 29 2009 yajl_parse.h I've confirmed that I'm working with the correct version of I need to get this resolved in short order so gonna keep hacking away at it. I'll definitely update the thread if I figure it out. update Just noticed that the CentOS RPMs for yajl are 1.x. Yikes. Gonna explore that angle and report back. |
Downloaded, compiled and installed latest yajl (2.1.1) and then adjusted to reflect new path. Same result. This doesn't work. Appreciate some guidance here. Gonna just disable JSON in the meantime. |
Hi @toddmichael, do you mind to share your config.log ? |
I too cannot compile this with yajl on centos 64bit. here is the config.log |
Please try using the example suggested above './configure --with-yajl="/usr/local/lib /usr/local"' |
I got modsecurity-2.9.0 to build by setting the environment variable "PKG_CONFIG_PATH=/opt/lloyd-yajl-66cb08c/share/pkgconfig". The "configure" script is looking for the file "yajl.pc" and that happens to be where it exists on my system. That was after I built and installed the "lloyd-yajl-66cb08c" package into that directory of course. |
I am using CentOS 6 and just encountered the same issue as a few people above. I tried the solutions in the thread, but they did not work for me. My solution was: |
I have tried every option above and always:
Did I miss the resolution? Because I don't see anybody noting that they had success. using modsecurty 2.9.1 on ubuntu 14.04 |
Can you confirm that you have installed on your system the following packages:
|
For centos 6
I suggest all guys do the following steps:
|
A previously reported solution dictates the use of Oh well moral of the story is that this logic is fixed in v3 because find_yajl has been rewritten substantially. If you are having problems finding YAJL because you didn't install it to a default location or the package didn't come with a .pc, then you will probably need to include the top level directory AND the subfolder for /lib/ in the path. Happy hunting! only looks for providedpath/lib/libyajl.so.x. The include lib doesn't preserve the yajl directory structure for the include folder and so it is never able to set it. |
This fixed the issue for me, on Debian Buster (inside docker):
|
On Centos 6.5, I have compiled yajl-2.1.0 from source and then tried to compile modsecurity-2.8.0 but ./configure --with-yajl returns:
-- snip--
checking for libyajl config script... no
checking for yajl install... no
configure: optional yajl library not found
--snip--
I also tried to install yajl-devel-1.0.7-3.el6.x86_64 via yum but got same result.
When enabled on apache, everything seems to work except for JSON support which shows on the apache error log as ModSecurity: JSON support was not enabled
The text was updated successfully, but these errors were encountered: