Trying to install LTTng on Raspberry Pi 3 running Raspbian Jessie (Debian) - raspberry-pi3

I'm trying to install LTTng on a Raspberry Pi 3 running Raspian Jessie (Debian). The directions say that with that distribution, I need to build it from source. When I do, and try to execute the make, I get the following error:
/usr/bin/make -C /lib/modules/4.4.34-v7+/build M=/tmp/tmp.tHMTTCom3X/lttng-modules-2.9.0 CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m modules
make[1]: Entering directory '/lib/modules/4.4.34-v7+/build'
make[1]: *** No rule to make target 'modules'. Stop.
make[1]: Leaving directory '/lib/modules/4.4.34-v7+/build'
Makefile:110: recipe for target 'modules' failed
make: *** [modules] Error 2
(It looks to me that there is a rule for that target.)
Has anyone done this, or have any tips or ideas on how to do this?
Thanks!

You might be missing the headers for the running kernel, try installing the raspberrypi-kernel-headers package :
sudo apt-get install raspberrypi-kernel-headers

Related

Makefile:77: *** missing separator. Stop

Hi I am trying to install systemC on WSL2, when I run sudo make I seem to be getting this error
Making all in src
make[1]: Entering directory '/home/ryans/systemc-2.3.4/src'
Makefile:77: *** missing separator. Stop.
make[1]: Leaving directory '/home/ryans/systemc-2.3.4/src'
make: *** [Makefile:557: all-recursive] Error 1
I have looked at answers, solution 1 and solution2 but they don't seem to apply to my case because the file in question do not have a space or a tab at line 77.
Seems like the right way to install systemC on WSL is the run the following commands in the uncompressed .tar folder,
sudo aclocal
sudo automake --add-missing
sudo autoupdate
before making the objdir with the other instructions can be followed here.

How to recompile Torvalds Linux from Mac OSX High Sierra

