Error building latest linux kernel within VirtualBox under 18.04.1-Ubuntu - linux-kernel

I am trying to build the latest Linux kernel (GitHub) using a Oracel VM and a 18.04.1-Ubuntu image.
I installed the need packages and probably even more. Here is a part of the packages I installed:
sudo apt-get update
sudo apt-get install git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc bison flex libelf-def kernel-package
The full list can be found here.
I ran the following commands in the linux folder after cloning the repository from GitHub.
$ cp /boot/config-$(uname -r) .config
$ make menuconfig
scripts/kconfig/mconf Kconfig
.config:1118:warning: symbol value 'm' invalid for NF_CT_PROTO_GRE
.config:1923:warning: symbol value 'm' invalid for NET_DEVLINK
.config:7865:warning: symbol value 'm' invalid for ASHMEM
.config:8724:warning: symbol value 'm' invalid for ANDROID_BINDER_IPC
.config:8725:warning: symbol value 'm' invalid for ANDROID_BINDERFS
*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.
I save and exited menuconfig. And finally make leads to the following error.
$ make -j2
Makefile:608: include/config/auto.conf: No such file or directory
Makefile:660: include/config/auto.conf.cmd: No such file or directory
HOSTCC scripts/kconfig/conf.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --syncconfig Kconfig
*** Error during sync of the configuration.
scripts/kconfig/Makefile:73: recipe for target 'syncconfig' failed
make[2]: *** [syncconfig] Error 1
Makefile:562: recipe for target 'syncconfig' failed
make[1]: *** [syncconfig] Error 2
Makefile:678: recipe for target 'include/config/auto.conf.cmd' failed
make: *** [include/config/auto.conf.cmd] Error 2
make: *** Deleting file 'include/config/auto.conf.cmd'
Looks like make is expecting some additional configuration files include/config/auto.conf. Does anyone have a clue for me.
Thanks!

