# installazione gentoo x86_64 - emerge non compila [risolto]

## bi-andrea

volevo usare genkernel per compilare il kernel ma per una macchina adm64 da una macchina x86, qual'è la riga da configurare in genkernel.conf?

----------

## djinnZ

ma salvarti la conf come esempio...

genkernel --arch-override= o imposti ARCH_OVERRIDE per forzare amd64

ma se devi agire in crossbuild ci sono delle variabili apposite nella sezione

 */etc/genkernel.conf wrote:*   

> # =========Low Level Compile Settings=========
> 
> #
> 
> # GNU Make to use for kernel.  See also the --kernel-make command line option.
> ...

 

----------

## bi-andrea

giusto basta mettere .conf nel posto giusto dove lo cerca genkernel, ma siccome non riesco a installarlo volevo mettere un kernel per avere un sistema senza andare in chroot.

ho sistemato genkernel.conf e si presenta così

```
# =========Low Level Compile Settings=========

#

# GNU Make to use for kernel.  See also the --kernel-make command line option.

KERNEL_MAKE="make"

# Compiler to use for the kernel (e.g. distcc).  See also the --kernel-cc

# command line option.

KERNEL_CC="gcc"

# Assembler to use for the kernel.  See also the --kernel-as command line

# option.

#KERNEL_AS="as"

# Linker to use for the kernel.  See also the --kernel-ld command line option.

#KERNEL_LD="ld"

# GNU Make to use for the utilities.  See also the --utils-make command line

# option.

UTILS_MAKE="make"

# Compiler to use for the utilities (e.g. distcc).  See also the --utils-cc

# command line option.

UTILS_CC="gcc"

# Assembler to use for the utilities.  See also the --utils-as command line

# option.

#UTILS_AS="as"

# Linker to use for the utilities.  See also the --utils-ld command line

# option.

#UTILS_LD="ld"

# Common prefix of cros compile commands

UTILS_CROSS_COMPILE="x86_64-pc-linux-gnu"

# Value of CROSS_COMPILE utils variable

# during kernel compilation

KERNEL_CROSS_COMPILE="x86_64-pc-linux-gnu"

```

in resto è rimasto immutato, ho digitato l'unico 64 che mi acetta

```
genkernel --arch-override=ia64 all
```

e mi ha restituito questo

