Cannot build FW from sources with second library module added

Hello, I need to build FW with a custom library module we have.
By default there is a library model freezen as whole folder, named “ml”.
For testing purpose, lets say we need to add another one, “testLib” as follow:


These are the build errors:

CC /home/core/git/v4.6.0/openmv/src/build/micropython/frozen_content.c
/home/core/git/v4.6.0/openmv/src/build/micropython/frozen_content.c:45889:27: error: redefinition of 'const_qstr_table_data_manifest'
45889 | static const qstr_short_t const_qstr_table_data_manifest[8] = {
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/core/git/v4.6.0/openmv/src/build/micropython/frozen_content.c:21521:27: note: previous definition of 'const_qstr_table_data_manifest' with type 'const qstr_short_t[8]' {aka 'const short unsigned int[8]'}
21521 | static const qstr_short_t const_qstr_table_data_manifest[8] = {
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/core/git/v4.6.0/openmv/src/build/micropython/frozen_content.c:45901:27: error: redefinition of 'const_obj_manifest_0'
45901 | static const mp_obj_str_t const_obj_manifest_0 = {{&mp_type_str}, 50105, 35, (const byte*)"\x4d\x61\x63\x68\x69\x6e\x65\x20\x4c\x65\x61\x72\x6e\x69\x6e\x67\x20\x45\x78\x74\x65\x6e\x73\x69\x6f\x6e\x20\x50\x61\x63\x6b\x61\x67\x65\x2e"};
      |                           ^~~~~~~~~~~~~~~~~~~~
/home/core/git/v4.6.0/openmv/src/build/micropython/frozen_content.c:21533:27: note: previous definition of 'const_obj_manifest_0' with type 'mp_obj_str_t' {aka 'const struct _mp_obj_str_t'}
21533 | static const mp_obj_str_t const_obj_manifest_0 = {{&mp_type_str}, 50105, 35, (const byte*)"\x4d\x61\x63\x68\x69\x6e\x65\x20\x4c\x65\x61\x72\x6e\x69\x6e\x67\x20\x45\x78\x74\x65\x6e\x73\x69\x6f\x6e\x20\x50\x61\x63\x6b\x61\x67\x65\x2e"};
      |                           ^~~~~~~~~~~~~~~~~~~~
/home/core/git/v4.6.0/openmv/src/build/micropython/frozen_content.c:45904:27: error: redefinition of 'const_obj_table_data_manifest'
45904 | static const mp_rom_obj_t const_obj_table_data_manifest[1] = {
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/core/git/v4.6.0/openmv/src/build/micropython/frozen_content.c:21536:27: note: previous definition of 'const_obj_table_data_manifest' with type 'const void * const[1]'
21536 | static const mp_rom_obj_t const_obj_table_data_manifest[1] = {
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/core/git/v4.6.0/openmv/src/build/micropython/frozen_content.c:45908:33: error: redefinition of 'frozen_module_manifest'
45908 | static const mp_frozen_module_t frozen_module_manifest = {
      |                                 ^~~~~~~~~~~~~~~~~~~~~~
/home/core/git/v4.6.0/openmv/src/build/micropython/frozen_content.c:21540:33: note: previous definition of 'frozen_module_manifest' with type 'mp_frozen_module_t' {aka 'const struct _mp_frozen_module_t'}
21540 | static const mp_frozen_module_t frozen_module_manifest = {
      |                                 ^~~~~~~~~~~~~~~~~~~~~~
-e See https://github.com/micropython/micropython/wiki/Build-Troubleshooting
make[1]: *** [../../py/mkrules.mk:102: /home/core/git/v4.6.0/openmv/src/build/micropython/frozen_content.o] Error 1

Hi, I tried this and ran into the same issue. The build system currently does not support files with the same name now. However, the manifest.py is not needed.

Just remove the second directory level in the module and the manifest.py and it will compile.

Thank you for letting me know that manifest files is not important for the actual library module. I notice as well, that manifest file exists in various places, but it is included only when folder is included for freeze.
We actually have more folders/structure in our real testLib, and expanding testLib folder to root library path it will make root path messy. I just renamed the manifest file with a unique name and build succeeded, and the library has all the references set correctly and working in our app.