LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 03-29-2015, 07:47 PM   #1
Xenanthropy
Member
 
Registered: Mar 2015
Posts: 34

Rep: Reputation: Disabled
Question Error compiling Linux-3.14.21 kernel for CLFS Version GIT-20150207-x86_64-Multilib


I've had one problem so far which I made another thread for and is now solved, but i've hit another rough patch at the very end, while trying to compile the linux kernel to get ready to boot CLFS. I patched it with the provided patch, which went fine. Ran
Code:
make mrproper
to clean out the kernel tree.
I then used
Code:
make defconfig
to generate just a generic config for the kernel, then made changes to it based on the recommended settings from "/usr/share/doc/systemd-213/README":

Quote:
General setup --->[*] open by fhandle syscalls (CONFIG_FHANDLE)
[ ] Auditing support (CONFIG_AUDIT)[*] Control Group support (CONFIG_CGROUPS)
Processor type and features --->[*] Enable seccomp to safely compute untrusted bytecode (CONFIG_SECCOMP)
Networking support --->
Networking options --->
<*> The IPv6 protocol (CONFIG_IPV6)
Device Drivers --->
Generic Driver Options --->
() path to uevent helper (CONFIG_UEVENT_HELPER_PATH)[*] Maintain a devtmpfs filesystem to mount at /dev (CONFIG_DEVTMPFS)
[ ] Fallback user-helper invocation for firmware loading (CONFIG_FW_LOADER_USER_HELPER)
File systems --->[*] Inotify support for userspace (CONFIG_FSNOTIFY)
<*> Kernel automounter version 4 support (also supports v3) (CONFIG_AUTOFS4_FS)
Pseudo filesystems --->[*] Tmpfs POSIX Access Control Lists (CONFIG_TMPFS_POSIX_ACL)[*] Tmpfs extended attributes (CONFIG_TMPFS_XATTR)
Firmware Drivers --->
EFI (Extensible Firmware Interface) Support --->
<*> EFI Variable Support via sysfs (CONFIG_EFI_VARS)
-*- Enable the block layer ---> (CONFIG_BLOCK)
Partition Types --->[*] Advanced partition selection (CONFIG_PARTITION_ADVANCED)[*] EFI GUID Partition support (CONFIG_EFI_PARTITION)
Kernel Hacking --->[*] Collect scheduler debugging info (CONFIG_SCHED_DEBUG)[*] Collect scheduler statistics (CONFIG_SCHEDSTATS)
Then, once I run 'make', this is the output:

