I got the same error when I tried compiling with --enable-pkcs11 in the Makefile, however I haven't had time to troubleshoot further.
I'm not sure if that's referring to an error host side or target side, but there is a pkcs11 library that isn't enabled, so I would try enabling that in MenuConfig (iirc: libraries ==> libpkcs11)
If that doesn't solve it, and it is a target side error, you may have to play around in the Makefule, specifying it as a dependency
Hello!
In the menu I've searched with "/" key and enabled anything PKCS11-related (I know, it's sooo unprofessional!)
but the one you mentioned isn't present in my case!
I've also tried to set it as a dependency in the Makefile, but always being warned that the dep. couldn't be satisfied...
Thanks for you patience.
F.
I don't have the time to troubleshoot this, so at this point, I'd recommend searching the OpenVPN forum and/or creating a thread there with a link to this thread.
What you ultimately need from the OpenVPN site is their Makefile options to determine what's required for this specific option to be cross-compiled.
It's not so much that OpenWrt doesn't support it, but that the Makefile is missing some options required for cross-compiling OpenVPN with support for PKCS11.
Since you stated this works fine on a standard platform:
Have you looked at the Makefile on a platform this works on and compared that Makefile to OpenWrt's?
Have you tried cross compiling for LEDE on a platform shown to support PKCS11?
I'd recommend cross compiling for LEDE using Ubuntu (i.e. you're not using a buildroot, but are using an Ubuntu cross compiler to compile for the MIPS toolchain version you require).