make ARCH=x86_64 CROSS_COMPILE ....... Error 2 while installing rtl8723de wifi drivers - linux

I was trying to install rtl8712de wifi drivers in my Debian 10 PC.
I tried the following code:
sudo apt update
git clone https://github.com/smlinux/rtl8723de.git
cd rtl8723de
make
After I ran the make command, I got the following error:
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules//build M=/home/dantu/Downloads/rtl8723de modules
make[1]: *** /lib/modules//build: No such file or directory. Stop.
make: *** [Makefile:1886: modules] Error 2
I tried so many steps online. I installed gcc build tools, updated all my packages, tried other repositories for the wifi drivers. But nothing seems to help.

It might solve the problem to change all occurrences of /lib/modules//build inside the Makefile with /lib/modules/build or /lib/modules/your_kernel_version/build. //build seem like a typo.

Related

Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y

I’m big enthusiast of Manjaro since 2015 but today I got a problem that I couldn’t resolve on my own. After big updates done few days ago (by update manager) I have a problem with compiling Kernel Drivers on kernel 4.15.18-1. After call make I got error:
make -C /usr/lib/modules/4.15.18-1-MANJARO/build M=/run/media/mati/common/hello_world modules
make[1]: Wejście do katalogu '/usr/lib/modules/4.15.18-1-MANJARO/build'
**Makefile:974: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel". Stop.**
make[1]: Opuszczenie katalogu '/usr/lib/modules/4.15.18-1-MANJARO/build'
make: *** [Makefile:4: all] Błąd 2
The problem is that I cannot install mentioned libraries and command: pacman -Q libelf
returns
libelf 0.170-1
i have no idea what happend, I tried another kernels (I have few versions installed) but each has problems (e.g. the newest, experimental 4.17 has problem with asm goto of gcc compiler). I started learning Linux Kernel Drivers programming but now I can’t learn because of these compilation problems … anyone can help me ?
(Hope my english is understanable).
Greetings !
I got this error while setting up VirtualBox in my Fedora OS 29, I issued the following command and this issue got resolved.
sudo dnf install elfutils-libelf-devel
Are you able to install these packages on your system?
elfutils
elfutils-libelf-devel
libelf-dev
libelf-devel
May require dependencies such as: zlib-devel
For me I had to install elfutils-devel first then install eflutils and eflutils-libelf-devel. libelf-dev and libelf-devel could not be found but when I ran /sbin/vboxconfig again this time it did not error out. I ran the check, "systemctl status vboxdrv" and this time it showed Active: as Active (exited) and I was able to spin up the VM.

Trying to compile adxl345 as a module in 4.4.54-ti-r93 kernel but get error

I have downloaded below debian image from latest images site
Debian 8.7 2017-03-19 4GB SD LXQT
I have attached a adxl345 accelerometer, and with user space tools its working fine.
Now I am trying to attach a kernel driver i.e in adxl345. I put the source files in
/home/debian/Desktop/adxl345
and issued make.
I get this error
root#beaglebone:/home/debian/Desktop/adxl345# make
make -C /lib/modules/4.4.54-ti-r93/build M=/home/debian/Desktop/adxl345 modules
make[1]: *** /lib/modules/4.4.54-ti-r93/build: No such file or directory. Stop.
Makefile:13: recipe for target 'default' failed
make: *** [default] Error 2
I checked
root#beaglebone:/lib/modules/4.4.54-ti-r93# ls
extra modules.builtin modules.devname modules.symbols.bin
kernel modules.builtin.bin modules.order
modules.alias modules.dep modules.softdep
modules.alias.bin modules.dep.bin modules.symbols
there is no build directory. I tried to update kernel headers
sudo apt-get install linux-headers-linux-headers-4.4.54-ti-r93
but it says
E: Unable to locate package linux-headers-linux-headers-4.4.54-ti-r93
How I am going to build the drivers?
I did not updated cache
sudo apt-get update
Once updated we can check at /lib/modules
there will be a build directory.
Now it should be building.

Arch Linux: make - no such file or directory

