LinuxQuestions.org
Review your favorite Linux distribution.
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-30-2015, 01:58 AM   #16
Xenanthropy
Member
 
Registered: Mar 2015
Posts: 34

Original Poster
Rep: Reputation: Disabled

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
 
Old 03-30-2015, 02:40 AM   #17
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Have you lost bash somewhere
 
Old 03-30-2015, 05:05 AM   #18
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
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.
 
Old 03-30-2015, 11:29 AM   #19
Xenanthropy
Member
 
Registered: Mar 2015
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by spiky0011 View Post
Have you lost bash somewhere
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 View Post
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.
Yep, still there:

Code:
root:/# echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin
 
Old 03-30-2015, 11:49 AM   #20
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
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'.

Last edited by veerain; 03-30-2015 at 11:51 AM.
 
Old 03-30-2015, 12:22 PM   #21
Xenanthropy
Member
 
Registered: Mar 2015
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by veerain View Post
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
 
Old 03-30-2015, 12:28 PM   #22
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Did you installed 64bit version of binutils? Find in /tools directory for i686-pc-linux-gnu-ld or x86_64-unknown-linux-gnu-ld or something similar.
 
Old 03-30-2015, 12:30 PM   #23
Xenanthropy
Member
 
Registered: Mar 2015
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by veerain View Post
Did you installed 64bit version of binutils? Find in /tools directory for i686-pc-linux-gnu-ld or x86_64-unknown-linux-gnu-ld or something similar.
I found "x86_64-unknown-linux-gnu", but not that with an ld at the end:

Code:
root:/tools# ls -A
bin  include  lib64    man   share  x86_64-unknown-linux-gnu
etc  lib      libexec  sbin  var
i'm not really sure what the ld signifies.

Edit: I really need to dig deeper before I post, haha. went into the linux-gnu folder, then the bin folder. inside is an ld file

Code:
root:/tools/x86_64-unknown-linux-gnu/bin# ls
ar  as	ld  ld.bfd  nm	objcopy  objdump  ranlib  strip

Last edited by Xenanthropy; 03-30-2015 at 12:32 PM.
 
Old 03-30-2015, 12:35 PM   #24
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
I meant find in all subdirectories of /tools. ld is linker program.
 
Old 03-30-2015, 12:39 PM   #25
Xenanthropy
Member
 
Registered: Mar 2015
Posts: 34

Original Poster
Rep: Reputation: Disabled
Let's see... in /tools/bin/, there's

x86_64-unknown-linux-gnu-c++
x86_64-unknown-linux-gnu-g++
x86_64-unknown-linux-gnu-gcc
x86_64-unknown-linux-gnu-gcc-4.8.3
x86_64-unknown-linux-gnu-gcc-ar
x86_64-unknown-linux-gnu-gcc-nm
x86_64-unknown-linux-gnu-gcc-ranlib

and that's about it, I checked the other folders (include, lib, lib64, etc.) and they don't have any unknown-linux related things inside.
 
Old 03-30-2015, 01:06 PM   #26
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Do you have /tools/bin/ld.

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.

Last edited by veerain; 03-30-2015 at 01:09 PM.
 
Old 03-30-2015, 01:11 PM   #27
Xenanthropy
Member
 
Registered: Mar 2015
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by veerain View Post
How come you have:

x86_64-unknown-linux-gnu-gcc-ar
x86_64-unknown-linux-gnu-gcc-nm
x86_64-unknown-linux-gnu-gcc-ranlib

but not x86_64-unknown-linux-gnu-gcc-ld.

They are all part of binutils.

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.
 
Old 03-30-2015, 01:22 PM   #28
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Sorry I posted wrong and then edited it. You picked the wrong posts. Please reread it.

I too have built CLFS but non-multilib one. It worked fine building kernel.

If you have /tools/bin/ld then make a symlink to it.

Code:
ln -s ld /tools/bin/x86_64-unknown-linux-gnu-ld
and then run kernel build.
 
Old 03-30-2015, 01:33 PM   #29
Xenanthropy
Member
 
Registered: Mar 2015
Posts: 34

Original Poster
Rep: Reputation: Disabled
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.
 
Old 03-30-2015, 01:41 PM   #30
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Yes. Do the same for these too:

Code:
ln -s ar /tools/bin/x86_64-unknown-linux-gnu-ar
ln -s as /tools/bin/x86_64-unknown-linux-gnu-as
ln -s nm /tools/bin/x86_64-unknown-linux-gnu-nm
ln -s ranlib /tools/bin/x86_64-unknown-linux-gnu-ranlib
I had gcc-4.8.3 and binutils 2.24.
 
  


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 10:04 PM.

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