Error Building Redox OS on PeppermintOS 10 - linux

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.

Related

Error during make gcc: "cp: Permission denied"

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

`make release_tests` fails after ./configure in fresh Erlang installation

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.

Error when installing mosquitto with websockets on centos 7

I have followed the next steps:
sudo yum groupinstall "Development Tools"
sudo yum install wget mercurial cmake openssl-devel c-ares-devel libuuid-devel
wget https://github.com/warmcat/libwebsockets/archive/v1.3-chrome37-firefox30.tar.gz
tar zxvf v1.3-chrome37-firefox30.tar.gz
cd libwebsockets-1.3-chrome37-firefox30
mkdir build; cd build;
cmake .. -DLIB_SUFFIX=64
sudo make install
To install mosquitto:
hg clone https://bitbucket.org/oojah/mosquitto
cd mosquitto
hg pull && hg update 1.4
In config.mk:
WITH_WEBSOCKETS:=yes
make binary
sudo make install
All goes well until the last line to install mosquitto... sudo make install
And this is what the console shows:
set -e; for d in lib client src; do make -C ${d}; done
make[1]: Entering directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/lib'
make -C cpp
make[2]: Entering directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/lib/cpp'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/lib/cpp'
make[1]: Leaving directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/lib'
make[1]: Entering directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/client'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/client'
make[1]: Entering directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/src'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/src'
set -e; for d in lib client src; do make -C ${d} install; done
make[1]: Entering directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/lib'
make -C cpp
make[2]: Entering directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/lib/cpp'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/lib/cpp'
install -d /usr/local/lib/
install -s --strip-program=strip libmosquitto.so.1 /usr/local/lib/libmosquitto.so.1
ln -sf libmosquitto.so.1 /usr/local/lib/libmosquitto.so
install -d /usr/local/include/
install mosquitto.h /usr/local/include/mosquitto.h
make -C cpp install
make[2]: Entering directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/lib/cpp'
install -d /usr/local/lib/
install -s --strip-program=strip libmosquittopp.so.1 /usr/local/lib/libmosquittopp.so.1
ln -sf libmosquittopp.so.1 /usr/local/lib/libmosquittopp.so
install -d /usr/local/include/
install mosquittopp.h /usr/local/include/mosquittopp.h
make[2]: Leaving directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/lib/cpp'
make[1]: Leaving directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/lib'
make[1]: Entering directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/client'
install -d /usr/local/bin
install -s --strip-program=strip mosquitto_pub /usr/local/bin/mosquitto_pub
install -s --strip-program=strip mosquitto_sub /usr/local/bin/mosquitto_sub
make[1]: Leaving directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/client'
make[1]: Entering directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/src'
install -d /usr/local/sbin
install -s --strip-program=strip mosquitto /usr/local/sbin/mosquitto
install mosquitto_plugin.h /usr/local/include/mosquitto_plugin.h
install -s --strip-program=strip mosquitto_passwd /usr/local/bin/mosquitto_passwd
make[1]: Leaving directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/src'
set -e; for d in man; do make -C ${d} install; done
make[1]: Entering directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/man'
install -d /usr/local/share/man/man8
install -m 644 mosquitto.8 /usr/local/share/man/man8/mosquitto.8
install: cannot stat ‘mosquitto.8’: No such file or directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/investigador_uno/libwebsockets-1.3-chrome37-firefox30/build/mosquitto/man'
make: *** [install] Error 2
What could be the problem?
hg clone https://bitbucket.org/oojah/mosquitto
cd mosquitto
hg pull && hg update 1.4
The 1.4 branch from hg is not complete, you should you use the git repository instead: http://git.eclipse.org/c/mosquitto/org.eclipse.mosquitto.git
The problem you are seeing is related to the man pages not being built due to file locations differing from distro to distro. This is only something that is done with the unreleased code. If you download the released source instead it will be fine.

make error during building webkitgtk