Code:
root:/sources/linux-3.14# make
scripts/kconfig/conf --silentoldconfig Kconfig
#
# configuration written to .config
#
  SYSHDR  arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h
  SYSHDR  arch/x86/syscalls/../include/generated/uapi/asm/unistd_64.h
  SYSHDR  arch/x86/syscalls/../include/generated/uapi/asm/unistd_x32.h
  SYSTBL  arch/x86/syscalls/../include/generated/asm/syscalls_32.h
  SYSHDR  arch/x86/syscalls/../include/generated/asm/unistd_32_ia32.h
  SYSHDR  arch/x86/syscalls/../include/generated/asm/unistd_64_x32.h
  SYSTBL  arch/x86/syscalls/../include/generated/asm/syscalls_64.h
  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
  CHK     include/config/kernel.release
  UPD     include/config/kernel.release
  WRAP    arch/x86/include/generated/asm/clkdev.h
  CHK     include/generated/uapi/linux/version.h
  UPD     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  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      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
  MKELF   scripts/mod/elfconfig.h
  CC      scripts/mod/devicetable-offsets.s
  GEN     scripts/mod/devicetable-offsets.h
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTLD  scripts/mod/modpost
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/pnmtologo
  HOSTCC  scripts/conmakehash
  HOSTCC  scripts/sortextable
  CC      init/main.o
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/version.o
  CC      init/do_mounts.o
  CC      init/do_mounts_initrd.o
  CC      init/do_mounts_md.o
  LD      init/mounts.o
  CC      init/initramfs.o
  CC      init/calibrate.o
  CC      init/init_task.o
  LD      init/built-in.o
  HOSTCC  usr/gen_init_cpio
  GEN     usr/initramfs_data.cpio.gz
  AS      usr/initramfs_data.o
  LD      usr/built-in.o
  LD      arch/x86/crypto/built-in.o
  AS      arch/x86/ia32/ia32entry.o
  CC      arch/x86/ia32/sys_ia32.o
  CC      arch/x86/ia32/ia32_signal.o
  CC      arch/x86/ia32/nosyscall.o
  CC      arch/x86/ia32/syscall_ia32.o
  LD      arch/x86/ia32/built-in.o
  CC      arch/x86/kernel/process_64.o
  CC      arch/x86/kernel/signal.o
  AS      arch/x86/kernel/entry_64.o
  CC      arch/x86/kernel/traps.o
  CC      arch/x86/kernel/irq.o
  CC      arch/x86/kernel/irq_64.o
  CC      arch/x86/kernel/dumpstack_64.o
  CC      arch/x86/kernel/time.o
  CC      arch/x86/kernel/ioport.o
  CC      arch/x86/kernel/ldt.o
  CC      arch/x86/kernel/dumpstack.o
  CC      arch/x86/kernel/nmi.o
  CC      arch/x86/kernel/setup.o
  CC      arch/x86/kernel/x86_init.o
  CC      arch/x86/kernel/i8259.o
  CC      arch/x86/kernel/irqinit.o
  CC      arch/x86/kernel/jump_label.o
  CC      arch/x86/kernel/irq_work.o
  CC      arch/x86/kernel/probe_roms.o
  CC      arch/x86/kernel/sys_x86_64.o
  CC      arch/x86/kernel/x8664_ksyms_64.o
  CC      arch/x86/kernel/syscall_64.o
  CC      arch/x86/kernel/vsyscall_64.o
  AS      arch/x86/kernel/vsyscall_emu_64.o
  CC      arch/x86/kernel/espfix_64.o
  CC      arch/x86/kernel/ksysfs.o
  CC      arch/x86/kernel/bootflag.o
  CC      arch/x86/kernel/e820.o
  CC      arch/x86/kernel/pci-dma.o
  CC      arch/x86/kernel/quirks.o
  CC      arch/x86/kernel/topology.o
  CC      arch/x86/kernel/kdebugfs.o
  CC      arch/x86/kernel/alternative.o
  CC      arch/x86/kernel/i8253.o
  CC      arch/x86/kernel/pci-nommu.o
  CC      arch/x86/kernel/hw_breakpoint.o
  CC      arch/x86/kernel/tsc.o
  CC      arch/x86/kernel/tsc_msr.o
  CC      arch/x86/kernel/io_delay.o
  CC      arch/x86/kernel/rtc.o
  CC      arch/x86/kernel/pci-iommu_table.o
  CC      arch/x86/kernel/resource.o
  CC      arch/x86/kernel/process.o
  CC      arch/x86/kernel/i387.o
  CC      arch/x86/kernel/xsave.o
  CC      arch/x86/kernel/ptrace.o
  CC      arch/x86/kernel/tls.o
  CC      arch/x86/kernel/step.o
  CC      arch/x86/kernel/i8237.o
  CC      arch/x86/kernel/stacktrace.o
  CC      arch/x86/kernel/acpi/boot.o
  CC      arch/x86/kernel/acpi/sleep.o
  AS      arch/x86/kernel/acpi/wakeup_64.o
  CC      arch/x86/kernel/acpi/cstate.o
  LD      arch/x86/kernel/acpi/built-in.o
  CC      arch/x86/kernel/apic/apic.o
  CC      arch/x86/kernel/apic/apic_noop.o
  CC      arch/x86/kernel/apic/ipi.o
  CC      arch/x86/kernel/apic/hw_nmi.o
  CC      arch/x86/kernel/apic/io_apic.o
  CC      arch/x86/kernel/apic/apic_flat_64.o
  CC      arch/x86/kernel/apic/probe_64.o
  LD      arch/x86/kernel/apic/built-in.o
  CC      arch/x86/kernel/cpu/intel_cacheinfo.o
  CC      arch/x86/kernel/cpu/scattered.o
  CC      arch/x86/kernel/cpu/topology.o
  CC      arch/x86/kernel/cpu/proc.o
  MKCAP   arch/x86/kernel/cpu/capflags.c
  CC      arch/x86/kernel/cpu/capflags.o
  CC      arch/x86/kernel/cpu/powerflags.o
  CC      arch/x86/kernel/cpu/common.o
  CC      arch/x86/kernel/cpu/rdrand.o
  CC      arch/x86/kernel/cpu/match.o
  CC      arch/x86/kernel/cpu/bugs_64.o
  CC      arch/x86/kernel/cpu/intel.o
  CC      arch/x86/kernel/cpu/amd.o
  CC      arch/x86/kernel/cpu/centaur.o
  CC      arch/x86/kernel/cpu/perf_event.o
  CC      arch/x86/kernel/cpu/perf_event_amd.o
  CC      arch/x86/kernel/cpu/perf_event_amd_uncore.o
  CC      arch/x86/kernel/cpu/perf_event_amd_iommu.o
  CC      arch/x86/kernel/cpu/perf_event_p6.o
  CC      arch/x86/kernel/cpu/perf_event_knc.o
  CC      arch/x86/kernel/cpu/perf_event_p4.o
  CC      arch/x86/kernel/cpu/perf_event_intel_lbr.o
  CC      arch/x86/kernel/cpu/perf_event_intel_ds.o
  CC      arch/x86/kernel/cpu/perf_event_intel.o
  CC      arch/x86/kernel/cpu/perf_event_intel_uncore.o
  CC      arch/x86/kernel/cpu/perf_event_intel_rapl.o
  CC      arch/x86/kernel/cpu/mcheck/mce.o
  CC      arch/x86/kernel/cpu/mcheck/mce-severity.o
  CC      arch/x86/kernel/cpu/mcheck/mce_intel.o
  CC      arch/x86/kernel/cpu/mcheck/mce_amd.o
  CC      arch/x86/kernel/cpu/mcheck/threshold.o
  CC      arch/x86/kernel/cpu/mcheck/therm_throt.o
  LD      arch/x86/kernel/cpu/mcheck/built-in.o
  CC      arch/x86/kernel/cpu/microcode/core.o
  CC      arch/x86/kernel/cpu/microcode/intel.o
  CC      arch/x86/kernel/cpu/microcode/intel_lib.o
  CC      arch/x86/kernel/cpu/microcode/amd.o
  LD      arch/x86/kernel/cpu/microcode/microcode.o
  CC      arch/x86/kernel/cpu/microcode/core_early.o
  CC      arch/x86/kernel/cpu/microcode/intel_early.o
  CC      arch/x86/kernel/cpu/microcode/amd_early.o
  LD      arch/x86/kernel/cpu/microcode/built-in.o
  CC      arch/x86/kernel/cpu/mtrr/main.o
  CC      arch/x86/kernel/cpu/mtrr/if.o
  CC      arch/x86/kernel/cpu/mtrr/generic.o
  CC      arch/x86/kernel/cpu/mtrr/cleanup.o
  LD      arch/x86/kernel/cpu/mtrr/built-in.o
  CC      arch/x86/kernel/cpu/perfctr-watchdog.o
  CC      arch/x86/kernel/cpu/perf_event_amd_ibs.o
  LD      arch/x86/kernel/cpu/built-in.o
  CC      arch/x86/kernel/kprobes/core.o
  CC      arch/x86/kernel/kprobes/opt.o
  LD      arch/x86/kernel/kprobes/built-in.o
  CC      arch/x86/kernel/reboot.o
  CC      arch/x86/kernel/msr.o
  CC      arch/x86/kernel/cpuid.o
  CC      arch/x86/kernel/early-quirks.o
  CC      arch/x86/kernel/smp.o
  CC      arch/x86/kernel/smpboot.o
  CC      arch/x86/kernel/tsc_sync.o
  CC      arch/x86/kernel/setup_percpu.o
  CC      arch/x86/kernel/mpparse.o
  CC      arch/x86/kernel/trace_clock.o
  CC      arch/x86/kernel/machine_kexec_64.o
  AS      arch/x86/kernel/relocate_kernel_64.o
  CC      arch/x86/kernel/crash.o
  CC      arch/x86/kernel/crash_dump_64.o
  CC      arch/x86/kernel/module.o
  CC      arch/x86/kernel/doublefault.o
  CC      arch/x86/kernel/early_printk.o
  CC      arch/x86/kernel/hpet.o
  CC      arch/x86/kernel/amd_nb.o
  CC      arch/x86/kernel/pcspeaker.o
  CC      arch/x86/kernel/check.o
  CC      arch/x86/kernel/pci-swiotlb.o
  CC      arch/x86/kernel/sysfb.o
  CC      arch/x86/kernel/sysfb_efi.o
  CC      arch/x86/kernel/perf_regs.o
  CC      arch/x86/kernel/tracepoint.o
  CC      arch/x86/kernel/pci-calgary_64.o
  CC      arch/x86/kernel/tce_64.o
  CC      arch/x86/kernel/mmconf-fam10h_64.o
  CC      arch/x86/kernel/vsmp_64.o
  LD      arch/x86/kernel/built-in.o
  AS      arch/x86/kernel/head_64.o
  CC      arch/x86/kernel/head64.o
  CC      arch/x86/kernel/head.o
  LDS     arch/x86/kernel/vmlinux.lds
  CC      arch/x86/mm/init.o
  CC      arch/x86/mm/init_64.o
  CC      arch/x86/mm/fault.o
  CC      arch/x86/mm/ioremap.o
  CC      arch/x86/mm/extable.o
  CC      arch/x86/mm/pageattr.o
