Error during .mpy compiling

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
jk3ger
Posts: 2
Joined: Thu Jun 25, 2020 7:06 am

Error during .mpy compiling

Post by jk3ger » Thu Jun 25, 2020 8:00 am

Hello.
I am trying to create .mpy module according this source https://docs.micropython.org/en/latest/ ... atmod.html
First I started from examples which are provided by micropython/examples.natmod/features0
But during compilation something is going wrong and I have this error

Code: Select all

LINK build/features0.o
Traceback (most recent call last):
  File "../../../tools/mpy_ld.py", line 964, in <module>
    main()
  File "../../../tools/mpy_ld.py", line 961, in main
    do_link(args)
  File "../../../tools/mpy_ld.py", line 937, in do_link
    load_object_file(env, file)
  File "../../../tools/mpy_ld.py", line 595, in load_object_file
    if s.data_size == 0:
AttributeError: 'Section' object has no attribute 'data_size'
../../../py/dynruntime.mk:138: recipe for target 'build/features0.native.mpy' failed
make: *** [build/features0.native.mpy] Error 1
I don't understand how to deal with that.

User avatar
jimmo
Posts: 1710
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Error during .mpy compiling

Post by jimmo » Mon Jun 29, 2020 6:21 am

jk3ger wrote:
Thu Jun 25, 2020 8:00 am
But during compilation something is going wrong and I have this error
Can you share more information about your build environment, and also the output of running `make V=1`.

In particular, which OS and version, and gcc version.

jk3ger
Posts: 2
Joined: Thu Jun 25, 2020 7:06 am

Re: Error during .mpy compiling

Post by jk3ger » Tue Jun 30, 2020 5:53 pm

The problem is solved. Now it can be compiled.
I have removed pyelftools and then installed the latest version of it.

Post Reply