0

I'm relatively a newbie on linux. I'm trying to install GCC v 6.3.0 to use it with Eclipse neon.2 but, after successfully launched the srcdir/configure in my objdir (/usr/local/gcc-6.3.0), when I launch the sudo make bootstrap command in the terminal under objdir path I return this error:

/usr/include/asm/bitsperlong.h:4:42: 
fatal error: uapi/asm-generic/bitsperlong.h: no such file or directory
 #include <uapi/asm-generic/bitsperlong.h>

I tried also to install the linux-header-3.2.0-4-rt-amd64 and I'm working on Debian 8.7

too honest for this site
  • 12,050
  • 4
  • 30
  • 52
Luca
  • 1
  • 1
  • You should compile `GCC` under your home directory so you don't need to be `root` (unless you want to *install* it system wide). – Galik Mar 17 '17 at 20:02
  • What options did you pass to `configure`? And did you try just typing `make`? – Galik Mar 17 '17 at 20:14
  • Followed the instructions on GCC website who suggest to separate src and obj folders, giving /usr/local as the default objdir folder and not to install too deep in home 'cause in some system can generate issues. No options at all excpet for -lean option to save space on disk. Yes I tried but the error was the same. Now I'll try another installation on a VM in my home desktop – Luca Mar 18 '17 at 13:18
  • According to this: https://gcc.gnu.org/install/ you should use `--prefix=/usr/local` (by default) as a parameter to your configure script. I can't find where it says to put your build folder under `/usr/local` that is very unusual (I would say **wrong**). I would put the source code somewhere like `$HOME/dev/gcc` and use `$HOME/dev/gcc-build` as your `objdir` folder. Read through this page carefully noting the relevant configuration options: https://gcc.gnu.org/install/configure.html – Galik Mar 18 '17 at 15:07
  • I recently used these `configure` options for a (relatively) fast build: `--prefix=/opt/gcc-6.3.0 --program-suffix=-6.3.0 --enable-threads=posix --disable-bootstrap --enable-languages=c,c++ --disable-stage1-checking --disable-multilib` – Galik Mar 18 '17 at 15:10
  • The above config installs the compiler at `/opt/gcc-6.3.0/bin/g++-6.3.0`. – Galik Mar 18 '17 at 15:11
  • @Galik It seem I solved the problem reinstalling debian from the scratch, then quite all the prerequisites by hand and not only with the gcc release embedded script and at last installing g++-multilib. To be sure I don't miss anything this time I run everything under auto-apt. Is it normal that the compiling is taking more than 24 hours? – Luca Mar 25 '17 at 09:59
  • yes it seems normal, now the bootstrap is comparing stage 2 and 3. However I used a complete lean bootstrap always under auto-apt. – Luca Mar 25 '17 at 10:11

0 Answers0