OpenWrt Forum Archive

Topic: [SOLVED] Error build 15.05 with gcc 6

The content of this topic has been archived on 15 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello,

I'm trying to build 15.05 on my Manjaro system with gcc 6.1.1 but I get an error which I think is related to gcc version:

include/linux/compiler-gcc.h:114:30: fatal error: linux/compiler-gcc6.h: No such file or directory

Any help, please?

(Last edited by jss on 20 May 2016, 00:09)

It seems to be a difficult question once nobody replies.

Never mind, I made a VBox machine running Debian Jessie and compiled it, not with shared folders though, it doesn't work.

Thanks anyway.

I have build mine on VBox running Jessie and have not seen this error. So I doubt Debian is at fault here.

I didn't say it was Debian's fault, I said it doesn't work with VirtualBox shared folders, meaning, your building tree cannot reside on a shared folder because the building process uses symlinks and this doesn't work on a sf.

Read this: https://www.virtualbox.org/ticket/10085#comment:14

But, even executing the extra-data command referred above and allowing symlinks, you will face another problems when tar doesn't have permission to work.

As I said, I also compiled with Debian on VirtualBox, but with the building tree on the main disk of the VM.

So, Debian is not at fault although I prefer systemd free Manjaro-openrc.

Thank you for the pointers.

Nevertheless, as I have my target built now, I guess that on my next build gcc 6 will have hit CC already. So, I won't allocate any more time to this now.

It would be great if somebody backported those to 15.05.

I prefer a chroot environment over VM on linux host system.
Here few hints (mini howto)

Install debian debootstrap
now switch to root user
su - root
#cd in a directory with enough disk space i prefer home root /home

cd /home

debootstrap --arch=i386 stable ./chroot-stable http://httpredir.debian.org/debian

wait to finish the base install then
just copy paste this to a terminal

cd /home/chroot-stable/
mount -t proc none proc
mount --rbind /sys sys
mount --rbind /dev dev
# login on the debian system 
linux32 env -i HOME=/root TERM=$TERM $(which chroot) . bash -l 
cat <<EOF > /etc/apt/sources.list
#------------------------------------------------------------------------------#
#                   OFFICIAL DEBIAN REPOS
#------------------------------------------------------------------------------#

###### Debian Main Repos
deb http://ftp.debian.org/debian/ jessie main contrib non-free
deb-src http://ftp.debian.org/debian/ jessie main contrib non-free
###### Debian Update Repos
deb http://ftp.debian.org/debian/ jessie-proposed-updates main contrib non-free
deb-src http://ftp.debian.org/debian/ jessie-proposed-updates main contrib non-free
EOF
grep -v rootfs /proc/mounts > /etc/mtab
apt-get update
apt-get upgrade

apt-get install eatmydata bash-completion
#this speed up apt-get package install few thousand % faster ^^ if a normal hard disk is used
dpkg-divert --rename /usr/bin/dpkg
cat >/usr/bin/dpkg <<-EOT
#!/bin/sh
exec eatmydata /usr/bin/dpkg.distrib "\$@"
EOT
chmod +x /usr/bin/dpkg

apt-get install python python2.7 python3 perl imagemagick subversion git gcc g++ binutils autoconf automake libtool-bin make bzip2 libncurses5-dev libreadline-dev zlib1g-dev flex bison patch texinfo tofrodos gettext pkg-config realpath libstring-crc32-perl gawk libusb-dev unzip intltool libacl1-dev libcap-dev libc6-dev libglib2.0-dev unzip wget curl zip libssl-dev bc
adduser builduser

then switch to a normal user

su - builduser

now install and build your openwrt with full host performance

For relogin after a system restart just this is needed

su - root
cd /home/chroot-stable/
mount -t proc none proc
mount --rbind /sys sys
mount --rbind /dev dev
# login on the debian system 
linux32 env -i HOME=/root TERM=$TERM chroot . bash -l 
su - builduser

(Last edited by trismo on 18 Jul 2017, 06:25)

makro wrote:

There were a few commits for GCC 6 support [1][2], but they haven't been backported to CC. They would probably help.

[1]: Had to remove url not allowed to post it
[2]: Had to remove url not allowed to post it

I do not understand how to use the second fix of this post I did not find the file that I have to modify

Someone could explain it to me

Thanks

The discussion might have continued from here.