On this chapter http://www.linuxfromscratch.org/lfs/view/stable/chapter08/kernel.html
root#host# chroot "$LFS" /usr/bin/env -i \
> HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
> PATH=/bin:/usr/bin:/sbin:/usr/sbin \
> /bin/bash --login
root:/# cd sources/linux-3.2.6
root:/sources/linux-3.2.6# make mrproper
CLEAN scripts/basic
CLEAN scripts/kconfig
CLEAN include/config
root:/sources/linux-3.2.6# make menuconfig
HOSTCC scripts/basic/fixdep
gcc: error trying to exec 'as': execvp: No such file or directory
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2
Why am i gettting such error?
Updating
Got the answer, it is binutils installation related, may be corrupted installation of binutis.
http://www.linuxquestions.org/questions/linux-software-2/gcc-error-trying-to-exec-%27as%27-execvp-no-such-file-or-directory-906750/
`gcc: error trying to exec 'cc1': execvp: No such file or directory` When compile program with `popen` in php
You need to install GNU Binutils package.
http://www.gnu.org/software/binutils/
Related
I am unable to build Redox-OS, an open source OS written in Rust. When I run:
shoaib#peppermint ~Desktop/RyneOS/redox $ make all
It responds with a couple of errors:
rm -rf "prefix/x86_64-unknown-redox/relibc-install.partial" "prefix/x86_64-unknown-redox/relibc-install"
cp -r "prefix/x86_64-unknown-redox/rust-install" "prefix/x86_64-unknown-redox/relibc-install.partial"
rm -rf "prefix/x86_64-unknown-redox/relibc-install.partial/x86_64-unknown-redox/include/"*
cp -r "prefix/x86_64-unknown-redox/rust-install/x86_64-unknown-redox/include/c++" "prefix/x86_64-unknown-redox/relibc-install.partial/x86_64-unknown-redox/include/c++"
cd "/home/shoaib/Desktop/RyneOS/redox/relibc" && \
export PATH="/home/shoaib/Desktop/RyneOS/redox/prefix/x86_64-unknown-redox/relibc-install.partial/bin:$PATH" && \
export CARGO="env -u CARGO xargo" && \
make -j `nproc` all && \
make -j `nproc` install DESTDIR="/home/shoaib/Desktop/RyneOS/redox/prefix/x86_64-unknown-redox/relibc-install.partial/x86_64-unknown-redox"
make[1]: Entering directory '/home/shoaib/Desktop/RyneOS/redox/relibc'
CARGO_INCREMENTAL=0 env -u CARGO xargo rustc --release "--target=x86_64-unknown-redox" -- --emit link="target/x86_64-unknown-redox"/release/librelibc.a
rm -rf "target/x86_64-unknown-redox"/pthreads-emb "target/x86_64-unknown-redox"/pthreads-emb.partial
mkdir -p "target/x86_64-unknown-redox"
cp -r pthreads-emb "target/x86_64-unknown-redox"/pthreads-emb.partial
thread 'main' panicked at 'unexpected -vV format', /home/shoaib/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc_version-0.1.7/src/lib.rs:126:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Makefile:173: recipe for target '"target/x86_64-unknown-redox"/release/librelibc.a' failed
make[1]: *** ["target/x86_64-unknown-redox"/release/librelibc.a] Error 101
make[1]: *** Waiting for unfinished jobs....
mv "target/x86_64-unknown-redox"/pthreads-emb.partial "target/x86_64-unknown-redox"/pthreads-emb
touch "target/x86_64-unknown-redox"/pthreads-emb
make[1]: Leaving directory '/home/shoaib/Desktop/RyneOS/redox/relibc'
mk/prefix.mk:19: recipe for target 'prefix/x86_64-unknown-redox/relibc-install' failed
make: *** [prefix/x86_64-unknown-redox/relibc-install] Error 2
My host OS: Peppermint 10
The OS I am going to build is Redox-OS with the name of RyneOS
I have all packages, rustc, rustup, etc. installed, I am on a 64 bit machine, I have also tried running make qemu but same problem.
What I did
In my initially empty build directory, I configure gcc with
/home/anthony/Documents/gcc-pi/gcc/configure --prefix=/opt/gcc --enable-multilib --disable-shared --enable-static --disable-bootstrap --disable-libstdcxx-pch --enable-languages=all --enable-libgomp --enable-threads=posix --enable-tls --with-system-zlib --with-isl --enable-__cxa_atexit --enable-host-shared CFLAGS='-lpthread -fPIC' CXXFLAGS='-lpthread -fPIC' CPPFLAGS='-fPIC'
I then issue make and after some successful building, the build ultimately fails with the following
make[2]: Entering directory '/home/anthony/Documents/gcc/gcc'
mkdir -p ada/bldtools/sinfo
rm -f ada/bldtools/sinfo/sinfo.ads ada/bldtools/sinfo/sinfo.adb ada/bldtools/sinfo/xsinfo.adb ada/bldtools/sinfo/csinfo.adb
cp -p /home/anthony/Documents/gcc-pi/gcc/gcc/ada/sinfo.ads /home/anthony/Documents/gcc-pi/gcc/gcc/ada/sinfo.adb /home/anthony/Documents/gcc-pi/gcc/gcc/ada/xsinfo.adb /home/anthony/Documents/gcc-pi/gcc/gcc/ada/csinfo.adb ada/bldtools/sinfo
make[2]: cp: Permission denied
make[2]: *** [/home/anthony/Documents/gcc-pi/gcc/gcc/ada/Make-generated.in:44: ada/sinfo.h] Error 127
make[2]: Leaving directory '/home/anthony/Documents/gcc/gcc'
make[1]: *** [Makefile:4411: all-gcc] Error 2
make[1]: Leaving directory '/home/anthony/Documents/gcc'
make: *** [Makefile:970: all] Error 2
What I tried
I've tried
sudo make
sudo chmod 777 -R the gcc source and build directories
sudo cp -p /home/anthony/Documents/gcc-pi/gcc/gcc/ada/sinfo.ads /home/anthony/Documents/gcc-pi/gcc/gcc/ada/sinfo.adb /home/anthony/Documents/gcc-pi/gcc/gcc/ada/xsinfo.adb /home/anthony/Documents/gcc-pi/gcc/gcc/ada/csinfo.adb ada/bldtools/sinfod ```
all of which failed at advancing the build. Note that the last command succeeds, but when I try to continue the build after that, it yields the same error.
Any ideas? Thanks in advance.
Had same issue. Looks like the problem relates to gcc package due to the fact that it contains "cp" directory. Solution was found in "https://aur.archlinux.org/packages/libgccjit/?O=10&PP=10". In my case i had "." folder in my PATH environment variable. Removing it made compilation process to continue.
Edit ./gcc/Makefile
replace cp with /usr/bin/cp
I cloned, make, ./configure then make release_tests
There is a ./make/target.mk in the root otp directory but not in ./lib/common_test/test_server
root#marble-pyramid-1:~/download/otp_src_20.0# make release_tests
if test -f lib/common_test/test_server/Makefile; then \
(cd lib/common_test/test_server; make TESTROOT="/root/download/otp_src_20.0/release/tests" \
PATH=/root/download/otp_src_20.0/bin/:/root/download/otp_src_20.0/bootstrap/bin:"${PATH}" release_tests) || exit $?; \
fi
make[1]: Entering directory `/root/download/otp_src_20.0/lib/common_test/test_server
Makefile:21: /make/target.mk: No such file or directory
Makefile:26: /make/x86_64-unknown-linux-gnu/otp.mk: No such file or directory
Makefile:85: /make/otp_release_targets.mk: No such file or directory
make[1]: *** No rule to make target `/make/otp_release_targets.mk'. Stop.
make[1]: Leaving directory `/root/download/otp_src_20.0/lib/common_test/test_server'
make: *** [lib/common_test/test_server] Error 2
root#marble-pyramid-1:~/download/otp_src_20.0# ls lib/common_test/test_server/
config.guess configure.in install-sh ts_benchmark.erl ts_erl_config.erl ts_install.erl ts_run.erl
config.sub conf_vars.in Makefile ts.config ts.hrl ts_lib.erl ts.unix.config
configure cross.cover ts_autoconf_win32.erl ts.erl ts_install_cth.erl ts_make.erl ts.win32.config
root#marble-pyramid-1:~/download/otp_src_20.0# ls lib/common_test/test_server/make
ls: cannot access lib/common_test/test_server/make: No such file or directory
EDIT:
root#marble-pyramid-1:~/download/otp_src_20.0# ERL_TOP=$HOME/download/otp_src_20.0
root#marble-pyramid-1:~/download/otp_src_20.0# echo $ERL_TOP
/root/download/otp_src_20.0
root#marble-pyramid-1:~/download/otp_src_20.0# make release_test
make: *** No rule to make target `release_test'. Stop.
root#marble-pyramid-1:~/download/otp_src_20.0# make release_tests
if test -f lib/common_test/test_server/Makefile; then \
(cd lib/common_test/test_server; make TESTROOT="/root/download/otp_src_20.0/release/tests" \
PATH=/root/download/otp_src_20.0/bin/:/root/download/otp_src_20.0/bootstrap/bin:"${PATH}" release_tests) || exit $?; \
fi
make[1]: Entering directory `/root/download/otp_src_20.0/lib/common_test/test_server'
Makefile:21: /make/target.mk: No such file or directory
Makefile:26: /make/x86_64-unknown-linux-gnu/otp.mk: No such file or directory
Makefile:85: /make/otp_release_targets.mk: No such file or directory
make[1]: *** No rule to make target `/make/otp_release_targets.mk'. Stop.
make[1]: Leaving directory `/root/download/otp_src_20.0/lib/common_test/test_server'
make: *** [lib/common_test/test_server] Error 2
root#marble-pyramid-1:~/download/otp_src_20.0#
The question says the OP ran make, then ./configure, then make release_tests, but this is incorrect; one always runs configure before make.
Building the release_tests target succeeded using the following steps in bash on a Mac running macOS Sierra 10.12.6:
$ curl -LO http://erlang.org/download/otp_src_20.0.tar.gz
$ tar xf otp_src_20.0.tar.gz
$ cd otp_src_20.0
$ export ERL_TOP=$PWD
$ ./configure
$ make -j16
$ make release_test
I'm sure this would work on Linux or any other UNIX variant as well.
I am a newbie to Linux and ubuntu, but i am trying to install John the Ripper on a new server running ubuntu 15.04. i have it downloaded using:
wget http://www.openwall.com/john/j/john-1.8.0.tar.xz
then i unpacked it with:
tar -xzvf john-1.8.0.tar.gz
then, i cd into the src directory as per the instructions and run:
sudo make clean linux-x86-64
and this error is being returned (and i am trying to figure out what it means/ how to fix it)
rm -f ../run/john ../run/unshadow ../run/unafs ../run/unique
../run/john.bin ../run/john.com ../run/unshadow.com ../run/unafs.com
../run/unique.com ../run/john.exe ../run/unshadow.exe ../run/unafs.exe
../run/unique.exe
rm -f ../run/john.exe john-macosx-* *.o *.bak core
rm -f detect bench generic.h arch.h tmp.s
cp /dev/null Makefile.dep
ln -sf x86-64.h arch.h
make ../run/john ../run/unshadow ../run/unafs ../run/unique \
JOHN_OBJS="DES_fmt.o DES_std.o DES_bs.o DES_bs_b.o BSDI_fmt.o MD5_fmt.o
MD5_std.o BF_fmt.o BF_std.o AFS_fmt.o LM_fmt.o trip_fmt.o dummy.o
batch.o bench.o charset.o common.o compiler.o config.o cracker.o
crc32.o external.o formats.o getopt.o idle.o inc.o john.o list.o
loader.o logger.o math.o memory.o misc.o options.o params.o path.o
recovery.o rpp.o rules.o signals.o single.o status.o tty.o wordlist.o
unshadow.o unafs.o unique.o c3_fmt.o x86-64.o" \
CFLAGS="-c -Wall -Wdeclaration-after-statement -O2 -fomit-frame-pointer
-DHAVE_CRYPT" \
LDFLAGS="-s -lcrypt"
make[1]: Entering directory '/home/mike/john-1.8.0/src'
gcc -c -Wall -Wdeclaration-after-statement -O2 -fomit-frame-pointer -
DHAVE_CRYPT -funroll-loops DES_fmt.c
make[1]: gcc: Command not found
Makefile:896: recipe for target 'DES_fmt.o' failed
make[1]: *** [DES_fmt.o] Error 127
make[1]: Leaving directory '/home/mike/john-1.8.0/src'
Makefile:183: recipe for target 'linux-x86-64' failed
make: *** [linux-x86-64] Error 2
You need to install the C compiler, GCC.
sudo apt-get install gcc
You will probably bump into missing libraries next. Read the documentation in the tarball to find out what else you need. (Probably at least libcrypt-dev.)
First, i did ./configure
Then, i did make install and Terminal show this:
make[2]: Entering directory `/home/lucas/Área de Trabalho/gdbm-1.10/src'
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
/bin/bash ../libtool --mode=install /usr/bin/install -c libgdbm.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libgdbm.so.4.0.0 /usr/local/lib/libgdbm.so.4.0.0
/usr/bin/install: cannot create regular file '/usr/local/lib/libgdbm.so.4.0.0': Permission denied
make[2]: * [install-libLTLIBRARIES] Error 1
make[2]: Leaving directory `/home/lucas/Área de Trabalho/gdbm-1.10/src'
make[1]: * [install-am] Error 2
make[1]: Leaving directory `/home/lucas/Área de Trabalho/gdbm-1.10/src'
make: * [install-recursive] Error 1
Any help?
You do not have permissions to write to /usr/local/lib
sudo make install
or become root and run make install