FreeBSD jails mkstemp failed - freebsd

I'm trying to install some stuff in my jails with this set up:
I have make my own flavor of jails by following this howto: FreeBSD forum
Everything worked fine for me so far, I have mounted /usr/ports with fstab to the jail, started the jail and entered it. But inside the jail I can't use make.
E.g.:
/usr/ports/www/nginx # make install clean
mktemp: mkstemp failed on /root/tmp/portoptions.bgGFZA6E: No such
file or directory
*** Error code 1
Stop.
make[1]: stopped in /usr/ports/www/nginx
*** Error code 1
Stop.
make: stopped in /usr/ports/www/nginx
I'm some kind of confused by this error, as well as that there is no vi available etc...

Well, instead of:
$ jls
$ jexec >>JID-No.<< su
you just have to run:
$ ezjail-admin console jailname
That solved it for me.

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.

luci compilation error:iwinfo.h: No such file or directory

I downloaded the luci trunk from git https://github.com/openwrt/luci.git and got the following error when i compile it on centOS.
I already have iw package intalled but still got the error.
Package iw-3.10-4.el7.x86_64 already installed and latest version
How can i fix this issue?
make[1]: Entering directory `/home/mullex/Dev/Projects/openwrt-luci/modules/admin-full'
rm -f src/*.o src/luci-bwc
gcc -O2 --std=gnu99 -Wall -pedantic -fPIC -c -o src/luci-bwc.o src/luci-bwc.c
src/luci-bwc.c:35:20: fatal error: iwinfo.h: No such file or directory
#include <iwinfo.h>
^
compilation terminated.
make[1]: *** [src/luci-bwc.o] Error 1
make[1]: Leaving directory `/home/mullex/Dev/Projects/openwrt-luci/modules/admin-full'
*** Compilation of modules/admin-full failed!
make: *** [gccbuild] Error 1
I experienced this same problem this morning, when running the LuCI Makefile on Ubuntu, in order to get LuCI up and running on my PC for development purposes without the need to be connected to a router. I solved it in the following way:
At this web page...
http://luci.subsignal.org/trac/changeset/10377
... there is a description of lines that were added to two files to implement features requiring the iwinfo.h include file. I had already installed iw (by using the command "sudo apt-get install iw") but it seemed that this did not include iwinfo.h, which I understand is a file that you can only install on OpenWRT. Therefore, to solve the issue, I manually reverted the two files back to their original state by deleting the green lines and adding in the red lines. By green lines and red lines I mean those highlighted in the Diff output of the files given at the above web page. Hence, I ended up with two revised (rolled-back) versions of the following two files:
contrib/package/luci/Makefile and modules/admin-full/src/luci-bwc.c
I then ran the top-level LuCI Makefile again, using the following command while in the top-level directory:
sudo make runuhttpd
The Makefile completed without errors, and its final step was to start the web server at localhost:8080/luci/
At this point in the terminal window, the process waits (i.e. does not return to command prompt) because it is running the web server. In my web browser, at localhost:8080/luci/, I now successfully see the default index page. If I enter CTRL-C in the terminal window, to kill the process, the web server stops and the default index page is no longer viewable in the web browser.
To run the web server again, in the terminal I enter the last command that was executed by the Makefile, which is:
[my-top-level-LUCI-installation-directory]/host/usr/sbin/uhttpd -p 8080 -h [my-top-level-LUCI-installation-directory]/host/www -f
Hope this helps.

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!

Error in compiling the kernel

I am trying to compile linux 3.5.2 kernel. I followed this tutorial
"http://blog.techveda.org/index.php/adding-system-calls-linux-kernel-3-5-x/"
and everything was going perfect.but when I tried to do build the kernel I get this error
here are the commands I used to build my kernel
sudo cp /boot/config-3.5.0-17-generic ./config
make oldconfig
sudo make -j8
the error when I do the make -j8 is:
ERROR: "__modver_version_show" [drivers/staging/rts5139/rts5139.ko] undefined!
WARNING: modpost: Found 2 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
I really can't find what is the problem it looks like I have a problem with a driver but how could this happen and I am using my old configuration file that is already working. ??
I have met the same problem while compiling kernel 3.2, and solve it by "su -" to root and then recompile.
If you do not need this driver simply mod the config fiel like follows:
CONFIG_RTS5139=n

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