DPDK Compilation Error When Building igb_uio - makefile

I am trying to test out the DPDK sample applications in a CentOS 6.4 VM running under KVM, but I can't get DPDK to compile.
When trying to run
make install T=x86_64-default-linuxapp-gcc -n
from DPDK-2.0.0, I get the following output:
[...]
make S=lib/librte_eal/linuxapp -f /home/dpdk-1.6.0r2/lib/librte_eal/linuxapp/Makefile -C /home/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp all
[ -d /home/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio ] || mkdir -p /home/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio
echo "== Build lib/librte_eal/linuxapp/igb_uio"
make S=lib/librte_eal/linuxapp/igb_uio -f /home/dpdk-1.6.0r2/lib/librte_eal/linuxapp/igb_uio/Makefile -C /home/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio all
if [ ! -f igb_uio.c ]; then ln -nfs /home/dpdk-1.6.0r2/lib/librte_eal/linuxapp/igb_uio/igb_uio.c . ; fi
if [ ! -f Makefile ]; then ln -nfs /home/dpdk-1.6.0r2/lib/librte_eal/linuxapp/igb_uio/Makefile . ; fi
make -C /lib/modules/2.6.32-358.el6.x86_64/build M=/home/dpdk-1.6.0r2/x86_64-default-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio O=/lib/modules/2.6.32-358.el6.x86_64/build \
CROSS_COMPILE=
make: *** /lib/modules/2.6.32-358.el6.x86_64/build: No such file or directory. Stop.
make[7]: *** [igb_uio.ko] Error 2
make[6]: *** [igb_uio] Error 2
make[5]: *** [linuxapp] Error 2
make[4]: *** [librte_eal] Error 2
make[3]: *** [lib] Error 2
make[2]: *** [all] Error 2
make[1]: *** [x86_64-native-linuxapp-gcc_install] Error 2
make: *** [install] Error 2
I've installed all the required packages specified here:
http://dpdk.org/doc/guides/linux_gsg/sys_reqs.html
and I've seen and attempted the solution here:
Intel DPDK Compilation Error
The issue appears for both DPDK2-0.0 and 1.6.0.
Also, just to make sure; running
ls /lib/modules/2.6.32-358.el6.x86_64/build
returns output:
/lib/modules/2.6.32-358.el6.x86_64/build
so the directory definitely exists..
I've managed to compile DPDK in a CentOS 6.6 KVM on the same host without issue, but this time around I keep getting this error.
Also it does need to be CentOS 6.4, sadly.
Update:
Added verbose output above ^

Just solved it:
I was using kernel version 2.6.32-358.el6.x86_64, and I had to update to version 2.6.32-504.23.4.el6.x86_64 to get rid of this error.
Additionally, I ran into another error after this which included the line
previous definition of ‘skb_set_hash’ was here
This happened because of an issue with the DPDK version I was using (1.6) Trying 2.0 fixed this.
Then I got the following error when running any of the module-related options of the setup.sh script:
Traceback (most recent call last):
File "tools/dpdk_nic_bind.py", line 536, in <module>
main()
File "tools/dpdk_nic_bind.py", line 532, in main
get_nic_details()
File "tools/dpdk_nic_bind.py", line 225, in get_nic_details
dev_lines = check_output(["lspci", "-Dvmmn"]).splitlines()
File "tools/dpdk_nic_bind.py", line 120, in check_output
stderr=stderr).communicate()[0]
File "/usr/lib64/python2.6/subprocess.py", line 642, in __init__
errread, errwrite)
File "/usr/lib64/python2.6/subprocess.py", line 1234, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
THIS error was because I didn't have pciutils installed and the script couldn't find lspci.
Hope this helps anyone else with the same issues.

When compiling the DPDK, you suppose to have dependency packages and besides that you must have kernel headers of the same kernel version. If you don't install kernel headers then "/lib/modules/your-kernel-version/build" folder is invalid otherwise it is valid.

Related

make [2]: **** [Makefile:44: envi_slc_decode] Error 1, while installing gmtsar in fedora 32

