Error compiling Linux-3.14.21 kernel for CLFS Version GIT-20150207-x86_64-Multilib
Linux From ScratchThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hmm, I put all the variables back, but it still doesn't work. It definitely gets farther, but:
Code:
root:/sources/linux-3.14# make ARCH=x86_64 CROSS_COMPILE=${CLFS_TARGET}-
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
/bin/sh: x86_64-unknown-linux-gnu-ld: command not found
scripts/Makefile.build:441: recipe for target 'init/mounts.o' failed
make[1]: *** [init/mounts.o] Error 127
Makefile:843: recipe for target 'init' failed
make: *** [init] Error 2
I exited chroot now, attempted to remount everything (all of them said they were already mounted, so we're good on that) then I set the variables from the outside, just in case. Then I did the command to chroot in, it gets me in, but it spits out some 'command not found's for some reason.
Code:
[root@connerarchlinux sources]# chroot "${CLFS}" /tools/bin/env -i \
> HOME=/root TERM="${TERM}" PS1='\u:\w\$ ' \
> PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
> /tools/bin/bash --login +h
bash: have: command not found
bash: have: command not found
bash: have: command not found
bash: have: command not found
bash: have: command not found
bash: have: command not found
bash: have: command not found
bash: have: command not found
bash: have: command not found
bash: have: command not found
bash: have: command not found
bash: have: command not found
root:/#
It gets me in successfully, but those worry me, as they didn't show the first time I chrooted in. Nonetheless, I set the variables again, just in case it matters if you're in the chroot or not. I cleared out the linux kernel again and decompressed it and did all the config and stuff over again, but it still gives me the same problem:
Code:
/bin/sh: x86_64-unknown-linux-gnu-ld: command not found
Edit: I'll go ahead and throw in my def/menuconfig in, in case it matters:
Code:
root:/sources/linux-3.14# make ARCH=x86_64 CROSS_COMPILE=${CLFS_TARGET}- defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
*** Default configuration is based on 'x86_64_defconfig'
#
# configuration written to .config
#
root:/sources/linux-3.14# make ARCH=x86_64 CROSS_COMPILE=${CLFS_TARGET}- menuconfig
HOSTCC scripts/kconfig/lxdialog/checklist.o
HOSTCC scripts/kconfig/lxdialog/inputbox.o
HOSTCC scripts/kconfig/lxdialog/menubox.o
HOSTCC scripts/kconfig/lxdialog/textbox.o
HOSTCC scripts/kconfig/lxdialog/util.o
HOSTCC scripts/kconfig/lxdialog/yesno.o
HOSTCC scripts/kconfig/mconf.o
HOSTLD scripts/kconfig/mconf
scripts/kconfig/mconf Kconfig
*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.
Last edited by Xenanthropy; 03-30-2015 at 02:00 AM.
Reason: added more console output
I'm not sure! I know I installed it, I remember compiling it and everything. I haven't changed anything settings-wise or anything like that, so I'm not really sure what could've happened, unless trying to remount everything (which failed cuz they were already all mounted) messed something up.
---------- Post added 03-30-15 at 11:29 AM ----------
Quote:
Originally Posted by veerain
I don't know about the 'bash have' problem.
For other after doing chroot run 'echo $PATH' to see if /tools/bin is in PATH environment variable.
Try running: 'x86_64-unknown-linux-gnu-ld --version' and 'which x86_64-unknown-linux-gnu-ld'.
Check whether bash is present in /tools/bin and also try running ' /tools/bin/bash --version'.
Well, I have bash:
Code:
root:/# /tools/bin/bash --version
GNU bash, version 4.3.30(1)-release (x86_64-unknown-linux-gnu)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
But neither of the unknown-linux-gnu commands work, maybe it's not an existing file, or? I really have no clue.
Code:
root:/sources/linux-3.14# x86_64-unknown-linux-gnu-ld --version
bash: x86_64-unknown-linux-gnu-ld: command not found
root:/sources/linux-3.14# which x86_64-unknown-linux-gnu-ld
bash: which: command not found
EDIT: Ooh wait, the which command works in a normal terminal session, probably because I have it installed I assume:
Code:
which: no x86_64-unknown-linux-gnu-ld in (/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
Last edited by Xenanthropy; 03-30-2015 at 12:25 PM.
Reason: added more console output
And that's not about it. Run 'find /tools -name 'x86_64-unknown-linux-gnu-gcc-ld' and see.
Have you followed correct initial steps.
If we go on like this the number of post's may come to 50-100 on this thread.
Yes, I followed the book's directions exactly. I didn't get any compilation errors at all while going through the book till near the end, which was the problem I had with the 32bit version of xz not being installed. But that was way after i'd compiled all the different segments of binutils that the book has you do.
The find command doesn't come up with any results, so I guess it's not in there. I don't know why it wouldn't be, unless binutils didn't install correctly, but didn't alert me to any errors.
Grr, still errors! But! I think i'd be able to do it from here:
Code:
root:/sources/linux-3.14# make ARCH=x86_64 CROSS_COMPILE=${CLFS_TARGET}-
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
/bin/sh: x86_64-unknown-linux-gnu-ar: command not found
scripts/Makefile.build:387: recipe for target 'arch/x86/crypto/built-in.o' failed
make[2]: *** [arch/x86/crypto/built-in.o] Error 127
scripts/Makefile.build:455: recipe for target 'arch/x86/crypto' failed
make[1]: *** [arch/x86/crypto] Error 2
Makefile:843: recipe for target 'arch/x86' failed
make: *** [arch/x86] Error 2
It's the exact same error, but with ar instead of ld. I symlinked the ld, so I guess i'll just keep symlinking each end there until it stops giving me these errors. I guess i must've messed something up to where they don't know the files. I checked the variables, they work fine,
'echo $CLFS_TARGET' still spits out 'x86_64-unknown-linux-gnu'. I don't have time to test the symlink to the ar file in the bin folder, but after work i'll set all of that up (if that's what I need to do) and i'll test it again.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.