I have a problem by compiling a driver (WLAN-dongle Edimax ac600).
I´m using an Archlinux on my raspberry-pi and want to install my dongle for 5Ghz. During comiling the driver I get this message. I tried to install the linux-headers without success. (in other threads it will be a solution)
Here is my output of make:
[root#raspberry_pi_1 rtl8812AU]# make make ARCH=arm CROSS_COMPILE= -C
/lib/modules/4.9.43-1-ARCH/build M=/root/rtl8812AU modules make[1]:
*** /lib/modules/4.9.43-1-ARCH/build: No such file or directory. Stop. make: *** [Makefile:1576: modules] Error 2
I found out that my pi has a two-arch...-directories:
4.9.43-1-ARCH/
4.9.51-1-ARCH/
Only the second one has the build directory...
How can I fix the problem?!
thanks a lot,
a Linux noob...
[Reputation is too low to post comment]
Use uname -r to make sure which version of the kernel you use.
If it's 4.9.43 : you have newer version of the kernel and this confuse your installer. You should reboot on the 51 one
If it's 4.9.51 : You messed up your installation step and are trying to compile for an old target. You should review the compilation process and change every mention of the 4.9.43 to 4.9.51 since it's the version you use.
If you upgrade your kernel, you may have to rebuild the thing again (You may like to have script in the future ;) ) with the new kernel version.

Toolchain binaries cannot be found

Trying to build recent version of u-boot bootloader for my mini2440 ARM board I managed to download a toolchain package from codesourcery and extract it to following path: /usr/local/arm-2008q3/
I also exported following values for current session:
export PATH=$PATH:/usr/local/arm-2008q3/bin
export CROSS_COMPILE=arm-none-linux-gnueabi-
When I run make I get a following output and I cant figure out why:
make: arm-none-linux-gnueabi-gcc: Command not found
for dir in tools examples api_examples ; do make -C $dir _depend ; done
make[1]: arm-none-linux-gnueabi-gcc: Command not found
make[1]: Entering directory `/home/deth/uboot/mini2440/tools'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/home/deth/uboot/mini2440/tools'
make[1]: arm-none-linux-gnueabi-gcc: Command not found
make[1]: Entering directory `/home/deth/uboot/mini2440/examples'
/bin/sh: 1: arm-none-linux-gnueabi-gcc: not found
I double checked everything and binaries indeed reside in mentioned folder but... Please explain where I'm wrong.
Well, after almost three days of headbanging into the wall I managed to solve this. To be honest I might have never solved it if occasionally hadn't installed the COdesourcery toolchain with executable installer which they also provide. After doing that the manually unpacked version started to execute! This of course led to a conclusion that there were libraries missing. I tried to reproduce the problem on separate virtual machine and voila, here are couple of words that solved the whole issue:
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0
Hope this will help someone, and thanks to everyone for help!

installing QODBC driver for linux

I am trying to install QODBC drivers on ubuntu 13.10 for Qt 5.0.2. I have followed the official documentation (see http://qt-project.org/doc/qt-5/sql-driver.html#qodbc) but am stuck at one of the steps. When I try to do
qmake "INCLUDEPATH+=/usr/local/unixODBC/include" "LIBS+=-L/usr/local/unixODBC/lib -lodbc"
it just shows me the help manual for qmake and does nothing.
So I tried to make an empty Makefile and then passed it as an argument
qmake "INCLUDEPATH+=/usr/local/unixODBC/include" "LIBS+=-L/usr/local/unixODBC/lib -lodbc" Makefile
when I try to "make" the generated Makefile, it shows the following errors:
Makefile:183: warning: overriding commands for target `Makefile'
Makefile:130: warning: ignoring old commands for target `Makefile'
make: Circular Makefile <- Makefile dependency dropped.
make: Circular Makefile <- Makefile dependency dropped.
make: Nothing to be done for `first'.
I have just managed to make the odbc driver installation. The main problem here seems to be that you are not including the "pro" target file.
Here all the steps are:
Go to odbc pluggin path. In my case: cd ~/Qt/5.3/Src/qtbase/src/plugins/sqldrivers/odbc
Run qmake including the target LIB paths and also the pro file:
~/Qt/5.3/gcc_64/bin/qmake -makefile "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lodbc" odbc.pro
make and then sudo make install
I hope it will be usefull.
Regards,

Resources