Page 1 of 1

Error during .mpy compiling

Posted: Thu Jun 25, 2020 8:00 am
by jk3ger
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.

Re: Error during .mpy compiling

Posted: Mon Jun 29, 2020 6:21 am
by jimmo
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.

Re: Error during .mpy compiling

Posted: Tue Jun 30, 2020 5:53 pm
by jk3ger
The problem is solved. Now it can be compiled.
I have removed pyelftools and then installed the latest version of it.