Can't install libgtk2.0-dev_2.24.31-2_arm64.deb on Renesas R-Car H3 (H3ULCB) - opencv

I am trying to run object detection algorithm (which is using OpenCV 2.4.13.7) on H3ULCB. It is giving libGTK as shown below
root#h3ulcb:/media/2.4.13_algo_target_# ./main_
OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or [ 1976.641753] audit: type=1706
Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvWaitKey, fil7
terminate called after throwing an instance of 'cv::Exception'
what(): /media/2.4.13.7_pckage/modules/highgui/src/window.cpp:567: error: (-2) The function is not implemented. Rebuild the library with Wiy
Aborted (core dumped)}
To solve the error , I tried to install libGTK package (libgtk2.0-dev_2.24.31-2_arm64.deb) on H3ULCB, but its not getting installed to the target.
* pkg_extract_data_file_names_to_stream: Failed to extract data.tar.gz from package '/media/libgtk2.0-dev_2.24.31-2_arm64.deb'.
* pkg_get_installed_files: Error extracting file list from /media/libgtk2.0-dev_2.24.31-2_arm64.deb.
* opkg_install: Cannot install package libgtk2.0-dev.
BSP and SDK for H3ULCB are build using yocto, details are listed below:
Yocto version: 2.23
Poky: 2.1.3
The same error is resolved on the native Linux (Ubuntu16.04) by installing the libgtk2.0 library from apt-get manager. But package manager apt and dpkg is not getting installed on the target. I tried to add these managers in the yocto layers while building the image.
Currently Available package manager on H3ULCB is OPKG. Since OPKG works on .IPK packages but not .IPK packages on available for libgtk2.0, I have converted the .deb package to a .IPK package .While executing the .IPK package on H3ulcb:
root#h3ulcb:/media# opkg install libgtk2.0-dev_2.24.31-2_arm64.ipk
Collected errors:
* open_outer: Failed to open package 'libgtk2.0-dev_2.24.31-2_arm64.ipk': Unrecognized archive format
* pkg_extract_control_file_to_stream: Failed to extract control.tar.gz from package 'libgtk2.0-dev_2.24.31-2_arm64.ipk'.
* pkg_init_from_file: Failed to extract control file from libgtk2.0-dev_2.24.31-2_arm64.ipk.
In the package libgtk2.0-dev_2.24.31-2_arm64.deb, there are 3 files
control.tar.gz
data.tar.xz
debian-binary
while executing the .deb file on H3ULCB, the error showed data.tar.gz instead of data.tar.xz as given below:
pkg_extract_data_file_names_to_stream: Failed to extract data.tar.gz from package '/media/libgtk2.0-dev_2.24.31-2_arm64.deb'.
I have converted data.tar.xz to data.tar.gz, but how to pack these files 3 files back to .deb package?

Related

OpenCV test failed in Yocto-Jethro

I have added meta-openembedded recipes in the Yocto project, at Jethro branch OpenCV version is 2.4.
After building while testing the sample applications provided by opencv-samples_2.4.bb gives these samples :
adaptiveskindetector contours facedetect find_obj_calonder morphology mushroom pyramid_segmentation
bgfg_codebook convert_cascade fback_c find_obj_ferns motempl one_way_sample smiledetect
blobtrack_sample delaunay find_obj latentsvmdetect mser_sample polar_transforms tree_engine
but while testing I got this error :
OpenCV Error: Unspecified error (The function is not implemented.
Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you
are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then
re-run cmake or configure script) in cvNamedWindow, file
/home/ymj/opencv/modules/highgui/src/window.cpp, line 516
I have added in local.conf:
IMAGE_INSTALL_append += " opencv opencv-samples python-opencv"
Is anything more needed to get full-fledged opencv operations.

How to include Eigen in C++ library after installing libeigen3-dev package

I am trying to build OpenCV from Source (master branch) using cmake.
I installed Eigen package via apt-get.
sudo apt-get install libeigen3-dev
It was successfully installed, and cmake prints that eigen 3.3.4 is installed.
Eigen: YES(ver 3.3.4)
But when I did 'make', it showed the error
/opencv/modules/core/include/opencv2/core/private.hpp:66.12: fatal error: Eigen/Core: No such file or directory
# include <Eigen/Core>
^~~~~~~~~~~~
compilation teminated.
I found the same question on superuser.
So as the answer did, I have changed cmake/OpenCVFindLibsPerf.cmake from line 44 to 59.
After I have commented out line 46-48 and 59,
and changed find_package(Eigen3 QUIET) in line 44 to find_package(Eigen3 3.0.0), it works.
And this problem only happens on OpenCV 4.0 version.
When I install OpenCV 3.4.6 version(tag 3.4.6 on github), this problem does not occur.