I use UBuntu 14.04 LTS. I need to build webkitgtk 2.8.3 Here is an example instruction which I have used: linuxfromscratch When I run sudo make -j8 I get following log:
Scanning dependencies of target JavaScriptCore-4-gir
Scanning dependencies of target fake-generated-webkitdom-headers
[ 0%] Scanning dependencies of target WebKit2-fake-api-headers
Scanning dependencies of target translations_1
[ 0%] Generating ../../JavaScriptCore-4.0.typelib
[ 0%] /bin/sh: 1: ../../JavaScriptCore-4.0.gir: Permission denied
Scanning dependencies of target bmalloc
[ 0%] [ 0%] make[2]: *** [JavaScriptCore-4.0.typelib] Error 126
Generating ../../DerivedSources/webkitdom/WebKitDOMCustom.h
make[1]: *** [Source/JavaScriptCore/CMakeFiles/JavaScriptCore- 4-gir.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....Generating ../../DerivedSources/webkitdom/WebKitDOMDeprecated.h
What might be wrong ?
Edit1 Verbose log:
make[2]: Entering directory `/home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/build'
/usr/bin/cmake -E cmake_progress_report /home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/build/CMakeFiles
[ 0%] [ 0%] make[2]: Entering directory `/home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/build'
cd /home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3 /home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/Source/WebKit2 /home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/build /home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/build/Source/WebKit2 /home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/build/Source/WebKit2/CMakeFiles/WebKit2-forwarding-headers.dir/DependInfo.cmake --color=
make[2]: Entering directory `/home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/build'
/usr/bin/cmake -E cmake_progress_report /home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/build/CMakeFiles
[ 0%] Generating ../../JavaScriptCore-4.0.typelib
cd /home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/build/Source/JavaScriptCore && ../../JavaScriptCore-4.0.gir -o /home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/build/JavaScriptCore-4.0.typelib
/bin/sh: 1: ../../JavaScriptCore-4.0.gir: Permission denied
Generating ../../DerivedSources/ForwardingHeaders/webkit2gtk/webkit2
make[2]: *** [JavaScriptCore-4.0.typelib] Error 126
make[2]: Leaving directory `/home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/build'
make[1]: *** [Source/JavaScriptCore/CMakeFiles/JavaScriptCore-4-gir.dir/all] Error 2
/usr/bin/*** Waiting for unfinished jobs....
as you see, in Edit1, you (make) try to run JavaScriptCore-4.0.gir instead of compile it with g-ir-compiler; I tried on my pc and my command is:
cd /home/davide/src/webkitgtk-2.8.3/build/Source/JavaScriptCore && \
/usr/bin/g-ir-compiler /home/davide/src/webkitgtk-2.8.3/build/JavaScriptCore-4.0.gir \
-o /home/davide/src/webkitgtk-2.8.3/build/JavaScriptCore-4.0.typelib
as a workaround, you cand edit:
build/Source/JavaScriptCore/CMakeFiles/JavascriptCore-4-gir.dir/build
here's the lines on my file (the last line is what you need to change):
JavaScriptCore-4.0.typelib: JavaScriptCore-4.0.gir
$(CMAKE_COMMAND) -E cmake_progress_report /home/davide/src/webkitgtk-2.8.3/build/CMakeFiles $(CMAKE_PROGRESS_1)
#$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "Generating ../../JavaScriptCore-4.0.typelib"
cd /home/davide/src/webkitgtk-2.8.3/build/Source/JavaScriptCore && /usr/bin/g-ir-compiler /home/davide/src/webkitgtk-2.8.3/build/JavaScriptCore-4.0.gir -o /home/davide/src/webkitgtk-2.8.3/build/JavaScriptCore-4.0.typelib
just add /usr/bin/g-ir-compiler or whatever it is located (which g-ir-compiler)
webkitgtk-2.26.2/Source/cmake/OptionsGTK.cmake webkitgtk-2.26.2/Source/cmake/OptionsGTK.cmake
add bellow line
list(APPEND JavaScriptCore_LIBRARIES -latomic)

linuxfromscratch: Can't do make menuconfig for linux installing

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/

Resources