Trying to compile kernel 5.6.3 as non-root, I ran into this exact problem.
Running the suggestion from Oandiy's comment
git clean -xdf
revealed that I had files in my source tree that were owned by root and could not be deleted. Looking in my history I found,
sudo make localmodconfig # DO NOT DO THIS
which had installed files, as root, in include/config/* and include/generated/autoconf.h.
To see if you have the same problem, run
sudo find . -uid 0
or just look at the error messages of git clean -xdf (there shouldn't be any).
After deleting all files and directories owned by root, I recovered from this deadlock with:
unset ARCH
cp .config ../config.backup # If you still have this.
git clean -xdf # No errors (this also deletes .config)
cp ../config.backup .config # Or generate a new one *).
make olddefconfig # Printed at the end: 'No change to .config'
Note that I needed to clear ARCH from my environment.
After this I went on as usual,
VERSION=5.6.3 # I have checked out tag v5.6.3 **)
FLAVOUR=lowlatlocxhci # Or whatever you want to call your kernel.
make -j8 deb-pkg LOCALVERSION=-$FLAVOUR
sudo dpkg -i ../linux-headers-$VERSION-${FLAVOUR}_$VERSION-$FLAVOUR-1_amd64.deb ../linux-image-$VERSION-${FLAVOUR}_$VERSION-${FLAVOUR}-1_amd64.deb
The last command fails to compile virtualbox kernel modules at the moment, but I don't care about those, and those errors can be ignored (as long as you don't use virtual box).
*) The .config used was prepared by booting to a kernel with everything (ie, a dist. kernel), copying its config from /boot to the source tree and running make localmodconfig after making sure all kernel modules that I needed where loaded (by running those applications that cause such modules to be loaded). And finally running make menuconfig to turn off CONFIG_DEBUG_INFO in this kernel and to turn a few things that are normally built into the kernel into modules as well (which I needed for some reason).
**) My git tree has been prepared with:
VERSION=5.6.3
FLAVOUR=lowlatlocxhci
git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-$VERSION-$FLAVOUR-$VERSION-$FLAVOUR
cd linux-$VERSION-$FLAVOUR-$VERSION-$FLAVOUR
git checkout -b test_$FLAVOUR v$VERSION
# Make manual changes here, and commit as usual.

Related

how to install from source code on mac terminal

I'm trying to install a software named "pigz" on mac . after downloading the source code, in terminal I go to the folder containing source code then I run make. when I try to install it with sudo make install I get this message
make: *** No rule to make target `install'. Stop.
or when I try to install it with brew
brew install pigz
I get this error
Updating Homebrew...
==> Downloading https://homebrew.bintray.com/bottles/pigz-2.4.catalina.bottle.ta
Warning: Transient problem: timeout Will retry in 1 seconds. 3 retries left.
Warning: Transient problem: timeout Will retry in 2 seconds. 2 retries left.
Warning: Transient problem: timeout Will retry in 4 seconds. 1 retries left.
##O=# #
curl: (6) Could not resolve host: homebrew.bintray.com
Error: Failed to download resource "pigz"
Download failed: https://homebrew.bintray.com/bottles/pigz-2.4.catalina.bottle.tar.gz
Warning: Bottle installation failed: building from source.
==> Downloading https://zlib.net/pigz/pigz-2.4.tar.gz
######################################################################## 100.0%
==> make CC=clang CFLAGS=
🍺 /usr/local/Cellar/pigz/2.4: 7 files, 154KB, built in 4 seconds
since I'm very new to command line I really don't know what this means and what I should do
I would appreciate your help
In the source code that you're looking at, there is a Makefile. When you run the command make, it executes the first default rule that it sees within that file.
When you run the command sudo make install, it looks inside of the Makefile and looks for the install rule. However, if you look at the Makefile of the software you're looking at, there is no install rule, hence the reason you get the error message:
make: *** No rule to make target `install'. Stop.
This is simply because there is no rule to install anything, so when you run that command, it simply will not do anything.
You can get a better understanding of this stuff by searching online about what Makefiles are, you'll find a bunch of resources. This can be a good starting point.

rJava not installing on new laptop

Just received a new GTX laptop, and for whatever reason, I am simply not able to install rJava. No matter what I do with the Java and JDK installs, I get the following message. I have been uninstalling, rebooting, re-installing, Java (latest versions) and RTools, and yet, I still cannot get rJava to install.
I am using Rstudio as my gui, and I have been able to successfully install rJava on an Ubuntu machine, but for whatever reason, I cannot get this to work on my windows GPU laptop.
I realize this is a question that appears to have been answered in other threads, but I am not seeing the same situation as mine. Something is different, and I can't figure it out.
What else can I provide to help someone help me?
* installing *source* package 'rJava' ...
** package 'rJava' successfully unpacked and MD5 sums checked
** using staged installation
Generate Windows-specific files (src/jvm-w32) ...
make: Entering directory '/Users/bfcgl/AppData/Local/Temp/RtmpOcP1l8/R.INSTALLa750514e17ed/rJava/src/jvm-w32'
C:/Rtools/mingw_64/bin/dlltool --as C:/Rtools/mingw_64/bin/as --input-def jvm64.def --kill-at --dllname jvm.dll --output-lib libjvm.dll.a
C:/Rtools/mingw_64/bin/gcc -O2 -c -o findjava.o findjava.c
C:/Rtools/mingw_64/bin/gcc -s -o findjava.exe findjava.o
make: Leaving directory '/Users/bfcgl/AppData/Local/Temp/RtmpOcP1l8/R.INSTALLa750514e17ed/rJava/src/jvm-w32'
Find Java...
JAVA_HOME=C:/PROGRA~1/Java/jdk-14
=== Building JRI ===
JAVA_HOME=C:/PROGRA~1/Java/jdk-14
R_HOME=C:/PROGRA~1/R/R-36~1.3
JDK has no javah.exe - using javac -h . instead
Creating Makefiles ...
Configuration done.
make -C src JRI.jar
make[1]: Entering directory '/Users/bfcgl/AppData/Local/Temp/RtmpOcP1l8/R.INSTALLa750514e17ed/rJava/jri/src'
C:/PROGRA~1/Java/jdk-14/bin/javac -h . -d . ../RList.java ../RBool.java ../RVector.java ../RMainLoopCallbacks.java ../RConsoleOutputStream.java ../Mutex.java ../Rengine.java ../REXP.java ../RFactor.java ../package-info.java
..\Rengine.java:120: error: invalid use of a restricted identifier 'yield'
while (!alive && !died) yield();
^
(to invoke a method called yield, qualify the yield with a receiver or type name)
1 error
make[1]: *** [Makefile.all:41: org/rosuda/JRI/Rengine.class] Error 1
make[1]: Leaving directory '/Users/bfcgl/AppData/Local/Temp/RtmpOcP1l8/R.INSTALLa750514e17ed/rJava/jri/src'
make: *** [Makefile.all:19: src/JRI.jar] Error 2
**** WARNING: JRI could NOT be built
Set IGNORE=1 if you want to build rJava anyway.
ERROR: configuration failed for package 'rJava'
* removing 'C:/Users/bfcgl/OneDrive/Documents/R/win-library/3.6/rJava'
Warning in install.packages :
installation of package ‘rJava’ had non-zero exit status
I had the same problem (although installing for the first time on an old laptop) and can confirm that JDK 11 solved the problem
I still looking for the same problem resolution, meanwhile, I tried with Java JDK 11 and I succeed in RStudio. If this helps, try it. I will keep searching for the answer why the new version is not working.
Regards,

How to install unison from source on macOS

I was wondering whether somebody managed to install unison's latest version from source, on its macOS machine (Here I am trying with Catalina). I followed the steps here :
I verified that I had XCode installed (otherwise forget about compiling anything :)
I cloned the official Git repository by running
git clone https://github.com/bcpierce00/unison.git
I moved to the newly created directory unison
cd unison
As mentionned in the documentation I then ran the make command telling it to build the text UI:
make UISTYLE=text
Result should have been an executable file called unisonbut instead of this I got the following error :
Blablabla$ make UISTYLE=text
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C src UISTYLE=text
UISTYLE = text
Building for Unix
NATIVE = true
THREADS = false
STATIC = false
OSTYPE =
OSARCH = osx
ocamlopt: ubase/rx.mli ---> ubase/rx.cmi
ocamlopt -g -unsafe-string -I lwt -I ubase -I system -I fsmonitor -I fsmonitor/linux -I fsmonitor/windows -I system/generic -I lwt/generic -ccopt -mmacosx-version-min=10.6 -c /Users/Shared/unison/src/ubase/rx.mli
make[1]: ocamlopt: No such file or directory
make[1]: *** [ubase/rx.cmi] Error 1
make: *** [text] Error 2
I then wondered whether XCode might not carry with him an OCaml compiler. So I installed the official one using MacPort therefore running:
sudo port install ocaml
sudo port install opam
I then rerun the same make command
make UISTYLE=text
This time the result looked better and ended with:
/Applications/Xcode.app/Contents/Developer/usr/bin/make tags
if [ -f "`which etags`" ]; then \
etags *.mli */*.mli *.ml */*.ml */*.m *.c */*.c *.txt \
*Makefile* \
; fi
However, still no unison file visible anywhere.
Question is ... since there is no error message, where is this executable?
Re-hello people from the Internet,
I managed to help myself here and got a nice and fresh unison executable on my macOS Catalina computer.
Basically, the base make tries to move the compilation product into /Users/<your_user>/bin/. which makes sense I guess, but is rarely used by us macOS users. So here is what I did to fix the issue :
Create the bin directory into your home
mkdir ~/bin
Re run the make by doing
make UISTYLE=text
Verify you have the executable by asking its version:
~/bin/unison -version
Happy me, I got the expected message back from my terminal:
unison version 2.51.3 (ocaml 4.08.1)
Hope it can help somebody.

FreeBSD make error File 5.19 supports only version 12 magic files. /usr/share/misc/magic.mgc is version 8

I'm having trouble reinstalling ProFTPD on a FreeBSD 10.1 setup. The server is newly upgraded from 10.0 to 10.1. When I start the make install clean process, these warnings first shows on screen.
===> proftpd-1.3.5_4 depends on shared library: libpcre.so
/usr/share/misc/magic, 93: Warning: Printf format `l' is not valid for type `lelong' in description `, %ld pages'
...
/usr/share/misc/magic, 15118: Warning: Printf format `l' is not valid for type `belong' in description `Volume %ld,'
/usr/share/misc/magic, 15609: Warning: Current entry does not yet have a description for adding a MIME type
file: File 5.19 supports only version 12 magic files. `/usr/share/misc/magic.mgc' is version 8
[: =: unexpected operator
- not found
And after i while, the make process stops with this error:
/bin/ln -s libpcre.so.1 /usr/ports/devel/pcre/work/stage/usr/local/lib/libpcre.so.3
====> Compressing man pages (compress-man)
===> Installing for pcre-8.35_2
===> Checking if pcre already installed
===> pcre-8.35_2 is already installed
You may wish to ``make deinstall'' and install this port again
by ``make reinstall'' to upgrade it properly.
If you really wish to overwrite the old port of pcre
without deleting it first, set the variable "FORCE_PKG_REGISTER"
in your environment or the "make install" command line.
*** Error code 1
Stop.
make[3]: stopped in /usr/ports/devel/pcre
*** Error code 1
Stop.
make[2]: stopped in /usr/ports/devel/pcre
*** Error code 1
Stop.
make[1]: stopped in /usr/ports/ftp/proftpd
*** Error code 1
Stop.
make: stopped in /usr/ports/ftp/proftpd
Seems that the file /usr/share/misc/magic.mgc is of a wrong version?
This might happens when I was upgrading from 10.0-RELEASE-p12 to 10.1-RELESE-p1?
If i run make install clean of the ProFTP port, and disable support for pcre, the process and install is successful.
But I believe that something is still broken?
My programming skills are limited, and also this level of error.
Please let me know if you have any ideas,
Thanks,
First of all, proftpd 1.3.5 is available as a binary package, it's much simpler to install it that way (pkg install proftpd).
Second - at first it looked like a port bug; as Etan said, there is a shell syntax error (something like '[ x == y ]' instead of '[ x = y ]'); those are common, and ports contain patches to fix those. However, there is a binary package, and packages are built from ports ("make package"), so port obviously does work on package build machines. So it's probably something specific to your environment.
If you really want to build from ports, try this: first, reinstall pcre. For some reason it had to be rebuilt, but failed to install, because it's already installed. So, "cd /usr/ports/*/pcre && make clean all deinstall reinstall". That should get rid of the second error. Then go back to "../*/proftpd" and see how far it goes.
But really, I'd try packages first. They have nothing in common with old pkg_add system, and are really nice.
freebsd-update diff for FreeBSD-SA-14:28.file seems wrong, and it breaks file(1).
Therefore simply pkg install file will be a workaround.

Trouble compiling mono from source via cygwin on windows

I work off my i: drive
I've downloaded the following mono source file mono-2.11.2.tar.bz2
I've installed the windows version of mono v2.11.2 to "I:\Mono-2.11.2"
I installed cygwin as per the following instructions found on the following webpage http://shana.worldofcoding.com/en/mono_cygwin_tutorial.html
I replaced the "make.exe" with the one from the mono website as per instruction. I had to get one more file "cygintl-2.dll" which resides in cygwin package libintl2/libintl2-0.12.1-3
I added the following my .bashrc file. I had to change "c/Mono-2.11.2/bin" to "i/Mono-2.11.2/bin"
PATH=.:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/i/Mono-2.11.2/bin
PKG_CONFIG_PATH=.:/lib/pkgconfig:/cygdrive/i/Mono-2.11.2/lib/pkgconfig
LD_LIBRARY_PATH=.:/usr/local/lib:/usr/lib:/lib:/cygdrive/i/Mono-2.11.2/lib
export PATH PKG_CONFIG_PATH LD_LIBRARY_PATH
I placed my mono source under the folder specified: /usr/src/mono/
So my dirs looks like:
i:
i:\cygwin\
i:\cygwin\usr\src\mono
i:\cygwin\usr\src\mono\mono
i:\cygwin\usr\src\mono\mcs etc etc
i:\Mono-2.11.2\bin etc
Now the instructions says I must change dirs to /usr/src/mono/mono and run "./autogen.sh --prefix=/usr/local" from the cygwin terminal
However that doesnt work. Running the above command from /usr/src/mono/ works fine.
Now heres the problem. The next instruction is to run "make". However this comes up with :
$ make
make: *** No targets specified and no makefile found. Stop.
I even tried running it from the /usr/src/mono/mono dir. Still no luck.
Can someone please suggest what I should do to be able to build the mono source on windows 7?
Update:
I needed to install the **gnu c++ compiler (g++)**. I just ran the cygwin setup again, searched for g++ and installed that. The autogen.sh ran to completion
The last lines of ./autogen.sh --prefix=/usr/local output should
look like bellow with Now type make to compile at the end. And it
generats Makefile in the same directory.
I think in your case ./autogen.sh failed. You can keep a log file
and check what it is complaining about.
./autogen.sh --prefix=/usr/local 2>&1 | tee autogen.log
More info: http://en.wikipedia.org/wiki/GNU_build_system
The end of the ./autogen.sh ouptut:
config.status: executing quiet-libtool commands
config.status: executing default commands
mcs source: mcs
olive source:
Engine:
GC: sgen and bundled Boehm GC with typed GC and parallel mark
TLS: __thread
SIGALTSTACK: yes
Engine: Building and using the JIT
oprofile: no
BigArrays: no
DTrace: no
LLVM Back End: no (dynamically loaded: no)
Libraries:
Moon Profile: no (boehm)
MonoDroid: no
MonoTouch: no
Mobile: no
JNI support: IKVM Native
libgdiplus: assumed to be installed
zlib: system zlib
Now type `make' to compile

Resources