arch/x86/mm/pageattr.c:707:13: error: redefinition of 'try_to_free_pud_page'
 static bool try_to_free_pud_page(pud_t *pud)
             ^
arch/x86/mm/pageattr.c:695:13: note: previous definition of 'try_to_free_pud_page' was here
 static bool try_to_free_pud_page(pud_t *pud)
             ^
arch/x86/mm/pageattr.c:842:13: error: redefinition of 'unmap_pgd_range'
 static void unmap_pgd_range(pgd_t *root, unsigned long addr, unsigned long end)
             ^
arch/x86/mm/pageattr.c:832:13: note: previous definition of 'unmap_pgd_range' was here
 static void unmap_pgd_range(pgd_t *root, unsigned long addr, unsigned long end)
             ^
arch/x86/mm/pageattr.c:1904:6: error: redefinition of 'kernel_unmap_pages_in_pgd'
 void kernel_unmap_pages_in_pgd(pgd_t *root, unsigned long address,
      ^
arch/x86/mm/pageattr.c:1898:6: note: previous definition of 'kernel_unmap_pages_in_pgd' was here
 void kernel_unmap_pages_in_pgd(pgd_t *root, unsigned long address,
      ^
arch/x86/mm/pageattr.c:695:13: warning: 'try_to_free_pud_page' defined but not used [-Wunused-function]
 static bool try_to_free_pud_page(pud_t *pud)
             ^
arch/x86/mm/pageattr.c:832:13: warning: 'unmap_pgd_range' defined but not used [-Wunused-function]
 static void unmap_pgd_range(pgd_t *root, unsigned long addr, unsigned long end)
             ^
scripts/Makefile.build:308: recipe for target 'arch/x86/mm/pageattr.o' failed
make[2]: *** [arch/x86/mm/pageattr.o] Error 1
scripts/Makefile.build:455: recipe for target 'arch/x86/mm' failed
make[1]: *** [arch/x86/mm] Error 2
Makefile:843: recipe for target 'arch/x86' failed
make: *** [arch/x86] Error 2
Are these errors something to be concerned with? Normally if I see a program that seems to go fine with just some smaller 'errors' at the end, i usually just 'make install' anyways and it works fine. I don't wanna do that with the kernel though, since it's one of the most important things. I'm not 100 sure, but it looks like there's a problem with "pageattr.o". Does that maybe mean my attr packages weren't installed correctly? I have no clue.

Any help is appreciated.
 
Old 03-29-2015, 11:44 PM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Which gcc version you are using? And are you compiling x86 32bit kernel as compile output shows? Perhaps you should compile 64bit x86_64 kernel.

And don't ignore this error. Anyway even if you ignore you won't get a kernel image.
 
1 members found this post helpful.
Old 03-29-2015, 11:51 PM   #3
Xenanthropy
Member
 
Registered: Mar 2015
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by veerain View Post
Which gcc version you are using? And are you compiling x86 32bit kernel as compile output shows? Perhaps you should compile 64bit x86_64 kernel.

And don't ignore this error. Anyway even if you ignore you won't get a kernel image.
I'm using gcc version... 4.8.3, as the book states. And i'm not sure... It would seem I am trying to compile a 32bit version, as that's the one the book tells me to use. I didn't know there was a difference, I assumed you could just build them two different ways, like the way you did with the programs, what with the compiling a program with "gcc = {BUILD32}", then the same thing but with BUILD64 for building it as 64bit. Do I need to download a different kernel and deviate from the book? Or are there some arguments I can put with the 'make' command to do that?

Also, I should mention that when I was configuring with 'make menuconfig', it had an option marked '64 bit kernel' which I couldn't unmark, so i'm guessing it is a 64bit kernel? I guess all I need to know then is how i'd compile the kernel as 64bit.
 
Old 03-30-2015, 12:10 AM   #4
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Did you used these commands:

Quote:
make ARCH=x86_64 CROSS_COMPILE=${CLFS_TARGET}- defconfig
make ARCH=x86_64 CROSS_COMPILE=${CLFS_TARGET}- menuconfig
make ARCH=x86_64 CROSS_COMPILE=${CLFS_TARGET}-
Always put 'ARCH=x86_64 CROSS_COMPILE=${CLFS_TARGET}-' in you kernel build commands. Don't leave it.

You don't have to download a different kernel. The same sources can be used to compile all the supported architectures.

Did you made changes to .config file by hand or through menuconfig or something similar?
 
1 members found this post helpful.
Old 03-30-2015, 12:18 AM   #5
Xenanthropy
Member
 
Registered: Mar 2015
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by veerain View Post
Did you used these commands:



Always put 'ARCH=x86_64 CROSS_COMPILE=${CLFS_TARGET}-' in you kernel build commands. Don't leave it.

You don't have to download a different kernel. The same sources can be used to compile all the supported architectures.

Did you made changes to .config file by hand or through menuconfig or something similar?
Thanks, I didn't know what arguments to use since the book doesn't tell you. Which I don't understand why it doesn't, since it's the multilib version, you'd think they'd expect you to need to compile it for either arch. And yes. Well, both. First, I did it by hand in Nano. Then, I edited the manual version with menuconfig, which showed that my manual changes had been successful, as I didn't have to change anything. Then, when I cleaned out my kernel tree with 'make mrproper', I had to configure again so I used menuconfig that time, then double checked quickly with nano.
 
Old 03-30-2015, 12:29 AM   #6
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Don't edit .config manually. I think some option inter dependencies won't be handled correctly. Though running make corrects inter dependencies, as I see so in output. I always use menuconfig to set options. I say only if you have specific and correct knowledge then you do manual editing or you are an expert.
 
1 members found this post helpful.
Old 03-30-2015, 12:32 AM   #7
Xenanthropy
Member
 
Registered: Mar 2015
Posts: 34

Original Poster
Rep: Reputation: Disabled
Ah, ok! I'll use menuconfig everytime then. Oh and also! Just a very quick question. Can I also use those MULTIARCH and CROSS_COMPILE args for other programs as well? I was planning on installing wget, just to have something to download packages for so I can download and extra programs and all of that once I boot into my system, but I noticed, it needed two programs. Nettle, and gnutls. Nettle automatically compiled as 64bit, just by running make. That's great, but when I tried to configure gnutls, it was looking for the 32bit libs of nettle. Sorry, just didn't wanna waste more space for a thread for such a trivial question.

Last edited by Xenanthropy; 03-30-2015 at 12:33 AM. Reason: added a reply
 
Old 03-30-2015, 12:43 AM   #8
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Quote:
Can I also use those MULTIARCH and CROSS_COMPILE args for other programs as well?
These options are for kernel only.

Some programs may compile fine with 64 bit support and some won't. You can see build instructions in CBLFS though it has not been updated for few years. But you can get the overview, way of building the software. Adapt as much and required for your purpose.

You should learn the commoness in the softwares you build from source. The software using gnu autoconf/automake (./configure) almost have common way of building them (Different versions of autoconf/automake have different steps). Read info pages of gcc, ld, glibc, make, bash, automake, autoconf, sed, awk and ... as required.

Learn them in small steps or as required.
 
1 members found this post helpful.
Old 03-30-2015, 12:45 AM   #9
Xenanthropy
Member
 
Registered: Mar 2015
Posts: 34

Original Poster
Rep: Reputation: Disabled
Ok, thanks for the help. If I can't figure out nettle+gnutls, then i'll take a look a curl, people say it's better anyways. I'll mark as solved.
 
Old 03-30-2015, 12:50 AM   #10
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
You should try using the newer book.

Some programs have hard dependency on gnutls/nettle.

Wget has a nice feature of mirroring web sites and making it readable locally. Just a note.
 
Old 03-30-2015, 12:53 AM   #11
Xenanthropy
Member
 
Registered: Mar 2015
Posts: 34

Original Poster
Rep: Reputation: Disabled
Is there a 3.0 version for Systemd? Since that's the version I'd chosen over sysvinit. I'm not sure when the book starts varying from each other when it comes to systemd vs. sysvinit though. And yes, I do like wget, if I could get nettle and gnutls up and running, that'd be great. I'm assuming the compiling of the programs doesn't matter between systemd and sysvinit.

Edit: It would seem i'm using a more recent version of the book. I downloaded the book i'm using straight from github, as it's a development version, but not the unstable/testing version. It was made just last month. It seems version 3 of the book was added in October 2014.

Last edited by Xenanthropy; 03-30-2015 at 01:01 AM. Reason: adding more information
 
Old 03-30-2015, 01:07 AM   #12
Xenanthropy
Member
 
Registered: Mar 2015
Posts: 34

Original Poster
Rep: Reputation: Disabled
Hmm, it would seem the make command is not working, haha. it worked for the defconfig and menuconfig, but it compiles even less files when using those arguments:

Code:
root:/sources/linux-3.14#  make ARCH=x86_64 CROSS_COMPILE=${CLFS_TARGET}- 
make: -gcc: Command not found
scripts/kconfig/conf --silentoldconfig Kconfig
#
# configuration written to .config
#
make: -gcc: Command not found
  SYSHDR  arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h
  SYSHDR  arch/x86/syscalls/../include/generated/uapi/asm/unistd_64.h
  SYSHDR  arch/x86/syscalls/../include/generated/uapi/asm/unistd_x32.h
  SYSTBL  arch/x86/syscalls/../include/generated/asm/syscalls_32.h
  SYSHDR  arch/x86/syscalls/../include/generated/asm/unistd_32_ia32.h
  SYSHDR  arch/x86/syscalls/../include/generated/asm/unistd_64_x32.h
  SYSTBL  arch/x86/syscalls/../include/generated/asm/syscalls_64.h
  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
  CHK     include/config/kernel.release
  UPD     include/config/kernel.release
  WRAP    arch/x86/include/generated/asm/clkdev.h
  CHK     include/generated/uapi/linux/version.h
  UPD     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  CC      kernel/bounds.s
/bin/sh: -gcc: command not found
/sources/linux-3.14/./Kbuild:35: recipe for target 'kernel/bounds.s' failed
make[1]: *** [kernel/bounds.s] Error 127
Makefile:886: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
Seems i've broken something else somehow. Maybe it's some variables somewhere...
 
Old 03-30-2015, 01:18 AM   #13
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Quote:
Originally Posted by Xenanthropy View Post
Is there a 3.0 version for Systemd? Since that's the version I'd chosen over sysvinit. I'm not sure when the book starts varying from each other when it comes to systemd vs. sysvinit though. And yes, I do like wget, if I could get nettle and gnutls up and running, that'd be great. I'm assuming the compiling of the programs doesn't matter between systemd and sysvinit.

Edit: It would seem i'm using a more recent version of the book. I downloaded the book i'm using straight from github, as it's a development version, but not the unstable/testing version. It was made just last month. It seems version 3 of the book was added in October 2014.
Oh yes use whichever suits you. But for start using a stable book is recommended. Link for systemd version.

Wget requires either openssl or gnutls.

Last edited by veerain; 03-30-2015 at 01:20 AM.
 
Old 03-30-2015, 01:24 AM   #14
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Quote:
Originally Posted by Xenanthropy View Post
Hmm, it would seem the make command is not working, haha. it worked for the defconfig and menuconfig, but it compiles even less files when using those arguments:

Code:
root:/sources/linux-3.14#  make ARCH=x86_64 CROSS_COMPILE=${CLFS_TARGET}- 
make: -gcc: Command not found
scripts/kconfig/conf --silentoldconfig Kconfig
#
# configuration written to .config
#
make: -gcc: Command not found
  SYSHDR  arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h
  SYSHDR  arch/x86/syscalls/../include/generated/uapi/asm/unistd_64.h
  SYSHDR  arch/x86/syscalls/../include/generated/uapi/asm/unistd_x32.h
  SYSTBL  arch/x86/syscalls/../include/generated/asm/syscalls_32.h
  SYSHDR  arch/x86/syscalls/../include/generated/asm/unistd_32_ia32.h
  SYSHDR  arch/x86/syscalls/../include/generated/asm/unistd_64_x32.h
  SYSTBL  arch/x86/syscalls/../include/generated/asm/syscalls_64.h
  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
  CHK     include/config/kernel.release
  UPD     include/config/kernel.release
  WRAP    arch/x86/include/generated/asm/clkdev.h
  CHK     include/generated/uapi/linux/version.h
  UPD     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  CC      kernel/bounds.s
/bin/sh: -gcc: command not found
/sources/linux-3.14/./Kbuild:35: recipe for target 'kernel/bounds.s' failed
make[1]: *** [kernel/bounds.s] Error 127
Makefile:886: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
Seems i've broken something else somehow. Maybe it's some variables somewhere...
'/bin/sh: -gcc: command not found': This because you have not set the CLFS_TARGET environment variable. Whenever you logout/close and start new you have to set variables fresh. The instructions given in the book assume that you would run all of it in one session. Careful to not override essential variables. Read the book from start learning inter dependencies.
 
Old 03-30-2015, 01:26 AM   #15
Xenanthropy
Member
 
Registered: Mar 2015
Posts: 34

Original Poster
Rep: Reputation: Disabled
Yes, I was wondering about that. I noticed they weren't set when I tried to echo $CLFS and it was coming out blank. I had assumed that since the book had you save the export commands into bash, it made it sound like they'd still be there even if you logged out. Thanks for the help again, i'll go back a few chapters and reset most the CLFS variables.

Last edited by Xenanthropy; 03-30-2015 at 01:27 AM. Reason: added more info
 
  


Reply

Tags
clfs, compile, error, kernel, make



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
CLFS Version GIT-20131214-x86_64-Multilib Make not compiling EPLychon Linux From Scratch 0 12-16-2013 01:44 AM
Problem on compiling mesa git on Slackware64 Multilib rvdboom Slackware 3 01-22-2013 01:47 PM
CLFS 1.2 Multilib x86_64 on Ubuntu 11.04 - 10.8.*EGLIBC-2.13 64-Bit Make Test Error samuraixp Linux From Scratch 1 03-27-2012 01:19 AM
Compile error with Version GIT-20110130-x86_64-Multilib twinsen Linux From Scratch 1 02-04-2011 10:01 AM
CLFS SVN-20080921-x86_64-Multilib Part 10 binutils chokes on install ChrisMP1 Linux From Scratch 0 09-23-2008 08:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 09:53 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