This is my first question in stack overflow and hope I make it clear.
I am trying to install a program (gmtsar) in fedora 32. However, the compilation was not complete and two errors return at the end.
I ran the following commands:
sudo -i
cd /usr/local
git clone --branch 6.0 https://github.com/gmtsar/gmtsar GMTSAR
cd GMTSAR
autoconf
./configure --with-orbits-dir=/usr/local/orbits
make
make install
after make and mak install the following errors return:
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:44: envi_slc_decode] Error 1
make[2]: Leaving directory '/usr/local/GMTSAR/preproc/ENVI_preproc/ENVI_SLC_decode'
make[1]: *** [Makefile:8: all] Error 2
make[1]: Leaving directory '/usr/local/GMTSAR/preproc/ENVI_preproc'
make: *** [Makefile:37: preprocess] Error 2
I followed the same procedures in ubuntu 16.04 and the compilation was complete without errors.
Can anyone help me understand why I got these errors and how to fix them, please?

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

miktex installation error: make: *** No targets specified and no makefile found. Stop

I am trying to install miktex on Ubuntu 14.04. I am following the instructions at http://miktex.org/howto/build-unx. But when I type the command make, the following error is shown:
make: *** No targets specified and no makefile found. Stop.
I tried the command ./configure, but it resulted in the following error:
bash: ./configure: No such file or directory
Anyone knows how to solve it??

Why am I getting this aclocal error?

I'm trying to compile libbsd from source on Ubuntu 13.04. I'm using a toolchain to cross-compile, but automake is on the local machine. I have aclocal-1.13 in the PATH and everything, but I'm still getting this error. I've tried looking them up but can't get any lead. What's going on here?
<...>
config.status: executing libtool commands
CDPATH="${ZSH_VERSION+.}:" && cd .. && /bin/bash /home/me/libbsd/build-aux/missing aclocal-1.13 -I m4
error: cannot get project version.
configure.ac:9: error: AC_INIT should be called with package and version arguments
/usr/share/aclocal-1.13/init.m4:23: AM_INIT_AUTOMAKE is expanded from...
configure.ac:9: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal-1.13: error: echo failed with exit status: 1
make: *** [../aclocal.m4] Error 1
Any help is greatly appreciated.
The error here is configure.ac:9: error: AC_INIT should be called with package and version arguments.
You are getting this error because on line 9 of your configure.ac you are not passing package and version arguments to AC_INIT.
The exact information can be found here: https://www.gnu.org/software/automake/manual/automake.html#Public-Macros
Namely,
If your configure.ac has:
AC_INIT([src/foo.c])
AM_INIT_AUTOMAKE([mumble], [1.5])
You should correct it as follows:
AC_INIT([mumble], [1.5])
AC_CONFIG_SRCDIR([src/foo.c])
AM_INIT_AUTOMAKE
Although the other notes around it are important too imho.

Error building LAPACK on Redhat 4.1

I am trying to build LAPACK (the full version) with ATLAS on Redhat 4.1. I have been successful in building ATLAS depending upon the tarfile of lapack:
atlas/configure --prefix=HOME/atlas --with-netlib-lapack-tarfile=HOME/lapack-3.4.1.tgz
make build
make check
make install
But I need the whole installation of LAPACK. I found
http://math-atlas.sourceforge.net/atlas_install/atlas_install.html
and
http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CGcQFjAA&url=http%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fdownload%3Fdoi%3D10.1.1.136.5309%26rep%3Drep1%26type%3Dpdf&ei=3C8YUKaqOIqm8AT6kYC4Cg&usg=AFQjCNHKbHg1H0qupmzQbj9tGq3tsmXRDQ&sig2=etIB36nxjasjUg4sEwQ0DQ
which suggest changing a few lines of the default make.inc.example to build the rest of LAPACK. However, I am unsuccessful in getting even the default build of LAPACK to work:
cp make.inc.example make.inc
compute-1-29.local make
( cd INSTALL; make; ./testlsame; ./testslamch; ./testdlamch; \
./testsecond; ./testdsecnd; ./testieee; ./testversion )
make[1]: Entering directory `/home/jmorgens/lap/lapack/INSTALL'
gfortran -O0 -c slamch.f -o slamch.o
/share/apps/gcc-trunk/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.2.0/f951: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory
make[1]: *** [slamch.o] Error 1
make[1]: Leaving directory `/home/jmorgens/lap/lapack/INSTALL'
ASCII character set
Tests completed
/bin/sh: ./testslamch: No such file or directory
/bin/sh: ./testdlamch: No such file or directory
/bin/sh: ./testsecond: No such file or directory
/bin/sh: ./testdsecnd: No such file or directory
/bin/sh: ./testieee: No such file or directory
/bin/sh: ./testversion: No such file or directory
make: *** [lapack_install] Error 127
Suggestions?

Resources