LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Password
Gentoo This forum is for the discussion of Gentoo Linux.

Notices


Reply
  Search this Thread
Old 01-19-2015, 11:07 AM   #1
sumanta_x86
LQ Newbie
 
Registered: Jan 2015
Posts: 3

Rep: Reputation: Disabled
Can't compile kernel on x86 32bit while installing gentoo


Hello everyone, this is my first post in this forum, so apologies for any mistakes.

I was following this guide to install gentoo ( stage 3 tarball for i686 ) on my ubuntu14.04 machine. But after issuing the make -j2 && make modules_install command I am getting the following error.

Code:
sumanta-Lenovo-G570 linux # make -j2 && make modules_install
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
  SYSTBL  arch/x86/syscalls/../include/generated/asm/syscalls_32.h
  SYSHDR  arch/x86/syscalls/../include/generated/asm/unistd_32_ia32.h
  CHK     include/config/kernel.release
  UPD     include/config/kernel.release
  SYSHDR  arch/x86/syscalls/../include/generated/asm/unistd_64_x32.h
  WRAP    arch/x86/include/generated/asm/clkdev.h
  WRAP    arch/x86/include/generated/asm/cputime.h
  WRAP    arch/x86/include/generated/asm/early_ioremap.h
  WRAP    arch/x86/include/generated/asm/mcs_spinlock.h
  WRAP    arch/x86/include/generated/asm/scatterlist.h
  SYSTBL  arch/x86/syscalls/../include/generated/asm/syscalls_64.h
  CHK     include/generated/uapi/linux/version.h
  UPD     include/generated/uapi/linux/version.h
  SYSHDR  arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
  SYSHDR  arch/x86/syscalls/../include/generated/uapi/asm/unistd_64.h
  SYSHDR  arch/x86/syscalls/../include/generated/uapi/asm/unistd_x32.h
  CC      scripts/mod/devicetable-offsets.s
  HOSTCC  scripts/selinux/genheaders/genheaders
  MKELF   scripts/mod/elfconfig.h
  GEN     scripts/mod/devicetable-offsets.h
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/selinux/mdp/mdp
  HOSTCC  scripts/mod/sumversion.o
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/kallsyms
  HOSTLD  scripts/mod/modpost
  HOSTCC  scripts/pnmtologo
  HOSTCC  scripts/conmakehash
  HOSTCC  scripts/sortextable
  HOSTCC  arch/x86/tools/relocs_32.o
  HOSTCC  arch/x86/tools/relocs_64.o
  HOSTCC  arch/x86/tools/relocs_common.o
  HOSTLD  arch/x86/tools/relocs
  CC      kernel/bounds.s
  GEN     include/generated/bounds.h
  CC      arch/x86/kernel/asm-offsets.s
  GEN     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  CC      init/main.o
  HOSTCC  usr/gen_init_cpio
  GEN     usr/initramfs_data.cpio.gz
  AS      usr/initramfs_data.o