I have been trying for hours to recompile Linux kernel of https://github.com/torvalds/linux from my MacBook Pro and at the end, still stuck. Hard to find a tutorial to understand how to recompile it, headers missing, bla bla bla.
http://www.howardism.org/Technical/Linux/Rebuilding_Kernel.html
https://medium.com/#ssreehari/implementing-a-system-call-in-linux-kernel-4-7-1-6f98250a8c38
https://tssurya.wordpress.com/2014/08/19/adding-a-hello-world-system-call-to-linux-kernel-3-16-0/ (but useless since I have the v4.17)
PS: I tried first adding a syscall website because that's what I'm trying to do at first.
At the begining, I got a .config not found.
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[3]: *** [silentoldconfig] Error 1
make[2]: *** [silentoldconfig] Error 2
make[1]: *** No rule to make target `include/config/auto.conf', needed by`include/config/kernel.release'. Stop.
Unlike in some web-links, the conf used doesn't exist or something else is wrong, so I'm creating a new .config from "make menuconfig" (as some answers on the web).
Then, I try to compile again. There is some command I tried:
- make
emixam23#Maximes-MBP:~/Workspace/linux-kernel$ make
getconf: no such configuration parameter `LFS_CFLAGS'
getconf: no such configuration parameter `LFS_LDFLAGS'
getconf: no such configuration parameter `LFS_LIBS'
/bin/sh: scripts/basic/modules.order: Permission denied
make[1]: *** [scripts/basic/modules.order] Error 1
make: *** [scripts_basic] Error 2
- sudo make
emixam23#Maximes-MBP:~/Workspace/linux-kernel$ sudo make
Password:
getconf: no such configuration parameter `LFS_CFLAGS'
getconf: no such configuration parameter `LFS_LDFLAGS'
getconf: no such configuration parameter `LFS_LIBS'
HOSTCC arch/x86/tools/relocs_32.o
In file included from arch/x86/tools/relocs_32.c:2:
arch/x86/tools/relocs.h:13:10: fatal error: 'elf.h' file not found
#include <elf.h>
^~~~~~~
1 error generated.
make[1]: *** [arch/x86/tools/relocs_32.o] Error 1
make: *** [archscripts] Error 2
After that, I begin to search if the mistake was coming from my make command and I found this:
- sudo make -j 4 && sudo make modules_install -j 4 && sudo make install -j 4
emixam23#Maximes-MBP:~/Workspace/linux-kernel$ sudo make -j 4 && sudo make modules_install -j 4 && sudo make install -j 4
getconf: no such configuration parameter `LFS_CFLAGS'
getconf: no such configuration parameter `LFS_LDFLAGS'
getconf: no such configuration parameter `LFS_LIBS'
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
HOSTCC arch/x86/tools/relocs_32.o
HOSTCC arch/x86/tools/relocs_64.o
HOSTCC arch/x86/tools/relocs_common.o
In file included from arch/x86/tools/relocs_common.c:2:
arch/x86/tools/relocs.h:13:10: fatal error: 'elf.h' file not found
#include <elf.h>
^~~~~~~
In file included from arch/x86/tools/relocs_32.c:2:
arch/x86/tools/relocs.h:13:10: fatal error: 'elf.h' file not found
#include <elf.h>
^~~~~~~
In file included from arch/x86/tools/relocs_64.c:2:
arch/x86/tools/relocs.h:13:10: fatal error: 'elf.h' file not found
#include <elf.h>
^~~~~~~
1 error generated.
make[1]: *** [arch/x86/tools/relocs_common.o] Error 1
make[1]: *** Waiting for unfinished jobs....
1 error generated.
1 error generated.
make[1]: *** [arch/x86/tools/relocs_32.o] Error 1
make[1]: *** [arch/x86/tools/relocs_64.o] Error 1
make: *** [archscripts] Error 2
make: INTERNAL: Exiting with 5 jobserver tokens available; should be 4!
So, based on the errors I got, I searched about <elf.h> and it seems to be something about Android. To me, it doesn't have any links, I mean, I feel like this.
The thing is, I just downloaded a Linux kernel (Torvalds), I added my syscall, now I'm trying to recompile it and use it with vagrant. That's it. Why does it seem so complicated? I will be honest, I feel completely lost... Do you have any idea if I'm right but I just missunderstood something, or I'm totally out of the good way?
I am working from a MacBook Pro:
MacBook Pro (Retina, 15-inch, Mid 2015)
macOS High Sierra
Version 10.13.1
Thanks for any hints/help
Max
PS: Edit 1: Add of my edits: https://github.com/Emixam23/linux-kernel/commit/d7d7b66cc6513e7b69fd2122b880c259628c438a
Vagrant
I found a workaround which is vagrant :) With vragrant you can recompile the kernel from a Mac OS. You just have to vagrant init then you connect yourself to the vagrant VM vagrant ssh. Once your inside the vagrant VM, run cd / and you will arrive to the root of your machin, which is also where you created the VM, so you can do whatever you want from Mac OS and compile from the terminal make -j 4 :)
Check your tool-chain. It is not just android thing. https://linux.die.net/man/5/elf.
Please go ahead if you like being challenged. cause this will not be straight forward.
If your task is just compiling code use virtual machine / other linux machine it will be quicker.
But if you are curious to check how things work and getting them work on mac for future compilations without vm. then continue.try adding those header files. in /usr/include as per this

Using mingw-w64 and ./configure --host=i686-w64-mingw32.static, make fails and Makefile CC variable looks wrong

I am new to compiling.
I am trying to compile iperf3 for Windows 10 because there is no official Windows distribution of iperf3 and for the learning experience. I am trying to do so on the new Windows Subsystem for Linux feature via Bash on Ubuntu on Windows, also for the learning experience.
I installed mingw-w64, which should give me the proper compiler and environment necessary for cross-compiling:
sudo apt-get install mingw-w64
This put two directories into my /usr directory:
i686-w64-mingw32
x86_64-w64-mingw32
It also put a bunch of things that look like compilers into /usr/bin.
I unzipped the .tar.gz file from iperf3 and navigated into it. Then, I run ./configure --host=i686-w64-mingw32.static and it completes without errors.
I note that the output of the command has a worrisome line: checking for i686-w64-mingw32.static-gcc... no
I note that the Makefile's CC variable is set to gcc, which doesn't sound like the proper compiler.
Then, I run make. It fails with errors:
collect2: error: ld returned 1 exit status
make[2]: *** [iperf3] Error 1
make[2]: Leaving directory `/home/snip/iperf3/iperf-3.1.4/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/snip/iperf3/iperf-3.1.4/src'
make: *** [all-recursive] Error 1
I also see the line: libtool: warning: undefined symbols not allowed in i686-w64-mingw32.static shared libraries; building static only
I think that the ./configure is not working correctly since it appears to have not found the right compiler for my --host argument and put it in the Makefile.
What am I doing wrong?
EDIT:
I changed the command to ./configure --host=i686-w64-mingw32 per comments and it completes without error. But no makefile is created so make yields make: *** No targets specified and no makefile found. Stop.
What am I doing wrong, now?
EDIT 2:
Looks like the ./configure actually is failing. Last line of its output is nanosleep() required for timing operations., which seems to mean that its missing a library for nanosleep.
How do I get nanosleep?
mingw doesn't support nanosleep. So programs using it cannot be compiled using mingw-w64.

