Closed btaroli closed 7 years ago
Having this same issue..
edit: it's sloppy, but if you remove the test-regex (lines 20,21,24, and 25) in the Makefile (assuming you've installed gcc 4.9.x) it'll compile and so far I haven't had any issues. Leave the .PHONY line (line 23) or it'll error.
That "worked", but I do wonder whether we'll trip over regex issues. Time will tell. I'm sure the test is there for a good reason. :) Just not sure why all gcc 4.9.2 are not equal. ;)
Hi @btaroli and @p-vg, sorry for delay in getting back to you.
I may have been incorrect when I wrote in the instructions that GCC 4.9 or newer required, during some of my testing I found that some version of GCC 4.9 was working correctly and 4.8 wasn't so I assumed GCC 4.9 was the minimum version of GCC that would work with the module. It might well be that GCC 4.9.1, 4.9.2, 4.9.3 or 4.9.4 actually implements regex correctly instead of 4.9(.0).
The test is checking that a regex using word boundaries would be matched correctly as I discovered that some older versions of GCC had problems and would raise an exception instead of correctly matching. If the tests fail then the ZNC module won't be detect when another user mentions your nick or configured mention keywords and then you won't receive push notifications in these cases.
The test checks this very case, the code is very similar to what the module does when checking nick/mention keywords (https://github.com/cocodelabs/znc-palaver/blob/master/palaver.cpp#L514).
I would suggest that instead of removing the test you should instead upgrade to a newer compiler, GCC 4.9 is pretty old and there have been two major release of GCC since (5.x, and 6.x).
Just in case it helps someone else, running make clean
won't remove the non-passing test-regex
binary that was compiled with an older GCC, and it may seem as though the new version you've installed still doesn't work. Once I removed it, I could compile the module.
I've updated make clean
in 6ee20dc299eec02f674de73744f3d821bc6716b5 to include test-regex to solve this problem.
Running this on a NAS for which an update rolled out recently with a major upgrade to Debian 8. It now has gcc 4.9.2 but this package still refuses to build with the regex test failure. Is gcc the issue or could it be a related library?