```
genkernel --arch-override=ia64 all

* Gentoo Linux Genkernel; Version 3.4.45

* Running with options: --arch-override=ia64 all

* Using genkernel.conf from /etc/genkernel.conf

* Sourcing arch-specific config.sh from /usr/share/genkernel/arch/ia64/config.sh ..

* Sourcing arch-specific modules_load from /usr/share/genkernel/arch/ia64/modules_load ..

* Linux Kernel 3.7.10-gentoo for ia64...

* .. with config file /usr/share/genkernel/arch/ia64/kernel-config

* kernel: Using config from /usr/share/genkernel/arch/ia64/kernel-config

*         Previous config backed up to .config--2013-06-25--20-30-12.bak

* kernel: >> Running mrproper...

*         >> Running oldconfig...

* kernel: >> Cleaning...

* ERROR: Failed to compile the "prepare" target...

* 

* -- Grepping log... --

* 

*  SHIPPED scripts/kconfig/zconf.lex.c

*  SHIPPED scripts/kconfig/zconf.hash.c

*  HOSTCC  scripts/kconfig/zconf.tab.o

*  HOSTLD  scripts/kconfig/conf

*scripts/kconfig/conf --oldconfig Kconfig

*.config:907:warning: override: reassigning to symbol USB_ARCH_HAS_HCD

*.config:908:warning: override: reassigning to symbol USB_ARCH_HAS_OHCI

*.config:909:warning: override: reassigning to symbol USB_ARCH_HAS_EHCI

*.config:910:warning: override: reassigning to symbol USB

*.config:911:warning: override: reassigning to symbol USB_DEBUG

*--

*choice[1-5?]: Memory model

*> 1. Flat Memory (FLATMEM_MANUAL)

*  2. Sparse Memory (SPARSEMEM_MANUAL)

*choice[1-2]: 1

*Allow for memory compaction (COMPACTION) [Y/n/?] (NEW) Page migration (MIGRATION) [Y/?] y

*Enable KSM for page merging (KSM) [N/y/?] (NEW) Low address space to protect from user allocation (DEFAULT_MMAP_MIN_ADDR) [4096] (NEW) Enable recovery from hardware memory errors (MEMORY_FAILURE) [N/y/?] (NEW) Transparent Hugepage Support (TRANSPARENT_HUGEPAGE) [N/y/?] (NEW) Cross Memory Support (CROSS_MEMORY_ATTACH) [Y/n/?] (NEW) Enable cleancache driver to cache clean pages if tmem is present (CLEANCACHE) [N/y/?] (NEW) Enable frontswap to cache swap pages if tmem is present (FRONTSWAP) [N/y/?] (NEW) Allocate 3rd-level pagetables from highmem (HIGHPTE) [N/y/?] (NEW) Check for low memory corruption (X86_CHECK_BIOS_CORRUPTION) [N/y/?] (NEW) Amount of low memory, in kilobytes, to reserve for the BIOS (X86_RESERVE_LOW) [64] (NEW) Math emulation (MATH_EMULATION) [N/y/?] (NEW) MTRR (Memory Type Range Register) support (MTRR) [Y/n/?] (NEW)   MTRR cleanup support (MTRR_SANITIZER) [Y/n/?] (NEW)     MTRR cleanup enable value (0-1) (MTRR_SANITIZER_ENABLE_DEFAULT) [0] (NEW)     MTRR cleanup spare reg num (0-7) (MTRR_SANITIZER_SPARE_REG_NR_DEFAULT) [1] (NEW)   x86 PAT support (X86_PAT) [Y/n/?] (NEW) x86 architectural random number generator (ARCH_RANDOM) [Y/n/?] (NEW) Supervisor Mode Access Prevention (X86_SMAP) [Y/n/?] (NEW) EFI runtime service support (EFI) [Y/n/?] y

*--

*  Processor (ACPI_PROCESSOR) [Y/n/m/?] y

*  Processor Aggregator (ACPI_PROCESSOR_AGGREGATOR) [N/m/y/?] (NEW)   Thermal Zone (ACPI_THERMAL) [Y/n/m/?] y

*  Disable ACPI for systems before Jan 1st this year (ACPI_BLACKLIST_YEAR) [0] 0

*  Debug Statements (ACPI_DEBUG) [N/y/?] n

*  PCI slot detection driver (ACPI_PCI_SLOT) [N/m/y/?] (NEW)   Power Management Timer Support (X86_PM_TIMER) [Y/n/?] (NEW)   Container and Module Devices (EXPERIMENTAL) (ACPI_CONTAINER) [Y/?] y

*  Smart Battery System (ACPI_SBS) [N/m/y/?] (NEW)   Hardware Error Device (ACPI_HED) [N/m/y/?] (NEW)   Allow ACPI methods to be inserted/replaced at run time (ACPI_CUSTOM_METHOD) [N/m/y/?] (NEW)   Boottime Graphics Resource Table support (ACPI_BGRT) [N/y/?] (NEW)   ACPI Platform Error Interface (APEI) (ACPI_APEI) [N/y/?] (NEW) *

*--

*    2. MMConfig (PCI_GOMMCONFIG) (NEW)

*    3. Direct (PCI_GODIRECT) (NEW)[/quote]

*  > 4. Any (PCI_GOANY) (NEW)

*  choice[1-4?]:   Read CNB20LE Host Bridge Windows (PCI_CNB20LE_QUIRK) [N/y/?] (NEW)   PCI Express support (PCIEPORTBUS) [Y/n/?] y

*    PCI Express Hotplug driver (HOTPLUG_PCI_PCIE) [Y/n/m/?] y

*    Root Port Advanced Error Reporting support (PCIEAER) [Y/n/?] y

*      PCI Express ECRC settings control (PCIE_ECRC) [N/y/?] (NEW)       PCIe AER error injector support (PCIEAER_INJECT) [N/m/y/?] (NEW)     PCI Express ASPM control (PCIEASPM) [Y/n/?] (NEW)       Debug PCI Express ASPM (PCIEASPM_DEBUG) [N/y/?] (NEW)       Default ASPM policy

*--

*  *

*  * Please see Documentation/ide/ide.txt for help/info on IDE drives

*  *

*  Support for SATA (deprecated; conflicts with libata SATA driver) (BLK_DEV_IDE_SATA) [N/y/?] n

*  generic ATA/ATAPI disk support (IDE_GD) [Y/n/m/?] (NEW)     ATA disk support (IDE_GD_ATA) [Y/n/?] (NEW)     ATAPI floppy support (IDE_GD_ATAPI) [N/y/?] (NEW)   Include IDE/ATAPI CDROM support (BLK_DEV_IDECD) [Y/n/m/?] y

*    Verbose error logging for IDE/ATAPI CDROM driver (BLK_DEV_IDECD_VERBOSE_ERRORS) [Y/n/?] (NEW)   Include IDE/ATAPI TAPE support (BLK_DEV_IDETAPE) [N/m/y/?] n

*--

*SCSI OnStream SC-x0 tape support (CHR_DEV_OSST) [N/m/y/?] n

*SCSI CDROM support (BLK_DEV_SR) [N/m/y/?] n

*SCSI generic support (CHR_DEV_SG) [Y/n/m/?] y

*SCSI media changer support (CHR_DEV_SCH) [N/m/y/?] n

*Probe all LUNs on each SCSI device (SCSI_MULTI_LUN) [Y/n/?] y

*Verbose SCSI error reporting (kernel size +=12K) (SCSI_CONSTANTS) [Y/n/?] y

*--

*

*Sony MemoryStick card support (EXPERIMENTAL) (MEMSTICK) [N/m/y/?] (NEW) *

* Accessibility support

*

*Accessibility support (ACCESSIBILITY) [N/y/?] (NEW) *

* EDAC (Error Detection And Correction) reporting

*

*EDAC (Error Detection And Correction) reporting (EDAC) [N/y/?] (NEW) *

*--

*OCFS2 file system support (OCFS2_FS) [M/n/?] m

*  O2CB Kernelspace Clustering (OCFS2_FS_O2CB) [M/n/?] (NEW)   OCFS2 statistics (OCFS2_FS_STATS) [Y/n/?] (NEW)   OCFS2 logging support (OCFS2_DEBUG_MASKLOG) [Y/n/?] y

*  OCFS2 expensive checks (OCFS2_DEBUG_FS) [N/y/?] (NEW) Btrfs filesystem (EXPERIMENTAL) Unstable disk format (BTRFS_FS) [N/m/y/?] (NEW) NILFS2 file system support (EXPERIMENTAL) (NILFS2_FS) [N/m/y/?] (NEW) Enable POSIX file locking API (FILE_LOCKING) [Y/n/?] (NEW) Dnotify support (DNOTIFY) [Y/n/?] y

*Inotify support for userspace (INOTIFY_USER) [Y/n/?] y

*Filesystem wide access notification (FANOTIFY) [N/y/?] (NEW) Quota support (QUOTA) [Y/?] y

*Report quota messages through netlink interface (QUOTA_NETLINK_INTERFACE) [N/y/?] (NEW) Print quota warnings to console (OBSOLETE) (PRINT_QUOTA_WARNING) [Y/n/?] (NEW) Additional quota sanity checks (QUOTA_DEBUG) [N/y/?] (NEW) Old quota format support (QFMT_V1) [N/m/y/?] (NEW) Quota format vfsv0 and vfsv1 support (QFMT_V2) [N/m/y/?] (NEW) Kernel automounter version 4 support (also supports v3) (AUTOFS4_FS) [N/m/y/?] n

*--

*Stack utilization instrumentation (DEBUG_STACK_USAGE) [N/y/?] (NEW) kobject debugging (DEBUG_KOBJECT) [N/y/?] n

*Highmem debugging (DEBUG_HIGHMEM) [N/y/?] (NEW) Verbose BUG() reporting (adds 70K) (DEBUG_BUGVERBOSE) [Y/n/?] (NEW) Compile the kernel with debug info (DEBUG_INFO) [N/y/?] n

*Debug VM (DEBUG_VM) [N/y/?] n

*Debug VM translations (DEBUG_VIRTUAL) [N/y/?] (NEW) Debug filesystem writers count (DEBUG_WRITECOUNT) [N/y/?] (NEW) Debug memory initialisation (DEBUG_MEMORY_INIT) [N/y/?] (NEW) Debug linked list manipulation (DEBUG_LIST) [N/y/?] n

*Linked list sorting test (TEST_LIST_SORT) [N/y/?] (NEW) Debug SG table operations (DEBUG_SG) [N/y/?] (NEW) Debug notifier call chains (DEBUG_NOTIFIERS) [N/y/?] (NEW) Debug credential management (DEBUG_CREDENTIALS) [N/y/?] (NEW) Compile the kernel with frame pointers (FRAME_POINTER) [Y/n/?] (NEW) Delay each boot printk message by N milliseconds (BOOT_PRINTK_DELAY) [N/y/?] (NEW) torture tests for RCU (RCU_TORTURE_TEST) [N/m/y/?] n

*RCU CPU stall timeout in seconds (RCU_CPU_STALL_TIMEOUT) [60] (NEW) Print additional diagnostics on RCU CPU stall (RCU_CPU_STALL_INFO) [N/y/?] (NEW) Enable tracing for RCU (RCU_TRACE) [N/y/?] (NEW) Self test for the backtrace code (BACKTRACE_SELF_TEST) [N/m/y/?] (NEW) Force extended block device numbers and spread them (DEBUG_BLOCK_EXT_DEVT) [N/y/?] (NEW) Force weak per-cpu definitions (DEBUG_FORCE_WEAK_PER_CPU) [N/y/?] (NEW) Debug access to per_cpu maps (DEBUG_PER_CPU_MAPS) [N/y/?] (NEW) Linux Kernel Dump Test Tool Module (LKDTM) [N/m/y/?] (NEW) Notifier error injection (NOTIFIER_ERROR_INJECTION) [N/m/y/?] (NEW) Fault-injection framework (FAULT_INJECTION) [N/y/?] n

*--

* Running with options: --arch-override=ia64 all

* Using genkernel.conf from /etc/genkernel.conf

* Sourcing arch-specific config.sh from /usr/share/genkernel/arch/ia64/config.sh ..

* Sourcing arch-specific modules_load from /usr/share/genkernel/arch/ia64/modules_load ..

*

* ERROR: Failed to compile the "prepare" target...

* 

* -- End log... --

* 

* Please consult /var/log/genkernel.log for more information and any

* errors that were reported above.

* 

* Report any genkernel bugs to bugs.gentoo.org and

* assign your bug to genkernel@gentoo.org. Please include

* as much information as you can in your bug report; attaching

* /var/log/genkernel.log so that your issue can be dealt with effectively.

* 

* Please do *not* report compilation failures as genkernel bugs!
```

