Build Error OpenWRT hotplug2 - openwrt

i have a problem while building openWRT for the carambola module. The package hotplug2 is the problem.
make[2]: Entering directory /carambola/package/hotplug2
mkdir -p /carambola/dl
echo "Checking out files from the svn repository..."; mkdir -p /carambola/tmp/dl && cd /carambola/tmp/dl && rm -rf hotplug2-201 && [ \! -d hotplug2-201 ] && ( svn help export | grep -q trust-server-cert && svn export --non-interactive --trust-server-cert -r201 http://svn.nomi.cz/svn/isteve/hotplug2 hotplug2-201 || svn export --non-interactive -r201 http://svn.nomi.cz/svn/isteve/hotplug2 hotplug2-201 ) && echo "Packing checkout..." && /bin/tar cfz //carambola/tmp/dl/hotplug2-201.tar.gz hotplug2-201 && mv /home/hosst/Dokumente/Projekte/OSC_GIT/02_WSS/linux-system/carambola/tmp/dl/hotplug2-201.tar.gz /carambola/dl/ && rm -rf hotplug2-201;
Checking out files from the svn repository...
svn: E670002: Unable to connect to a repository at URL 'http://svn.nomi.cz/svn/isteve/hotplug2'
svn: E670002: Name or service not known
svn: E670002: Unable to connect to a repository at URL 'http://svn.nomi.cz/svn/isteve/hotplug2'
svn: E670002: Name or service not known
make[2]: *** [/carambola/dl/hotplug2-201.tar.gz] Error 1
make[2]: Leaving directory /carambola/package/hotplug2
make[1]: *** [package/hotplug2/compile] Error 2
make[1]: Leaving directory carambola
make: *** [package/hotplug2/compile] Fehler 2
Obviously the svn repo http://svn.nomi.cz/svn/isteve/hotplug2 is not reachable. But this is the original makefile from OpenWRT Repo (hotplug2 package).
Does anybody know the problem? Could not find any hints on the net but i am sure many other people can compile OpenWRT without problems.

The problem is the url of svn repo has changed. Make these changes in
package/hotplug2/Makefile
#PKG_REV:=201
PKG_REV:=4
#PKG_SOURCE_URL:=http://svn.nomi.cz/svn/isteve/hotplug2
PKG_SOURCE_URL:=http://hotplug2.googlecode.com/svn/trunk
With those changes, you should be able to compile the code.

Related

Buildroot error : failed to generate boot.vfat

I am trying to compile some personal python libraries to Buildroot for an embedded device. Here is one of my makefiles :
LXML_VERSION = 4.6.3
LXML_SITE = /home/mso-aerosat/Desktop/cecilia_workspace/Buildroot/buildroot-2021.02.7/package/CNES/lxml/lxml
LXML_SITE_METHOD = local
LXML_SETUP_TYPE = setuptools
LXML_DEPENDENCIES = libxml2 libxslt zlib
HOST_LXML_DEPENDENCIES = host-libxml2 host-libxslt host-zlib
LXML_BUILD_OPTS = \
--xslt-config=$(STAGING_DIR)/usr/bin/xslt-config \
--xml2-config=$(STAGING_DIR)/usr/bin/xml2-config
HOST_LXML_BUILD_OPTS = \
--xslt-config=$(HOST_DIR)/bin/xslt-config \
--xml2-config=$(HOST_DIR)/bin/xml2-config
$(eval $(python-package))
$(eval $(host-python-package))
As you can see, the makefile is almost exactly the default make file for python-lxml. It is also the case for my other libraries. I only changed the source and the method to have buildroot go into my local library.
Here's what I get as an error :
>>> Executing post-image script board/zynq/post-image.sh
[...]
INFO: vfat(boot.vfat): adding file 'u-boot.img' as 'u-boot.img' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/mso-aerosat/Desktop/cecilia_workspace/Buildroot/buildroot-2021.02.7/output/images/boot.vfat' '/home/mso-aerosat/Desktop/cecilia_workspace/Buildroot/buildroot-2021.02.7/output/images/u-boot.img' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'devicetree.dtb' as 'devicetree.dtb' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/mso-aerosat/Desktop/cecilia_workspace/Buildroot/buildroot-2021.02.7/output/images/boot.vfat' '/home/mso-aerosat/Desktop/cecilia_workspace/Buildroot/buildroot-2021.02.7/output/images/devicetree.dtb' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'uImage' as 'uImage' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/mso-aerosat/Desktop/cecilia_workspace/Buildroot/buildroot-2021.02.7/output/images/boot.vfat' '/home/mso-aerosat/Desktop/cecilia_workspace/Buildroot/buildroot-2021.02.7/output/images/uImage' '::'" (stderr):
Disk full
INFO: vfat(boot.vfat): cmd: "rm -f "/home/mso-aerosat/Desktop/cecilia_workspace/Buildroot/buildroot-2021.02.7/output/images/boot.vfat"" (stderr):
ERROR: vfat(boot.vfat): failed to generate boot.vfat
make[1]: *** [Makefile:836: target-post-image] Error 1
make: *** [Makefile:84: _all] Error 2
And finally here is the post-image.sh script :
#!/bin/sh
# By default U-Boot loads DTB from a file named "devicetree.dtb", so
# let's use a symlink with that name that points to the *first*
# devicetree listed in the config.
FIRST_DT=$(sed -n \
's/^BR2_LINUX_KERNEL_INTREE_DTS_NAME="\([a-z0-9\-]*\).*"$/\1/p' \
${BR2_CONFIG})
[ -z "${FIRST_DT}" ] || ln -fs ${FIRST_DT}.dtb ${BINARIES_DIR}/devicetree.dtb
support/scripts/genimage.sh -c board/zynq/genimage.cfg
Here is the link to the source code from github, in case you'd need to see other scripts : https://github.com/buildroot/buildroot/blob/master/board/zynq/post-image.sh
How can I solve the problem ? If I change the menuconfig to not add the libraries, it works without an error. But as soon as I add those, it won't. Any advice please ?
Thank you !
So I did make clean and then make again and the error was removed but I still don't have my customized libraries in ouput/target. They are correctly added in output/built though. I don't know why Buildroot doesn't treat them until the end of the process...

How to build open3d from source on l4t-base:r32.5.0 IMG?

I've been trying to build open3d from source on the l4t-base:r32.5.0 IMG from NVIDIA for quite some time now and have basically searched the whole internet for a script/guide, but I can't seem to find anything or get it to work myself.
Following the exact steps stated on http://www.open3d.org/docs/release/arm.html I get the following output while running the following Dockerfile
Dockerfile
FROM dustynv/ros:foxy-ros-base-l4t-r32.5.0
WORKDIR /workspace
##########################
### CMAKE INSTALLATION ###
##########################
RUN wget https://github.com/Kitware/CMake/releases/download/v3.20.6/cmake-3.20.6-linux-aarch64.tar.gz
RUN tar -v -xzf cmake-3.20.6-linux-aarch64.tar.gz
RUN mv cmake-3.20.6-linux-aarch64 cmake
RUN echo "alias cmake='/workspace/cmake/bin/cmake'" >> /root/.bashrc
RUN source /root/.bashrc && cmake --version
#################################
### OPEN3D 0.13.0 INSTALLTION ###
#################################
RUN wget https://github.com/isl-org/Open3D/archive/refs/tags/v0.13.0.tar.gz
RUN tar -v -xzf v0.13.0.tar.gz
RUN mv Open3D-0.13.0 open3d
RUN apt-get update && apt-get install xorg-dev libglu1-mesa-dev -y
RUN cd open3d && mkdir build && cd build && \
/workspace/cmake/bin/cmake \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_CUDA_MODULE=OFF \
-DBUILD_GUI=OFF \
-DBUILD_TENSORFLOW_OPS=OFF \
-DBUILD_PYTORCH_OPS=OFF \
-DBUILD_UNIT_TESTS=ON \
-DCMAKE_INSTALL_PREFIX=~/open3d_install \
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
..
ErrorLog
Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /workspace/open3d/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_d15b1/fast && /usr/bin/make -f CMakeFiles/cmTC_d15b1.dir/build.make CMakeFiles/cmTC_d15b1.dir/build
make[1]: Entering directory '/workspace/open3d/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_d15b1.dir/src.c.o
/usr/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD -fPIE -o CMakeFiles/cmTC_d15b1.dir/src.c.o -c /workspace/open3d/build/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_d15b1
/workspace/cmake/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d15b1.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTC_d15b1.dir/src.c.o -o cmTC_d15b1
CMakeFiles/cmTC_d15b1.dir/src.c.o: In function `main':
src.c:(.text+0x48): undefined reference to `pthread_create'
src.c:(.text+0x50): undefined reference to `pthread_detach'
src.c:(.text+0x58): undefined reference to `pthread_cancel'
src.c:(.text+0x64): undefined reference to `pthread_join'
src.c:(.text+0x74): undefined reference to `pthread_atfork'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_d15b1.dir/build.make:98: recipe for target 'cmTC_d15b1' failed
make[1]: *** [cmTC_d15b1] Error 1
make[1]: Leaving directory '/workspace/open3d/build/CMakeFiles/CMakeTmp'
Makefile:127: recipe for target 'cmTC_d15b1/fast' failed
make: *** [cmTC_d15b1/fast] Error 2
Source file was:
#include <pthread.h>
static void* test_func(void* data)
{
return data;
}
int main(void)
{
pthread_t thread;
pthread_create(&thread, NULL, test_func, NULL);
pthread_detach(thread);
pthread_cancel(thread);
pthread_join(thread, NULL);
pthread_atfork(NULL, NULL, NULL);
pthread_exit(NULL);
return 0;
}
Looking for a ASM_NASM compiler failed with the following output:
-- The ASM_NASM compiler identification is unknown
-- Didn't find assembler
CMake Error at CMakeLists.txt:2 (project):
No CMAKE_ASM_NASM_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "ASM_NASM" or the CMake cache entry CMAKE_ASM_NASM_COMPILER to the
full path to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "/workspace/open3d/build/CMakeFiles/CheckASM_NASM/CMakeFiles/CMakeOutput.log".
See also "/workspace/open3d/build/CMakeFiles/CheckASM_NASM/CMakeFiles/CMakeError.log".
Determining if the function sgemm_ exists failed with the following output:
Change Dir: /workspace/open3d/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_855e0/fast && /usr/bin/make -f CMakeFiles/cmTC_855e0.dir/build.make CMakeFiles/cmTC_855e0.dir/build
make[1]: Entering directory '/workspace/open3d/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_855e0.dir/CheckFunctionExists.c.o
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=sgemm_ -fPIE -o CMakeFiles/cmTC_855e0.dir/CheckFunctionExists.c.o -c /workspace/cmake/share/cmake-3.20/Modules/CheckFunctionExists.c
Linking C executable cmTC_855e0
/workspace/cmake/bin/cmake -E cmake_link_script CMakeFiles/cmTC_855e0.dir/link.txt --verbose=1
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=sgemm_ CMakeFiles/cmTC_855e0.dir/CheckFunctionExists.c.o -o cmTC_855e0
CMakeFiles/cmTC_855e0.dir/CheckFunctionExists.c.o: In function `main':
CheckFunctionExists.c:(.text+0x10): undefined reference to `sgemm_'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_855e0.dir/build.make:98: recipe for target 'cmTC_855e0' failed
make[1]: *** [cmTC_855e0] Error 1
make[1]: Leaving directory '/workspace/open3d/build/CMakeFiles/CMakeTmp'
Makefile:127: recipe for target 'cmTC_855e0/fast' failed
make: *** [cmTC_855e0/fast] Error 2
Determining if the function cheev_ exists failed with the following output:
Change Dir: /workspace/open3d/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_3a46a/fast && /usr/bin/make -f CMakeFiles/cmTC_3a46a.dir/build.make CMakeFiles/cmTC_3a46a.dir/build
make[1]: Entering directory '/workspace/open3d/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_3a46a.dir/CheckFunctionExists.c.o
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=cheev_ -fPIE -o CMakeFiles/cmTC_3a46a.dir/CheckFunctionExists.c.o -c /workspace/cmake/share/cmake-3.20/Modules/CheckFunctionExists.c
Linking C executable cmTC_3a46a
/workspace/cmake/bin/cmake -E cmake_link_script CMakeFiles/cmTC_3a46a.dir/link.txt --verbose=1
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=cheev_ CMakeFiles/cmTC_3a46a.dir/CheckFunctionExists.c.o -o cmTC_3a46a /usr/lib/aarch64-linux-gnu/libblas.so -pthread -lm -ldl
CMakeFiles/cmTC_3a46a.dir/CheckFunctionExists.c.o: In function `main':
CheckFunctionExists.c:(.text+0x10): undefined reference to `cheev_'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_3a46a.dir/build.make:99: recipe for target 'cmTC_3a46a' failed
make[1]: *** [cmTC_3a46a] Error 1
make[1]: Leaving directory '/workspace/open3d/build/CMakeFiles/CMakeTmp'
Makefile:127: recipe for target 'cmTC_3a46a/fast' failed
make: *** [cmTC_3a46a/fast] Error 2
Determining if the function LAPACKE_dgeqrf exists failed with the following output:
Change Dir: /workspace/open3d/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_9905d/fast && /usr/bin/make -f CMakeFiles/cmTC_9905d.dir/build.make CMakeFiles/cmTC_9905d.dir/build
make[1]: Entering directory '/workspace/open3d/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_9905d.dir/CheckFunctionExists.c.o
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=LAPACKE_dgeqrf -fPIE -o CMakeFiles/cmTC_9905d.dir/CheckFunctionExists.c.o -c /workspace/cmake/share/cmake-3.20/Modules/CheckFunctionExists.c
Linking C executable cmTC_9905d
/workspace/cmake/bin/cmake -E cmake_link_script CMakeFiles/cmTC_9905d.dir/link.txt --verbose=1
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=LAPACKE_dgeqrf CMakeFiles/cmTC_9905d.dir/CheckFunctionExists.c.o -o cmTC_9905d /usr/lib/aarch64-linux-gnu/liblapack.so /usr/lib/aarch64-linux-gnu/libblas.so
CMakeFiles/cmTC_9905d.dir/CheckFunctionExists.c.o: In function `main':
CheckFunctionExists.c:(.text+0x10): undefined reference to `LAPACKE_dgeqrf'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_9905d.dir/build.make:100: recipe for target 'cmTC_9905d' failed
make[1]: *** [cmTC_9905d] Error 1
make[1]: Leaving directory '/workspace/open3d/build/CMakeFiles/CMakeTmp'
Makefile:127: recipe for target 'cmTC_9905d/fast' failed
make: *** [cmTC_9905d/fast] Error 2
Problem:
I want to build open3d from source on an arm docker img with a Dockerfile. More specifically, the l4t-base:r32.5.0 img provided by NVIDIA. This image will be used on a Jetson XavierNX with docker installed.
Above you can see what I have tried so far in terms of Dockerfile and the output this gives me.
What I am asking is, if anyone has a Dockerfile for building open3d from source on an arm based image or knows how to do it successfully, because I cannot seem to be able to do it.

how can i make an pgAudit installation for my PostgreSQL10?

I wanted to install pgAudit on my CentOS 6 32-bit, I already installed PostgreSQL 10 + pgAdmin4 from PostgreSQL Linux run installer that I downloaded from DBEnterprise
I followed the guide from here, here are the steps I followed :
git clone https://github.com/postgres/postgres.git
go into the folder by cd postgres and then git checkout REL_10_STABLE
./configure after that make install -s
cd contrib
Clone the pgAudit extension by git clone https://github.com/pgaudit/pgaudit.git
cd pgaudit
git checkout REL_10_STABLE
make -s check
make install
I'm stuck at step 8. Here's the result :
[root#localhost pgaudit]# make -s check
============== creating temporary instance ==============
============== initializing database system ==============
pg_regress: initdb failed
Examine /root/postgres/contrib/pgaudit/log/initdb.log for the reason.
Command was: "initdb" -D "/root/postgres/contrib/pgaudit/./tmp_check/data" --no-clean --no-sync > "/root/postgres/contrib/pgaudit/log/initdb.log" 2>&1
make: *** [check] Error 2
I opened the initdb.log at /root/postgres/contrib/pgaudit/log/initdb.log like how it told me to, and it says :
Running in no-clean mode. Mistakes will not be cleaned up.
initdb: cannot be run as root
Please log in (using, e.g., "su") as the (unprivileged) user that will
own the server process.
So I tried it again after I logged in as postgres, here's the result :
bash-4.1$ make -s check
make[3]: stat: ../../src/include/utils/errcodes.h: Permission denied
/bin/sh: line 0: cd: utils/: Not a directory
make[3]: *** [../../src/include/utils/errcodes.h] Error 1
make[2]: *** [submake-errcodes] Error 2
make[1]: *** [submake-libpgport] Error 2
make: *** [submake] Error 2
I'm really new to both Linux and PostgreSQL, so I don't know why it failed and what is the solution for this. Thanks in advance!
Look like your db user not having a login shell.
You can try with:
sudo -u postgres psql template
Or:
sudo -u postgres bash

My package in OpenWRT does not compile

I have downloaded OpenWRT source from git and build it. I created a simple helloworld package with the required Makefile in package/helloworld directory and build it. But it does not seem to be doing anything. Following is the log:
sonal#sonal-ThinkPad:~/openwrt$ make V=99 package/helloworld/compile
WARNING: your configuration is out of sync. Please run make menuconfig, oldconfig or defconfig!
make[1]: Entering directory '/home/sonal/openwrt'
make[2]: Entering directory '/home/sonal/openwrt/package/libs/toolchain'
if [ -f /home/sonal/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/sonal/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/sonal/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libc" >> /home/sonal/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install
if [ -f /home/sonal/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/sonal/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/sonal/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libgcc" >> /home/sonal/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install
make[2]: Leaving directory '/home/sonal/openwrt/package/libs/toolchain'
make[2]: Entering directory '/home/sonal/openwrt/package/helloworld'
make[2]: Leaving directory '/home/sonal/openwrt/package/helloworld'
make[1]: Leaving directory '/home/sonal/openwrt'`enter code here`
Thanks
Sonal
http://wiki.prplfoundation.org/wiki/Creating_an_OpenWrt_package_for_a_web_page
This above link will guide you how to build own package. I had also made own luci pages with above link. It will guide you from scratch.
If you want to create only hello world page then no need to create package, you just make new directory name as files in '/home/sonal/openwrt/'
and then go to files directory and make new directory as www in '/home/sonal/openwrt/files/'. No custom packages requires for it.

OpenCV Ubuntu Installation Issues

I have been working on OpenCV installation from the last 4 days but still can't find a way to install it without errors.
collect2: error: ld returned 1 exit status
apps/visualisation/CMakeFiles/opencv_visualisation.dir/build.make:104: recipe for target 'bin/opencv_visualisation' failed
make[2]: *** [bin/opencv_visualisation] Error 1
CMakeFiles/Makefile2:7461: recipe for target 'apps/visualisation/CMakeFiles/opencv_visualisation.dir/all' failed
make[1]: *** [apps/visualisation/CMakeFiles/opencv_visualisation.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
It shouldn't be too difficult:
# Get all the up-to-date tools you'll need
sudo apt-get update
sudo apt-get install git cmake build-essential
# Get latest greatest OpenCV from GitHub
cd
git clone https://github.com/opencv/opencv.git
# Go build and install that puppy
cd opencv
mkdir build
cd build
cmake ..
make -j 8
sudo make install
Maybe try running the file from this link. The good thing about this is that it abstracts so many things from you. You need not manually run all the commands. Run it on the ubuntu terminal as bash install-opencv.sh.
Just let me know incase of any errors.

Resources