How to add a tool-chain in the output image of openwrt? - openwrt

When trying to build a external toolchain for the openwrt image developed for raspberry pi.
Toolchain directory '/opt/cross/aarch64-unknown-linux-gnu' does not exist.
make[3]: * [/home/source/build_dir/toolchain-aarch64-unknown-linux-gnu/wrapper-1/.prepared] Error 1
make[2]: [toolchain/wrapper/compile] Error 2
make[1]: [/home/source/staging_dir/toolchain-aarch64-unknown-linux-gnu/stamp/.toolchain_compile] Error 2
make: * [world] Error 2
How to bring a toolchain in the openwrt output image in any path like the above (/opt/cross/aarch64-unknown-linux-gnu).

why not try install gcc into openwrt ?
using 'opkg install gcc'

Related

Torch with CUDA10

I am trying to install torch with cuda10 on my raspberry pi. I am following the following github thread ( answer of nagadomi:
https://github.com/torch/cutorch/issues/834
Following all his steps still when I run ./install.sh
I get the following error
make[2]: * No rule to make target 'exe/luajit-rocks/luajit-2.1/src/lib_ffi.c', needed by 'exe/luajit-rocks/luajit-2.1/vmdef.lua'. Stop.
make[1]: * [CMakeFiles/Makefile2:212: exe/luajit-rocks/luajit-2.1/CMakeFiles/luajit-static.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
./install.sh: line 107: /home/pi/torch/install/bin/luarocks: No such file or directory
Installing common Lua packages
./install.sh: line 111: /home/pi/torch/install/bin/luarocks: No such file or directory
I have now spent a week just trying to setup torch with CUDA.
Basically I need cutorch library and it is not installing from `luarocks install cutorch
Can anyone help me please?

Error building opencv with cmake on raspberry pi

I'm trying to build opencv-3.4.0 (with opencv_contrib-3.4.0) on Raspberry Pi. I'm getting a cmake build error after a 99 % , what should I change?
After I tried "make -j4" in the opencv-3.4.0/build folder, it successfully completed its process until 99%. Before that, configuration and generation part is done with cmake-gui.
Here is the error I am getting on the terminal
make[2]: *** [modules/python3/CMakeFiles/opencv_python3.dir/build.make:63: modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:4018: modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
What could be the problem?
Edit the file /home/pi/opencv-3.4.0/modules/python/src2/cv2.cpp and change
char* str = PyString_AsString(obj);
to const char* str = PyString_AsString(obj);
A slightly sideways answer, but I found that version 4.1 (without contribs - haven't tried it with) builds with no problems

Creating LUCI ipk package

I tried to create package of for example luci-app-adblock but got stuck in it.
So I made:
cd ~/openwrt
./scripts/feeds update -a
./scripts/feeds install -ap luci
make oldconfig
make -j$1 tools/install
make -j$1 toolchain/install
make V=s ~/openwrt/package/feeds/luci/luci-app-adblock/compile
Last command give me error:
make[1]: Entering directory '/home/vagrant/openwrt'
make[1]: ***
No rule to make target '/home/vagrant/openwrt/package/feeds/luci/luci-app-adblock/compile'. Stop.
make[1]: Leaving directory '/home/vagrant/openwrt'
/home/vagrant/openwrt/include/toplevel.mk:216: recipe for target '/home/vagrant/openwrt/package/feeds/luci/luci-app-adblock/compile' failed
make: *** [/home/vagrant/openwrt/package/feeds/luci/luci-app-adblock/compile]
Error 2
How can I create standalone luci package?
It is very simple, after toolchain was installed need to do
make toolchain/install
make package/<package_name>/compile
in my case it was
make package/luci-app-adblock/compile
Package file will be found in bin path

Compilation of OpenCV 3.1.0 videoio error

Im trying to compile Opencv 3.1.0 with MingW 4.9.2 but i have the follow error
modules\videoio\CMakeFiles\opencv_videoio.dir\build.make:187: recipe for target
'modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dshow.cpp.obj' failed
mingw32-make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dsho
w.cpp.obj] Error 1
CMakeFiles\Makefile2:4340: recipe for target 'modules/videoio/CMakeFiles/opencv_
videoio.dir/all' failed
mingw32-make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
makefile:159: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
I found that is a OpenCV build error during cap_dshow.cpp build. The solution showed here is no necessary because the file in Opencv 3.1 is already fixed.
During Cmake phase i've changed this (trough Cmake GUI 3.4.3), but doesnt work
CMAKE_BUILD_TYPE = Debug
WITH_EIGEN = 0
WITH_OPENGL = 0
WITH_IPP = 0
WITH_QT = 1
I've tried the solution given in this post, but doesnt work neither
add_extra_compiler_option(-Werror=non-virtual-dtor)
My intention is work with C++, Opencv and the GUI designer of QT. I have installed the library qt-5.4.0-x64-mingw492r0-sjlj, it comes with its own MingW 4.9.2.
(PS/for another proyect i've compiled Opencv3.1.0 with Mingw 4.9.3 and its works perfectly)
Can anybody helpme please!!!
In file %OPENCV_HOME%\sources\modules\videoio\src\cap_dshow.cpp
Add in top:
#define STRSAFE_NO_DEPRECATE
Work for me in Qt 5.6.2, Mingw 4.9.2 OpenCV 3.2.0

I cannot obtain the rpm of ContextBroker

I have tried to obtain the rpm associated to ContextBroker component (https://github.com/telefonicaid/fiware-orion.git) but I have obtained the following error after executing make rpm.
[ 98%] Building CXX object src/lib/mongoBackend/CMakeFiles/mongoBackend.dir/mongoNotifyContextAvailability.cpp.o
Linking CXX static library libmongoBackend.a
make[4]: Leaving directory `/home/develenv/app/jenkins/config-history/jobs/ContextBroker-Build/fiware-orion/rpm/BUILD/contextBroker-0.14.1_next/BUILD_RELEASE'
[ 98%] Built target mongoBackend
make[3]: Leaving directory `/home/develenv/app/jenkins/config-history/jobs/ContextBroker-Build/fiware-orion/rpm/BUILD/contextBroker-0.14.1_next/BUILD_RELEASE'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/develenv/app/jenkins/config-history/jobs/ContextBroker-Build/fiware-orion/rpm/BUILD/contextBroker-0.14.1_next/BUILD_RELEASE'
make[1]: *** [release] Error 2
make[1]: Leaving directory `/home/develenv/app/jenkins/config-history/jobs/ContextBroker-Build/fiware-orion/rpm/BUILD/contextBroker-0.14.1_next'
error: Bad exit status from /var/tmp/rpm-tmp.NPtnCN (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.NPtnCN (%build)
make: *** [rpm] Error 1
Previously to this stage I compiled and executed the unit tests as well as functional tests with no problems I am working on Red Hat 4.4.7-3 with repo/branch:
https://github.com/telefonicaid/fiware-orion/tree/release/iotplatform-v1
Thanks for your help
UPDATE:
The linux distribution used was CentOS 6.4
This problems is solved if you install cantcoap and COAP client, as described in the Orion README.md file, then execute make rpm.
Note that although COAP stuff is optional to build the code itself with make release or make debug the RPM building target needs them by the time being (we probably fix this in the future).
UPDATE: the fix of the RPM makefile target is being dealed at this Github.com issue: https://github.com/telefonicaid/fiware-orion/issues/579

Resources