usr/initramfs_data.S:1:0: error: CPU you selected does not support x86-64 instruction set
 /*
 ^
scripts/Makefile.build:293: recipe for target 'usr/initramfs_data.o' failed
make[1]: *** [usr/initramfs_data.o] Error 1
Makefile:929: recipe for target 'usr' failed
make: *** [usr] Error 2
make: *** Waiting for unfinished jobs....
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/do_mounts.o
  CC      init/do_mounts_initrd.o
  CC      init/do_mounts_md.o
  CC      init/initramfs.o
  CC      init/calibrate.o
  CC      init/init_task.o
  CC      init/version.o
  LD      init/mounts.o
  LD      init/built-in.o
As the error is complaining about CPU arch, I confirmed my CPU architecture by executing the following command:

Code:
sumanta-Lenovo-G570 linux # uname -m
i686
In make menuconfig I tried to specify the processor arch as 32bit x86, but I didn't find any. Default was generic x86_64. So I tried every other arch from that menu ( new Xeon, old Xeon, even P4 ). Obviously none of them worked. Can you guys please help me out on this one?
 
Old 01-20-2015, 03:34 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
In make menuconfig select cpu as 'i686'. Are you using 32bit capable gcc and binutils.
 
Old 01-20-2015, 08:21 AM   #3
sumanta_x86
LQ Newbie
 
Registered: Jan 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hi veerain, thanks for your prompt reply.

1) In menuconfig there is no option to select i686!!! Instead existing options are:
()Opteron/Athlon64/Hammer/K8
()Intel P4/Older.. Xeon
()Core 2/newer Xeon
()Intel atom
(*)Generic-x86-64

2) How to determine whether gcc and binutils are of 32 or 64?
 
Old 01-20-2015, 12:44 PM   #4
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
During kernel building pass arch as i386. Like this

Code:
make ARCH=i386 menuconfig
make ARCH=i386
make ARCH=i386 modules_install
make ARCH=i386 firmware_install
For checking gcc support see if you can compile with -m32 switch.

For binutils run 'objcopy --info'.
 
1 members found this post helpful.
Old 01-21-2015, 09:11 AM   #5
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Double check you are using the right livecd for the arch you want. That'll simplify things a bit.

Other than that, maybe you imported a .config file from some other install?
 
Old 01-25-2015, 06:37 AM   #6
sumanta_x86
LQ Newbie
 
Registered: Jan 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thank you guys for your help. I was able to compile the kernel this time and after reboot I was greeted with gentoo terminal. But now I'm facing different issues.

1) I primarily use ubuntu on my machine and already it is dual booted with Windows xp.
But after I installed gentoo, grub is only offering me to boot into gentoo and some other
recovery mode( no ubuntu or windows ). So with a ubuntu live cd I had to re-install grub
to get back my old system. So how do I tripple boot my system with gentoo (if at all it is
possible)?

By the way, while installing grub for the gentoo partition I got the following messages.
Code:
sumanta-Lenovo-G570 / # grub2-install /dev/sda 
Installing for i386-pc platform.
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
Installation finished. No error reported.

sumanta-Lenovo-G570 / # grub2-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
Found linux image: /boot/kernel-2.6.24
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
device node not found
done
What does it mean?

2) When I was in the gentoo terminal I could log into it as root. But when I issued
startx it was showing no command found 'startx'!! So I tried to emerge xfree but it
was showing some 'package not found' error... What to do next?

P.S. Below is the output of the fdisk command to clarify the partitioning of my disk.
Code:
sumanta@sumanta-Lenovo-G570:~$ sudo fdisk -l /dev/sda
[sudo] password for sumanta: 

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0004a591

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63   102398309    51199123+   7  HPFS/NTFS/exFAT
Partition 1 does not start on physical sector boundary.
/dev/sda2       968499198   976771071     4135937    5  Extended
Partition 2 does not start on physical sector boundary.
/dev/sda3       102400000   493023231   195311616   83  Linux
/dev/sda4       493025280   959822154   233398437+  83  Linux
/dev/sda5       968499200   976771071     4135936   82  Linux swap / Solaris
Windows: /dev/sda1
Ubuntu: /dev/sda3
Gentoo: /dev/sda4
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Warning while compile kernel 2.9.32 on ubuntu 10.04 in 32bit system Lieyza Linux - Newbie 2 07-22-2012 12:47 AM
Cross compile linux kernel from x86 to powerpc has error smeezekitty Linux - Kernel 2 03-29-2010 03:13 PM
possible to compile a 32bit kernel on a 64bit os? Shadowmeph Linux - General 5 10-02-2008 06:07 AM
help me with gentoo kernel compile deepclutch Linux - Kernel 4 04-25-2006 01:56 PM
x86-64 Kernel compile ---> i only get 32-bit Ben2210 Linux - Hardware 1 07-09-2004 07:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo

All times are GMT -5. The time now is 04:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration