Open Maingol opened 3 months ago
@Maingol The .so/.json file and .yaml (if any) must be in the root of the zip file. It seems you put it in a directory named sql
@ngjaying Here is the root directory after extracting the zip file, and I don't think I made the mistake you mentioned.
@Maingol In the zip file, did you have that sql directory in the root? We cannot tell from this screenshot. Sql.so must be in the root of the zip.
@ngjaying This is the result after extracting the sql.zip file. There is no other way to explain it further. What you see is the root directory after extraction, and both the .so and .json files are in the root directory.
What about attach the zip file?
See, inside zip file you have a redundant directory. Do not contain the sql directory in the zip. Move the so out of it.
you are right,and now another mistake comes,”invalid ELF header“
maybe the CentOS 7 virtual machine in windows can not compile the expected file?
If you run with docker image, you can install pre-compiled plugin, check https://ekuiper.org/docs/en/latest/operation/manager-ui/plugins_in_manager.html. If you do need to build by yourself, check https://ekuiper.org/docs/en/latest/extension/native/develop/plugins_tutorial.html
Golang plugin system has very strict restriction. You need to make sure you build eKuiper and plugin with nearly the same environment including go version or even package path.
@ngjaying
I completed the plugin compilation in a Docker environment, and then uploaded the zip file in the eKuiper management panel. However, when I clicked submit, an error was reported saying that the .so file could not be found in the corresponding directory. I checked the eKuiper server and indeed, the file was not there. I manually copied the .so file to that directory, but after submitting again, the .so file I copied was automatically deleted, and the same error persisted, stating that the .so file could not be found in the corresponding directory.
Please paste the log
@ngjaying
I want to compile the SQL source plugin myself. The reference documentation is:
After modifying the source code, I executed the following command in a CentOS 7 virtual machine on Windows:
This produced
Sql.so
, which I placed in thesql
directory and then compressed into asql.zip
file. The directory structure is as follows:The .zip file uploaded successfully, but the plugin could not be created. The error message is as follows:
How to resolve it?