I'm following this guide to build a linux system for learning experience On the the guide at the section titled GCC (Static), I'm having an error, on running the command `

$ ln -vs libgcc.a `${LJOS_TARGET}-gcc -print-libgcc-file-name |
  ↪sed 's/libgcc/&_eh/'`

No command '-gcc' found, did you mean:
Command 'gcc' from package 'gcc' (main)
Command 'cgcc' from package 'sparse' (universe)
-gcc: command not found
'./libgcc.a' -> 'libgcc.a'

I ignored it and continued to the title Glibc, but I'm getting another error following this command

BUILD_CC="gcc" CC="${LJOS_TARGET}-gcc" \
AR="${LJOS_TARGET}-ar" \
../glibc-2.27/configure --prefix=/usr \
--host=${LJOS_TARGET} --build=${LJOS_HOST} \
--disable-profile --enable-add-ons --with-tls \
--enable-kernel=2.6.32 --with-__thread \
--with-binutils=${LJOS}/cross-tools/bin \
--with-headers=${LJOS}/usr/include \

The error is like this

configure: loading cache config.cache
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... -gcc
checking for suffix of object files... configure: error: in `/home/noob/Desktop/glibc- build':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details

These are the contents on my config.log

How do I fix this issue?

  • What's the output of echo ${LJOS_TARGET}? I suspect it's empty. How does it get set? – Stewart Nov 26 '20 at 7:39
  • The output is blank. – ASWIN VENU Nov 26 '20 at 7:40
  • I set it to 'export LJOS_TARGET=x86_64-unknown-linux-gnu' as per in the guide, but I'm getting the same error ; 'x86_64-unknown-linux-gnu-gcc: command not found' – ASWIN VENU Nov 26 '20 at 7:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.