Binutils build fails on Mac OS X 10.10.5 Yosemite

After downloading the package of GNU Binutils 2.25
I followed the instructions on "Installing Binutils":
./cnofigure
make
errors happened after build:
../../binutils-gdb/binutils/nm.c:1733:28: error: 'sbrk' is deprecated [-Werror,-Wdeprecated-declarations]
char *lim = (char *) sbrk (0);
/usr/include/unistd.h:582:7: note: 'sbrk' has been explicitly marked deprecated here
void *sbrk(int);
1 error generated.
make[4]: *** [nm.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-binutils] Error 2
make: *** [all] Error 2
I did some research on net and they said using this command
./configure --prefix=/usr --disable-werror
and I get
/Library/Developer/CommandLineTools/usr/bin/make all-recursive
make[8]: Nothing to be done for 'all-am'.
make[1]: Nothing to be done for 'all-target'.
(what does that mean "nothing to be done for all-am and all-target")
I don't know what to do anymore.
Is it a bug or it's me doing something wrong?
Please help.
You really would make life easier for yourself if you used homebrew as a package manager on OSX.
Goto the homebrew website and copy and paste the one-line install script into your Terminal.
Then you can install binutils simply by typing
brew install binutils
If, down the line, you want to find GNU sed, or ImageMagick, you can just do
brew search sed
or
brew search imagemagick
then
brew install sed
If you have any problems, just run
brew doctor
If you want to update all your packages, just run
brew update
brew upgrade --all
More cool ideas and suggestions here.
After build failure , you should clean previously generated object files
So,
make clean
./configure --prefix=/usr --disable-werror
make

Installing GitLab CI Runner on Raspberry Pi 2 (Raspbian)

I want to install the GitLab Runner for CI on my RPI 2 machine running Raspbian.
There is no armhf package available or mentioned on the official page: https://gitlab.com/gitlab-org/omnibus-gitlab-runner/blob/master/doc/install/README.md
and I could not find one on the net.
I've tried building it from source but it failed to make ruby 2.1.5
Tried to install it as per the follwing guide:
http://qiita.com/honeniq/items/b5c767f947725280662e
but it fails:
Installing ruby-2.1.5...
BUILD FAILED (Raspbian GNU/Linux 7 using ruby-build 20150519-11-g6f1ed3d)
Inspect or clean up the working tree at /tmp/ruby-build.20150616110149.29126
Results logged to /tmp/ruby-build.20150616110149.29126.log
Last 10 log lines:
make[1]: Nothing to be done for 'srcs'.
make[1]: Leaving directory '/tmp/ruby-build.20150616110149.29126/ruby-2.1.5'
generating transdb.h
linking static-library libruby-static.a
verifying static-library libruby-static.a
collect2: ld returned 1 exit status
Makefile:217: recipe for target 'libruby-static.a' failed
make: *** [libruby-static.a] Error 1
make: *** Waiting for unfinished jobs....
transdb.h unchanged
Have any of you managed to install and run the CI runner?
Managed to install an unofficial runner.
Guide here:
https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-manually.md
You need to have an account and be signed in in order to be able to read the guide.

Resources