URL filter - cannot recompile

Meanwhile, I found the issue regarding my previous message here!
The forum did not allow me to answer because I asked too many questions, and no one answered :D nice feature :P

Dropping the packet after the match is hardcoded in the source code.
In the main function:
image

The drop_on_match() function

I have tried to modify the source code, but then I could not recompile it :(
I followed the instructions here URL filter.
After issuing the ninja -C /tmp/build command, the compiler says it cannot find rte_sft.h.
I also set the LD_LIBRARY_PATH variable and issue ldconfig, but still not found. I am not a meson/ninja expert, so I blindly tried to copy the rte_sft.h file found /opt/mellanox/dpdk/include/dpdk/rte_sft.h to all libraries to all directories the compiler tries to use, such as /usr/local/include.
The original error of not finding the rte_sft.h disappeared but now many things are still undefined, such as
/opt/mellanox/doca/examples/url_filter/src/url_filter.c:389: undefined reference to 'rte_sft_fini'

Is there any less hacky way to recompile url_filter?

1 Like

Did you export both environment variables when you tried to build?

export PKG_CONFIG_PATH=/opt/mellanox/dpdk/lib/aarch64-linux-gnu/pkgconfig/
export LD_LIBRARY_PATH=/opt/mellanox/dpdk/lib/aarch64-linux-gnu/

Could you share the output from the build failure?

Thanks!

1 Like

@jubetz , thank you for your support!
PKG_CONFIG_PATH setting solved the issue! I can modify the source code and recompile it. I will share my experience here, where my original problem occurred regarding the dropping :)

Speaking of this extra ENV VAR, if you have permission, it would be nice to update the official description, too.

Thank you so much :)