-
Notifications
You must be signed in to change notification settings - Fork 586
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
Help with porting modsecurity library #451
Comments
Please read the following and let me know if you have any questions about that or about errors that don't seem to be related to any of it. Thanks! |
I went again through that link. Currently, I can`t find the reasons for the errors. I found from previous issues that I miss to define
There are a lot of errors but they are similar, just use another type. Can you suggest the reasons and provide some examples of how it can be fixed? Thanks! |
Please provide the whole log of errors returned by your C++ compiler, as well as the wrapper classes generated by JavaCPP. Thanks! |
Yep, Thanks. |
There's a lot of classes in there. Start by reducing that to a small number of core classes, and once those work, we can move forward with more classes, and repeat until everything is done. Since the library has a C API though, I would recommend starting with that API, first. It should be pretty easy to get that one working. And then if you feel that there's something missing from that API, we can start again to look at mapping the C++ API. |
Thank you for your advice. I tried to reduce the number of classes and header files leaving only the most needed for library usage. Now I have a compilable version, but to achieve that I skipped some fields and methods and some of them shouldn`t be skipped for future library usage.
|
And one more question. How can I deploy an artifact to use in the example project and test if everything works fine? |
Supporting something like
Just running |
Hello. Thank you for your help. With your advice, I have fixed most of the problems and the java wrapper for modsecurity is almost ready. But currently, I faced a build problem. I'm trying to use this preset as dependent lib in the Spring Boot application. Spring Boot builds uber jar and when I`m trying to run this application in docker or on another workspace I got this error. |
It probably just means the library file isn't there? Are you sure it's in the uber JAR? |
It was another fault. The libraries were inside JAR, but the error was irrelevant because dependent libraries for ModSecurity were not installed inside docker. Now everything works fine. Thank you for your help! |
Can I create a pull request for javacpp-presets with added ModSecurity? |
Yes, by all means, please do! Thanks |
Hello! Sorry for the delay with PR. here is it #1012. I think you can close the issue and we can continue in PR if there will need some changes. Thanks for your help! |
I'm trying to create a new preset for modsecurity lib. I`m already done with adding Info for Parser to properly wrap the library and generate Java Pointers without any Java compilation errors. Now I have an issue with generating and compiling C++ jni wrappers based on Java classes, it produces a lot of C++ compilation errors. A lot of errors in incorrect syntax and variables and I cannot recognize a starting point for fixing in the cause of errors are in generated code. It will be greater if you can help me with troubleshooting. Here is my fork with added modsecurity preset. You can run it and see all errors with command
mvn clean install --projects .,modsecurity
as described in wiki.The text was updated successfully, but these errors were encountered: