Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Building the unix port fails when both os (from unix_ffi) and os-path are required from the manifest. The following manifest.py is sufficient for a repro.

require("os", unix_ffi=True)
require("os-path")

Repro steps:

  1. clone micropython and create the above manifest.py
  2. make -C mpy-cross
  3. make -C ports/unix submodules
  4. make -C ports/unix FROZEN_MANIFEST=manifest.py

This is the error that I get:

CC build-standard/frozen_content.c
build-standard/frozen_content.c:7434:27: error: redefinition of ‘const_qstr_table_data_os___init__’
 7434 | static const qstr_short_t const_qstr_table_data_os___init__[158] = {
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
build-standard/frozen_content.c:4827:27: note: previous definition of ‘const_qstr_table_data_os___init__’ was here
 4827 | static const qstr_short_t const_qstr_table_data_os___init__[158] = {
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
build-standard/frozen_content.c:7596:27: error: redefinition of ‘const_obj_os___init___1’
 7596 | static const mp_obj_str_t const_obj_os___init___1 = {{&mp_type_bytes}, 46501, 1, (const byte*)"\x00"};
      |                           ^~~~~~~~~~~~~~~~~~~~~~~
build-standard/frozen_content.c:4989:27: note: previous definition of ‘const_obj_os___init___1’ was here
 4989 | static const mp_obj_str_t const_obj_os___init___1 = {{&mp_type_bytes}, 46501, 1, (const byte*)"\x00"};
      |                           ^~~~~~~~~~~~~~~~~~~~~~~
build-standard/frozen_content.c:7597:27: error: redefinition of ‘const_obj_os___init___2’
 7597 | static const mp_obj_str_t const_obj_os___init___2 = {{&mp_type_bytes}, 46475, 1, (const byte*)"\x2e"};
      |                           ^~~~~~~~~~~~~~~~~~~~~~~
build-standard/frozen_content.c:4990:27: note: previous definition of ‘const_obj_os___init___2’ was here
 4990 | static const mp_obj_str_t const_obj_os___init___2 = {{&mp_type_bytes}, 46475, 1, (const byte*)"\x2e"};
      |                           ^~~~~~~~~~~~~~~~~~~~~~~
build-standard/frozen_content.c:7598:27: error: redefinition of ‘const_obj_os___init___3’
 7598 | static const mp_obj_str_t const_obj_os___init___3 = {{&mp_type_bytes}, 26309, 2, (const byte*)"\x2e\x2e"};
      |                           ^~~~~~~~~~~~~~~~~~~~~~~
build-standard/frozen_content.c:4991:27: note: previous definition of ‘const_obj_os___init___3’ was here
 4991 | static const mp_obj_str_t const_obj_os___init___3 = {{&mp_type_bytes}, 26309, 2, (const byte*)"\x2e\x2e"};
      |                           ^~~~~~~~~~~~~~~~~~~~~~~
build-standard/frozen_content.c:7601:27: error: redefinition of ‘const_obj_table_data_os___init__’
 7601 | static const mp_rom_obj_t const_obj_table_data_os___init__[5] = {
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
build-standard/frozen_content.c:4994:27: note: previous definition of ‘const_obj_table_data_os___init__’ was here
 4994 | static const mp_rom_obj_t const_obj_table_data_os___init__[5] = {
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
build-standard/frozen_content.c:7609:33: error: redefinition of ‘frozen_module_os___init__’
 7609 | static const mp_frozen_module_t frozen_module_os___init__ = {
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
build-standard/frozen_content.c:5002:33: note: previous definition of ‘frozen_module_os___init__’ was here
 5002 | static const mp_frozen_module_t frozen_module_os___init__ = {
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
build-standard/frozen_content.c:5002:33: error: ‘frozen_module_os___init__’ defined but not used [-Werror=unused-const-variable=]
cc1: all warnings being treated as errors
-e See https://github.com/micropython/micropython/wiki/Build-Troubleshooting
make: *** [../../py/mkrules.mk:83: build-standard/build-standard/frozen_content.o] Error 1

Things I've tried:

  • Switching the order of the two require statements in the manifest
  • include("$(PORT_DIR)/variants/standard/manifest.py") in the manifest
  • CFLAGS_EXTRA=-Wno-unused-const-variable

Building with GCC 9.4.0

You must be logged in to vote

Replies: 1 comment

Comment options

I think this is related to micropython/micropython-lib#672

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.