Tensorflow Hub Build from Source Failing

I'm having a problem with Building TF Hub from Source. Can Anyone please help me out? I've been following the steps as given in https://github.com/tensorflow/hub/blob/master/tensorflow_hub/pip_package/PIP.md
I've installed bazel 0.24.1.
Error I'm Getting:
ERROR: /home/tf_hub/hub/WORKSPACE:17:1: name 'git_repository' is not defined
ERROR: /home/tf_hub/hub/WORKSPACE:40:1: name 'http_archive' is not defined
ERROR: /home/tf_hub/hub/WORKSPACE:47:1: name 'new_http_archive' is not defined
ERROR: Error evaluating WORKSPACE file
ERROR: error loading package '': Encountered error while reading extension file 'tools/build_defs/repo/http.bzl': no such package '#bazel_tools//tools/build_defs/repo': error loading package 'external': Could not load //external package
ERROR: error loading package '': Encountered error while reading extension file 'tools/build_defs/repo/http.bzl': no such package '#bazel_tools//tools/build_defs/repo': error loading package 'external': Could not load //external package
INFO: Elapsed time: 2.552s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
Bazel Version: 0.24.1
Python Version: 3
Tensorflow Version: 2.0.0a
Commands to Reproduce:
(env)~/tf_hub$ git clone https://github.com/tensorflow/hub
(env)~/tf_hub$ cd hub && bazel build tensorflow_hub/pip_package:build_pip_package
Expected Output: No Error. Build Sucessful
Latest Versions of Bazel Doesn't support git_repository (which is still used by tensorflow_hub), so Uninstalling Bazel 0.24.1 and installing Bazel 0.18.1 worked.

Cannot install bmon using opkg under Openwrt?

After running opkg install bmon, I got this error:
root#OpenWrt:~# opkg install bmon
Installing bmon (4.0-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/packages/bmon_4.0-1_ar71xx.ipk.
Multiple packages (libpthread and libpthread) providing same name marked HOLD or PREFER. Using latest.
Installing libncursesw (5.9-3) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/base/libncursesw_5.9-3_ar71xx.ipk.
Configuring iftop.
//usr/lib/opkg/info/iftop.postinst: line 4: default_postinst: not found
Collected errors:
* check_data_file_clashes: Package libncursesw wants to install file /usr/lib/libform.so
But that file is already provided by package * libncurses
* check_data_file_clashes: Package libncursesw wants to install file /usr/lib/libmenu.so
But that file is already provided by package * libncurses
* check_data_file_clashes: Package libncursesw wants to install file /usr/lib/libncurses.so
But that file is already provided by package * libncurses
* check_data_file_clashes: Package libncursesw wants to install file /usr/lib/libpanel.so
But that file is already provided by package * libncurses
* opkg_install_cmd: Cannot install package bmon.
* pkg_run_script: package "iftop" postinst script returned status 127.
* opkg_configure: iftop.postinst returned 127.
I have searched for quite a while, but there is few info about bmon.
And this is my opkg.conf
root#OpenWrt:~# cat /etc/opkg.conf
#src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages
dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /overlay
src/gz chaos_calmer_base http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/base
src/gz chaos_calmer_packages http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/packages
src/gz chaos_calmer_luci http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/luci
src/gz chaos_calmer_routing http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/routing
src/gz chaos_calmer_telephony http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/telephony
src/gz chaos_calmer_management http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/management
From the logs it seems like bmon has dependency on libncursesw which tries to install some files which were already available from libncurses.
Since both the packages has similar functionalities, you can force the installation by
opkg --nodeps install bmon
This will install the required package but leave the dependencies.

Build OpenCV binding in Haskell for OpenCV 2.4

I tried to install cv library via cabal (cabal install cv).
But it brings me up an error:
Configuring CV-0.3.7...
Building CV-0.3.7...
Preprocessing library CV-0.3.7...
c2hs: C header contains errors:
dist/build/CV/Video.chs.h:22: (column 39) [ERROR] >>> Unknown identifier!
Cannot find a definition for `CV_CAP_PROP_WHITE_BALANCE_BLUE_U' in the header file.
cabal: Error: some packages failed to install:
CV-0.3.7 failed during the building phase. The exception was:
ExitFailure 1
I have read that it's problem is, that my install opencv is newer than the haskell-library needs it.
My opencv:
local/opencv 2.4.12.2-2
Open Source Computer Vision Library
So how can I fix this error now? Thanks for your help!

Resources