Jump to content

Rock64 U-Boot compilation python issue


Werner
 Share

Recommended Posts

Since this is a different issue I split this topic into a separate one to take care of or check at least somewhen.

 

------------------------------------------

Oh well. There IS something wrong but not with the toolchain download...

rock64 focal current desktop

 

 

  HOSTLD  tools/mkimage
tools/Makefile:134: recipe for target 'tools/_libfdt.so' failed
Makefile:1278: recipe for target 'tools' failed
[ error ] ERROR in function compile_uboot [ compilation.sh:220 ]
[ error ] U-boot compilation failed 
[ o.k. ] Process terminated 
#compilation log:

tools/libfdt_wrap.c:149:11: fatal error: Python.h: No such file or directory
 # include <Python.h>
           ^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
make[1]: *** [tools/_libfdt.so] Error 1
make: *** [tools] Error 2

 

Seems to depend on Python2

 

   19 | int ____ilog2_NaN(void);
      | ^~~
  File "./tools/dtoc/dtoc", line 50
    print result
               ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(result)?
  File "./tools/dtoc/dtoc", line 50
    print result
               ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(result)?
make[1]: *** [include/generated/dt-structs-gen.h] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [tpl/dts/dt-platdata.c] Error 1
make: *** [tpl/u-boot-tpl.bin] Error 2
make: *** Waiting for unfinished jobs....

 

Yup. Forcing Python2 works.

Not sure if Python2 was still default on Bionic but I guess so.

Might become an issue with building on Focal in future. Need to test this somewhen...

Link to comment
Share on other sites

When discussing a problem make sure to provide full logs!

On 9/18/2020 at 11:59 AM, Werner said:

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

 

Most of the time these are dependency-issues. You need to install a package called python-dev. This package includes header files, a static library and development tools for building Python modules, extending the Python interpreter or embedding Python in applications. When encountering this error please note before the error it may say you are missing a package or header file — you should find those and install them and verify if it works.

 

For Python 2.x use:

 

$ sudo apt-get install python-dev

 

If you using python 3, try to replace python-dev with python3-dev

For a specific version of Python 3, replace x with the minor version in

 

$ sudo apt-get install python3.x-dev

 

Link to comment
Share on other sites

 Share

×
×
  • Create New...