AN12195 Linux build error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AN12195 Linux build error

1,450 Views
Enuwai
Contributor III

Build toolchain according to "i.MX Yocto Project User's Guide" in "5.1.2. Setup aarch64 toolchain" section of AN12195
When I run "bitbake core-image-base", I get a lot of errors (some are excerpted below)
Do you know the solution?

I. -include ../git/localedef/include/always.h -Wall -Wno-format -c -o ld-collate.o glibc/locale/programs/ld-collate.c
| In file included from /usr/include/x86_64-linux-gnu/bits/types/locale_t.h:22:0,
|                  from /usr/include/string.h:152,
|                  from ../git/localedef/include/string.h:1,
|                  from glibc/locale/programs/ld-address.c:25:
| /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h:28:8: error: redefinition of ‘struct __locale_struct’
|  struct __locale_struct
|         ^~~~~~~~~~~~~~~
| In file included from glibc/locale/langinfo.h:591:0,
|                  from glibc/locale/programs/ld-address.c:24:
| glibc/locale/xlocale.h:27:16: note: originally defined here
|  typedef struct __locale_struct
|                 ^~~~~~~~~~~~~~~
| In file included from /usr/include/x86_64-linux-gnu/bits/types/locale_t.h:22:0,
|                  from /usr/include/string.h:152,
|                  from ../git/localedef/include/string.h:1,
|                  from glibc/locale/programs/ld-address.c:25:
| /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h:42:33: error: conflicting types for ‘__locale_t’
|  typedef struct __locale_struct *__locale_t;
|                                  ^~~~~~~~~~
| In file included from glibc/locale/langinfo.h:591:0,
|                  from glibc/locale/programs/ld-address.c:24:
| glibc/locale/xlocale.h:39:4: note: previous declaration of ‘__locale_t’ was here
|  } *__locale_t;

 

0 Kudos
5 Replies

1,438 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

The i.MX Yocto Project User's Guide  has recommended minimum Ubuntu version.Please check the i.MX Yocto Project User's Guide you refering and install all packages refering the 3.2 Host packages.

Qmiller_0-1675133622992.png

 

0 Kudos

1,432 Views
Enuwai
Contributor III

Hi Qmiller

My development environment is:
 Ubuntu 18.04.1
 Yocto L4.9.51

AN12195 application note mentions Yocto version L4.9.51,
Is it better to use Ubuntu 20.04 and the latest Yocto?

Or is it better to use Ubuntu14.04?

Best Regards

0 Kudos

1,410 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

You can try Ubuntu16.04, these error are caused by Ubuntu version of Host PC 

0 Kudos

1,402 Views
Enuwai
Contributor III

Hi Qmiller,

I tried it on Ubuntu 16.04.7, but the following error occurred when executing the "repo init" command

 

unxp@U16047:~/imx-yocto-bsp$ repo init -u https://source.codeaurora.org/external/imx/imx-manifest  -b imx-linux-morty -m imx-4.9.51-8mq_beta.xml
Downloading Repo source from https://gerrit.googlesource.com/git-repo
repo: Updating release signing keys to keyset ver 2.3
Traceback (most recent call last):
  File "/home/unxp/imx-yocto-bsp/.repo/repo/main.py", line 38, in <module>
    from color import SetDefaultColoring
  File "/home/unxp/imx-yocto-bsp/.repo/repo/color.py", line 18, in <module>
    import pager
  File "/home/unxp/imx-yocto-bsp/.repo/repo/pager.py", line 63
    sys.exit(f'fatal: cannot start pager "{pager}"')
                                                  ^
SyntaxError: invalid syntax
unxp@U16047:~/imx-yocto-bsp$

 

Best Regards

0 Kudos

1,369 Views
Enuwai
Contributor III

Tried on Ubuntu 20.04.5, repo init completes without issue.


However, when I run "bitbake core-image-base", I get the following error.

#error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."

 

0 Kudos