open2: exec of lzma -c0 failed a internal-package Error 2 while building in Theos - theos

I keep getting make: * [internal-package] Error 2 when trying to build a tweak I'm working on. Ive never had this issue before, and its not specifying whats wrong. Here is what it says:
yinyongzhen#eagle:Desktop/tingtweak ‹master*›$ make package
Making all for tweak tingtweak…
make[2]: Nothing to be done for internal-library-compile'.
Making stage for tweak tingtweak…
dm.pl: building packagecom.yz.tingtweak:iphoneos-arm' in `./packages/com.yz.tingtweak_0.0.1-1+debug_iphoneos-arm.deb'
open2: exec of lzma -c0 failed at /Users/yinyongzhen/theos/bin/dm.pl line 113.
make: *** [internal-package] Error 2

Try running the lzma command in terminal, if it's missing, you need to:
brew install xz

For those facing the same issue, make sure dpkg is installed on your machine. It is require for Theos. Installing it will get rid of the error with lzma (it seems to be part of).
brew install dpkg

Related

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

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.

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.

Linux kernel 'make rpm-pkg' throws error

I am trying to create a custom kernel rpm. So I made use of "make rpm-pkg".
Everything was going fine until it hit this error.
..
..
INSTALL sound/usb/line6/snd-usb-toneport.ko
INSTALL sound/usb/line6/snd-usb-variax.ko
INSTALL sound/usb/misc/snd-ua101.ko
INSTALL sound/usb/snd-usb-audio.ko
INSTALL sound/usb/snd-usbmidi-lib.ko
scripts/Makefile.fwinst:43: *** mixed implicit and static pattern rules. Stop.
make[2]: *** [_modinst_post] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.jJi4sq (%install)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.p88MqU (%install)
make[1]: *** [rpm-pkg] Error 1
make: *** [rpm-pkg] Error 2
I understand there is something wrong with Makefile declarations, but also wondering if anyone has hit this issue.
If you are using make version 3.81 or 3.82 then this is likely the known make "bug" discussed here.
Specifically a change to what make believes is a meaningful set of targets to specify in a single list changed in an incompatible way and the kernel had been using a set of targets that became invalid.
The fix, after some back and forth between the GNU Make maintainer and some concerned other developers, was to convert the fatal error into a warning (at least temporarily).
I was able to fix this. Apparently its an issue with the UTS_MACHINE not being right for arm64. It should be aarch64 so that the packaging scripts use it right. there's also small tweak in the script that generates the rpm spec file.
So 'make' is not an issue in this case.

Automake - difficulty with installing version 'automake-1.14.1'

I have problem with installing automake 1.14.1 on Rapbian (2014-09-09-wheezy-raspbian) distro. I wrote sh ./configure and then I wrote make then terminal wrote me that:
$ make
CDPATH="${ZSH_VERSION+.}:" && cd . && "/home/pi/LIBRARY/automake-1.14./twrap/aclocal-1.14"
Can't locate /home/pi/LIBRARY/automake-1.14.1/bin/aclocal in #INC (#INC contains:
/etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5usr
/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at
/home/piLIBRARY/automake-1.14.1/t/wrap/aclocal-1.14 line 29.Makefile:2493: recipe
for target 'aclocal.m4' failed make: *** [aclocal.m4] Error 2
I don't know what does it mean. Can you help me what to do next?
I found out what is problem in. I use filezilla to transport automake to Raspberry Pi (running on Raspbian) in unpacked form. When I transported packed automake.tar through fillezila and then unpacked it on RPi and did installation of this one then I have no problem. However many thanks for all your answers and an effort to help me.
recipe for target 'aclocal.m4' failed make: *** [aclocal.m4] Error 2
Is saying where the failure occurred. So the failure is occurring when the make file calls aclocal.m4. This is due to that Can't locate /home/pi/LIBRARY/automake-1.14.1/bin/aclocal so check out if /home/pi/LIBRARY/automake-1.14.1/bin/aclocal can be found and if not then install what is needed to resolve the error.
I have successfully built on the same raspbian the automake-1.14.1 from ftp.gnu.org/gnu/automake source tarball. The bin/aclocal script should be created at 'make' stage. Makefile.in is already included in the tarball. There can be several reasons to such errors as you typed in your message:
Wrong distribution source is being used: use any from ftp.gnu.org/gnu/automake, http://ftp.gnu.org/gnu/automake/automake-1.14.1.tar.xz
you don't have space enough to create bin/aclocal stage at 'make' stage, check df output
there are problems with fs consistency, read dmesg.

Error while building glibc

I'm trying to install glibc to debug a C-framework I'm working on. But, I'm getting an error in the build process. Here's the error msg:
make[3]: Leaving directory `/root/glibc-source/glibc-2.14/elf'
/usr/bin/install -c /root/glibc-2.14-build/elf/ld.so /usr/local/myglibc/lib/ld-2.14.so.new
mv -f /usr/local/myglibc/lib/ld-2.14.so.new /usr/local/myglibc/lib/ld-2.14.so
/usr/bin/install -c /root/glibc-2.14-build/libc.so /usr/local/myglibc/lib/libc-2.14.so.new
mv -f /usr/local/myglibc/lib/libc-2.14.so.new /usr/local/myglibc/lib/libc-2.14.so
echo ld-2.14.so /usr/local/myglibc/lib/ld-linux-x86-64.so.2 >> /root/glibc-2.14-build/elf/symlink.list
/usr/bin/install -c /root/glibc-2.14-build/elf/sotruss-lib.so /usr/local/myglibc/lib/audit/sotruss-lib.so.new
mv -f /usr/local/myglibc/lib/audit/sotruss-lib.so.new /usr/local/myglibc/lib/audit/sotruss-lib.so
make[2]: *** No rule to make target `/root/glibc-2.14-build/dlfcn/libdl.so.2', needed by `/root/glibc-2.14-build/elf/sprof'. Stop.
make[2]: Leaving directory `/root/glibc-source/glibc-2.14/elf'
make[1]: *** [elf/subdir_install] Error 2
make[1]: Leaving directory `/root/glibc-source/glibc-2.14'
make: *** [install] Error 2
Is this a known problem?
I had built glibc on the same machine earlier last week without any errors. I'm rebuilding it because glibc is compiled with optimization level 2(-O2) by default and I'm unable to look into the values of a few variables inside the library functions from the code dump as they've been optimized out. I'm currently trying to compile with optimization level 1.
Thanks
It looks like you are trying to make install, without first doing a successful make all.
This is for the benefit of anyone who might be trying to build glibc on their ubuntu box.
I went through the following problems and resolved them the following way.
These problems were encountered in ubuntu 12.04
I created a directory glib-build on the same level as the glib-VERSION and ran the following command
$> ../glibc-2.16.0/configure --prefix=/home/gugovind/tsapp/glibc/glibc-build/
that gave me the following error that makeinfo is missing.
for that
$>sudo apt-get install texinfo
will resolve the problem.
It threw and error about LD_LIBRARY_PATH having the current directory (even if it does not exist)
for that run the following in your command prompt
$>set LD_LIBRARY_PATH
this will clear the LD_LIBRARY_PATH only for that console temporarily. Then run the configure again.
You might encounter another problem with configure..
"function strtonum never defined"
look at the config.log file and it might be missing mawk or gawk. install them using
sudo apt-get install gawk
This should get you through the configure part.
now run
make all
if in case you encounter a particular file not compiling.. just copy the gcc ... before that and paste it in the command prompt again after you have cd to that directory (the command lines before the error should tell you where to go.)
make install
You might get a warning about not able to find etc/ld.config... file. ignore that..
you are all set now.

Resources