#include "../../deps/mbedtls/cacert.h" even when using --disable-builtinmbedtls
Description
Attempting to build with a minimal set of deps/ (i.e. deleting all the sub-directories there which are ought not be used), the build fails attempting to include the bundled mbedtls/cacert.h header.
Expected behavior
It should use the header from the system-provided provided mbedtls.
Actual behavior
It uses a bundled source header that it shouldn't. The error at build time is:
libretro-common/net/net_socket_ssl_mbed.c:49:10: fatal error: ../../deps/mbedtls/cacert.h: No such file or directory
49 | #include "../../deps/mbedtls/cacert.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:207: obj-unix/release/./libretro-common/net/net_socket_ssl_mbed.o] Error 1
Steps to reproduce the bug
- Clone source
- Delete deps/mbedtls directory
- Configure with --disable-builtinmbedtls
- Run 'make'
Version/Commit
You can find this information under Information/System Information
- RetroArch: 1.19.1
Environment information
- OS: Guix System (GNU/Linux)
- Compiler: GCC 11
Hm, that cacert.h file is not actually from mbedtls, it seems to have originated from somewhere else, as a comment at the top of the file says.
Seems it's a dated root certificate from 2017 produced by Mozilla; is this really needed?
I checked it a bit, it is a basic trust store, but I suspect in some circumstances it still gets used. It may still be valid, I randomly checked some website and the root certificate is from 2015. Before digging into more details, is there anything specific you want to achieve, where this file is a bottleneck?
I refreshed the retroarch packaging in GNU Guix, and typically we clean up the source by removing the bundled libraries such as deps/mbedtls, and was surprised to see some sources still referring to it.
Ideally if I build with --disable-builtinmbedtls nothing under deps/mbedtls should be used.
I guess it could be moved to libretro_common/net, as nothing else seems to use it.