----------

## djinnZ

è da una vita che non provo cose del genere ma...

--arch-override=x86_64 (non mi pare che ia64 sia supportato) implica 

```
euse -E multitarget ; emerge -DNu @world
```

e non so che altro per abilitare il compilatore al crosslinking.

Nel dubbio emerge -1 genkernel e ricrei i file di conf a partire da zero (non è che hai seguito quel suggerimento imbecille della guida di sovrascrivere il repository delle configurazioni?!).

Se hai copiato solo l'estratto in genkernel.conf è ovvio che ti da errore.

ma non credo che possa funzionare ormai e quindi devi prima leggerti

http://www.gentoo.org/proj/it/base/embedded/handbook/?part=1&chap=2

ed infine

http://www.gentoo.org/proj/it/base/embedded/handbook/?part=1&chap=4

----------

## bi-andrea

ho capito come mi devo muovere e ringrazio per i consigli, ma non ho il tempo per farlo adesso, quindi pensavo di vedere direttamente nella gentoo_amd64 se si risolve il problema....

io digito 

 *Quote:*   

> emerge gentoo-sources

 

ho indirizzato la schermata in un file e si presenta così

 *Quote:*   

> 
> 
>  * IMPORTANT: 5 news items need reading for repository 'gentoo'.
> 
>  * Use eselect news to read news items.
> ...

 

