Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

u-boot-sunxi fails to compile with recent gcc versions #16

Open
jh3141 opened this issue Aug 12, 2016 · 3 comments
Open

u-boot-sunxi fails to compile with recent gcc versions #16

jh3141 opened this issue Aug 12, 2016 · 3 comments

Comments

@jh3141
Copy link

jh3141 commented Aug 12, 2016

In file included from /home/user/sunxi-bsp/u-boot-sunxi/include/linux/compiler.h:40:0,
                 from /home/user/sunxi-bsp/u-boot-sunxi/include/linux/byteorder/little_endian.h:12,
                 from /home/user/sunxi-bsp/build/a13-olinuxino-u-boot/include2/asm/byteorder.h:29,
                 from /home/user/sunxi-bsp/u-boot-sunxi/include/compiler.h:112,
                 from /home/user/sunxi-bsp/u-boot-sunxi/include/image.h:19,
                 from /home/user/sunxi-bsp/u-boot-sunxi/include/common.h:100,
                 from /home/user/sunxi-bsp/u-boot-sunxi/lib/asm-offsets.c:15:
/home/user/sunxi-bsp/u-boot-sunxi/include/linux/compiler-gcc.h:93:30: fatal error: linux/compiler-gcc6.h: No such file or directory
 #include gcc_header(__GNUC__)
                              ^
compilation terminated.

There are no compiler support files for either gcc 5 or 6, which according to apt-cache search gcc | grep gnueabi means it can no longer be compiled with built in packages in current versions of Debian, which only include cross compilers for gcc versions 5 and 6.

@jor3l
Copy link

jor3l commented Nov 8, 2016

Any solution to this? Thanks

@gediz
Copy link

gediz commented May 17, 2019

Issue is way too old but I was stuck on the same problem and solved it with an inelegant way.

I'm using Ubuntu 18.04.2 LTS and if I'm not mistaken gcc-4.9-arm-linux-gnueabi is the most recent and suitable for use version. I was unable to directly install it via apt so I had to append the following line to my /etc/apt/sources.list;

deb http://cz.archive.ubuntu.com/ubuntu xenial main universe
then
sudo apt update and sudo apt install gcc-4.9-arm-linux-gnueabi to install the package.

To add it as an alternative:
sudo update-alternatives --install /usr/bin/arm-linux-gnueabi-gcc arm-linux-gnueabi-gcc /usr/bin/arm-linux-gnueabi-gcc-4.9 100

Then finally

gediz@x ~ sudo update-alternatives --config  arm-linux-gnueabi-gcc
There are 2 choices for the alternative arm-linux-gnueabi-gcc (providing /usr/bin/arm-linux-gnueabi-gcc).

  Selection    Path                                Priority   Status
------------------------------------------------------------
  0            /usr/bin/arm-linux-gnueabi-gcc-4.9   100       auto mode
  1            /usr/bin/arm-linux-gnueabi-gcc-4.9   100       manual mode
* 2            /usr/bin/arm-linux-gnueabi-gcc-7     50        manual mode

Press <enter> to keep the current choice[*], or type selection number: 0
update-alternatives: using /usr/bin/arm-linux-gnueabi-gcc-4.9 to provide /usr/bin/arm-linux-gnueabi-gcc (arm-linux-gnueabi-gcc) in auto mode

@mikemc311
Copy link

mikemc311 commented May 17, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants