Build ULP from scratch to Raspberry 4

User avatar
urbanze
Posts: 301
Joined: Sat Jun 10, 2017 9:55 pm
Location: Brazil

Build ULP from scratch to Raspberry 4

Postby urbanze » Sun Nov 10, 2019 4:20 am

Hi guys! iam trying to use one project with ULP, compilling over raspberry pi 4, but I cant build ULP bin utils from scratch.

Just following instructions in readme of: https://github.com/espressif/binutils-esp32ulp

0. git clone https://github.com/espressif/binutils-esp32ulp.git --recursive

1. ./configure (OK)
Terminal output: https://drive.google.com/file/d/17zhSGY ... sp=sharing


2. Make (FAIL)
Terminal output: https://drive.google.com/file/d/1xyCLGQ ... sp=sharing

Bellow, just a little part of all errors present in file above.

Code: Select all

binary.c:363:3: note: in expansion of macro ‘BFD_JUMP_TABLE_SYMBOLS’
   BFD_JUMP_TABLE_SYMBOLS (binary),
   ^~~~~~~~~~~~~~~~~~~~~~
libbfd.h:436:4: error: cast between incompatible function types from ‘bfd_boolean (*)(bfd *)’ {aka ‘int (*)(struct bfd *)’} to ‘bfd_boolean (*)(bfd *, const char **, const char **, unsigned int *)’ {aka ‘int (*)(struct bfd *, const char **, const char **, unsigned int *)’} [-Werror=cast-function-type]
   ((bfd_boolean (*) (bfd *, const char **, const char **, unsigned int *)) \
    ^
binary.c:210:44: note: in expansion of macro ‘_bfd_nosymbols_find_inliner_info’
 #define binary_find_inliner_info           _bfd_nosymbols_find_inliner_info
                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bfd.h:7573:3: note: in expansion of macro ‘binary_find_inliner_info’
   NAME##_find_inliner_info, \
   ^~~~
binary.c:363:3: note: in expansion of macro ‘BFD_JUMP_TABLE_SYMBOLS’
   BFD_JUMP_TABLE_SYMBOLS (binary),
   ^~~~~~~~~~~~~~~~~~~~~~
libbfd.h:439:4: error: cast between incompatible function types from ‘void * (*)(bfd *)’ {aka ‘void * (*)(struct bfd *)’} to ‘asymbol * (*)(bfd *, void *, long unsigned int)’ {aka ‘struct bfd_symbol * (*)(struct bfd *, void *, long unsigned int)’} [-Werror=cast-function-type]
   ((asymbol *(*) (bfd *, void *, unsigned long)) bfd_nullvoidptr)
    ^
binary.c:211:44: note: in expansion of macro ‘_bfd_nosymbols_bfd_make_debug_symbol’
 #define binary_bfd_make_debug_symbol       _bfd_nosymbols_bfd_make_debug_symbol
                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bfd.h:7574:3: note: in expansion of macro ‘binary_bfd_make_debug_symbol’
   NAME##_bfd_make_debug_symbol, \
   ^~~~
binary.c:363:3: note: in expansion of macro ‘BFD_JUMP_TABLE_SYMBOLS’
   BFD_JUMP_TABLE_SYMBOLS (binary),
   ^~~~~~~~~~~~~~~~~~~~~~
libbfd.h:453:4: error: cast between incompatible function types from ‘void * (*)(bfd *)’ {aka ‘void * (*)(struct bfd *)’} to ‘const reloc_howto_type * (*)(bfd *, bfd_reloc_code_real_type)’ {aka ‘const struct reloc_howto_struct * (*)(struct bfd *, enum bfd_reloc_code_real)’} [-Werror=cast-function-type]
   ((reloc_howto_type *(*) (bfd *, bfd_reloc_code_real_type)) bfd_nullvoidptr)
    ^
bfd.h:7621:3: note: in expansion of macro ‘_bfd_norelocs_bfd_reloc_type_lookup’
   NAME##_bfd_reloc_type_lookup, \
   ^~~~
binary.c:364:3: note: in expansion of macro ‘BFD_JUMP_TABLE_RELOCS’
   BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
   ^~~~~~~~~~~~~~~~~~~~~
libbfd.h:455:4: error: cast between incompatible function types from ‘void * (*)(bfd *)’ {aka ‘void * (*)(struct bfd *)’} to ‘const reloc_howto_type * (*)(bfd *, const char *)’ {aka ‘const struct reloc_howto_struct * (*)(struct bfd *, const char *)’} [-Werror=cast-function-type]
   ((reloc_howto_type *(*) (bfd *, const char *)) bfd_nullvoidptr)
    ^
bfd.h:7622:3: note: in expansion of macro ‘_bfd_norelocs_bfd_reloc_name_lookup’
   NAME##_bfd_reloc_name_lookup
   ^~~~
binary.c:364:3: note: in expansion of macro ‘BFD_JUMP_TABLE_RELOCS’
   BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
   ^~~~~~~~~~~~~~~~~~~~~
libbfd.h:530:4: error: cast between incompatible function types from ‘long int (*)(bfd *)’ {aka ‘long int (*)(struct bfd *)’} to ‘long int (*)(bfd *, asymbol **)’ {aka ‘long int (*)(struct bfd *, struct bfd_symbol **)’} [-Werror=cast-function-type]
   ((long (*) (bfd *, asymbol **)) _bfd_n1)
    ^
bfd.h:7729:3: note: in expansion of macro ‘_bfd_nodynamic_canonicalize_dynamic_symtab’
   NAME##_canonicalize_dynamic_symtab, \
   ^~~~
binary.c:367:3: note: in expansion of macro ‘BFD_JUMP_TABLE_DYNAMIC’
   BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
   ^~~~~~~~~~~~~~~~~~~~~~
libbfd.h:532:4: error: cast between incompatible function types from ‘long int (*)(bfd *)’ {aka ‘long int (*)(struct bfd *)’} to ‘long int (*)(bfd *, long int,  asymbol **, long int,  asymbol **, asymbol **)’ {aka ‘long int (*)(struct bfd *, long int,  struct bfd_symbol **, long int,  struct bfd_symbol **, struct bfd_symbol **)’} [-Werror=cast-function-type]
   ((long (*) (bfd *, long, asymbol **, long, asymbol **, asymbol **)) _bfd_n1)
    ^
bfd.h:7730:3: note: in expansion of macro ‘_bfd_nodynamic_get_synthetic_symtab’
   NAME##_get_synthetic_symtab, \
   ^~~~
binary.c:367:3: note: in expansion of macro ‘BFD_JUMP_TABLE_DYNAMIC’
   BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
   ^~~~~~~~~~~~~~~~~~~~~~
libbfd.h:535:4: error: cast between incompatible function types from ‘long int (*)(bfd *)’ {aka ‘long int (*)(struct bfd *)’} to ‘long int (*)(bfd *, arelent **, asymbol **)’ {aka ‘long int (*)(struct bfd *, struct reloc_cache_entry **, struct bfd_symbol **)’} [-Werror=cast-function-type]
   ((long (*) (bfd *, arelent **, asymbol **)) _bfd_n1)
    ^
bfd.h:7732:3: note: in expansion of macro ‘_bfd_nodynamic_canonicalize_dynamic_reloc’
   NAME##_canonicalize_dynamic_reloc
   ^~~~
binary.c:367:3: note: in expansion of macro ‘BFD_JUMP_TABLE_DYNAMIC’
   BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
   ^~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[4]: *** [Makefile:1694: binary.lo] Error 1
make[4]: ** Esperando que outros processos terminem.
mv -f .deps/targets.Tpo .deps/targets.Plo
mv -f .deps/stabs.Tpo .deps/stabs.Plo
mv -f .deps/syms.Tpo .deps/syms.Plo
make[4]: Leaving directory '/home/pi/esp/binutils-esp32ulp/bfd'
make[3]: *** [Makefile:1737: all-recursive] Error 1
make[3]: Leaving directory '/home/pi/esp/binutils-esp32ulp/bfd'
make[2]: *** [Makefile:1205: all] Error 2
make[2]: Leaving directory '/home/pi/esp/binutils-esp32ulp/bfd'
make[1]: *** [Makefile:2727: all-bfd] Error 2
make[1]: Leaving directory '/home/pi/esp/binutils-esp32ulp'
make: *** [Makefile:851: all] Error 2
How can I build ULP to be compiled in my raspberry pi 4? I already compiled IDF by scratch and worked normally. By the way, I don't know if I'm following the right instructions with this readme. I'm kind of lost.


User avatar
urbanze
Posts: 301
Joined: Sat Jun 10, 2017 9:55 pm
Location: Brazil

Re: Build ULP from scratch to Raspberry 4

Postby urbanze » Tue Nov 12, 2019 6:09 pm

Hi Wi5!

I already "fix" this problem, in release tab (binutils github) have "armel" version and worked, but I would like to decrease some versions to remove ULP warnings about ULP ASM.

I couldn't understand what was done to fix the problem, he install GCC 8? My rasp has GCC 8.3.0. What I need to do?

Who is online

Users browsing this forum: julcol and 119 guests