il mio /etc/portage/make.conf

 *Quote:*   

> 
> 
> # These settings were set by the catalyst build script that automatically
> 
> # built this stage.
> ...

 

il problema è quando arriva quì

 *Quote:*   

> 
> 
> checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
> 
> checking for C compiler default output file name... configure: error: C compiler cannot create executables
> ...

 

quindi presumo make.conf impostato male

----------

## bi-andrea

ho sistemato e installato 1089 pacchetti in un colpo senza interruzioni

```
####################################################

## ATTENTION: THIS IS THE MAKE.CONF ON THE LIVECD ##

## PLEASE EDIT /mnt/gentoo/etc/make.conf INSTEAD  ##

####################################################

# These settings were set by the catalyst build script that automatically

# built this stage.

# Please consult /usr/share/portage/config/make.conf.example for a more

# detailed example.

CFLAGS="-O2 -pipe"

CXXFLAGS="-O2 -pipe"

# WARNING: Changing your CHOST is not something that should be done lightly.

# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.

CHOST="x86_64-pc-linux-gnu"

# These are the USE flags that were used in addition to what is provided by the

# profile used for building.

USE="X consolekit kde semantic-desktop accessibility nautilus eds avahi vino gnome-keyring networkmanager policykit libnotify alsa nouveau jpeg gif tiff opengl -hal dbus cairo qt3support mmx bindist sse sse2 branding livecd loop-aes socks5 gnome qt4 -x264 -mp3 -mp4 -mpeg2 -mpeg4pt2 -xvid -a52 -real -dvdnav -faac -amr  atm fbcondecor mng png portaudio truetype usb"

VIDEO_CARDS="qxl virtualbox nouveau glint intel mach64 mga neomagic nv r128 radeon savage tdfx trident vesa via vmware cirrus ast chips i128 i740 imstt s3virge tseng v4l vermilion"

INPUT_DEVICES="evdev keyboard mouse synaptics virtualbox ps2mouse"

MAKEOPTS=-j2

#LINGUAS="it"

#PORTDIR_OVERLAY="/usr/local/portage"

ACCEPT_LICENSE="@BINARY-REDISTRIBUTABLE"

#KDIR=/usr/src/linux

#XFCE_PLUGINS="menu"

#source /var/lib/layman/make.conf

FEATURES="buildpkg buildpkgonly buildsyspkg userfetch"

#FEATURES="-userfetch candy"

ACCEPT_KEYWORDS="amd64"

VIDEO_CARDS="intel nouveau radeon vmware"

SYNC=rsync://rsync.gentoo.org/gentoo-portage

PYTHON_TARGETS="python2_5 python2_6 python2_7 python3_1 python3_2" 

PYTHON_SINGLE_TARGET="python2_6"

DRACUT_MODULES="plymounth"

LDFLAGS="${LDFLAGS}"

STAGE1_CFLAGS="${STAGE1_CFLAGS}"

LIBPATH="${LIBPATH}"

BOOT_CFLAGS="${BOOT_CFLAGS}"
```

----------

