Installing Apache Kudu on WSL - c++

I am trying to install Apache Kudu and run the C++ examples on my Ubuntu distribution (18.04) on WSL. I am following the instructions for Ubuntu at https://kudu.apache.org/docs/installation.html
Everything runs smoothly until I get to step 6 where I run
make -j4
I get the following errors
Exception in thread "main" java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:225)
at java.util.zip.ZipFile.<init>(ZipFile.java:155)
at java.util.zip.ZipFile.<init>(ZipFile.java:169)
at org.gradle.wrapper.Install.unzip(Install.java:235)
at org.gradle.wrapper.Install.access$900(Install.java:27)
at org.gradle.wrapper.Install$1.call(Install.java:81)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)
CMakeFiles/init_gradle.dir/build.make:60: recipe for target '../../java/gradle/wrapper/gradle-wrapper.jar' failed
make[2]: *** [../../java/gradle/wrapper/gradle-wrapper.jar] Error 1
make[2]: *** Deleting file '../../java/gradle/wrapper/gradle-wrapper.jar'
CMakeFiles/Makefile2:1708: recipe for target 'CMakeFiles/init_gradle.dir/all' failed
make[1]: *** [CMakeFiles/init_gradle.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 5%] Built target kudu_util_pb_util_proto
[ 5%] Built target kudu_util_hash_proto
[ 6%] Built target hms_thrift
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Image of error
Does anybody know what is causing the errors?

Happened to met same situation.
This exception is happened when building hms. And you can found verbose log by doing
cd <root_of_kudu>/java
./gradlew assemble
The problems I met is the zip of downloaded gradle seems wrong, so I cleaned ~/.gradle/wrapper/dists/gradle-6.2.2-all/2k4hz1yffuhb6ob9prdg10tx/gradle-6.2.2-all.zip and <root_of_kudu>/java/gradle/wrapper/gradle-wrapper.jar. And try to call make -j4 again.
Further more, if you happened to have same bad network like mine, you can download the gradle zip manually, by checking the content of <root_of_kudu>/java/gradlew, the line with curl tells you the download link, try to download it with a good network or a proxy and then place it to the first path you cleaned, it may work.

Related

install opencv on ubuntu 18.04

I've been trying to install opencv, using this referance. But when I try to run make command, I get error as follows:
/opt/opencv/modules/videoio/src/cap_dc1394_v2.cpp:59:10: fatal error:
dc1394/dc1394.h: No such file or directory
#include <dc1394/dc1394.h>
^~~~~~~~~~~~~~~~~
compilation terminated.
modules/videoio/CMakeFiles/opencv_videoio.dir/build.make:278: recipe for
target 'modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dc1394_v2.cpp.o'
failed
make[2]: ***
[modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dc1394_v2.cpp.o] Error
1
CMakeFiles/Makefile2:6307: recipe for target
'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
I tried so many times to install opencv, when the installation is completed, I tried to check the installation, and then I get error that there is no module named opencv.
I recommend to use this guide to download the OpenCV Libary to the linux. (ubuntu 18.04).
I did it today on my ubuntu 18.04 and it worked perfectly, but please read all the guide and don't just copy the terminal commands.

Getting “no rule to make target” error while trying to run OpenCV code

I'm trying to run example code from https://docs.opencv.org/master/db/df5/tutorial_linux_gcc_cmake.html. I use Ubuntu 16. I have OpenCV installed in /home/marcin/opencv/ directory. I use CMakeLists.txt file like in example, with addition of line
set (CMAKE_CXX_STANDARD 11)
I run in terminal
cmake -D CMAKE_PREFIX_PATH=/home/marcin/opencv/build
and I get positive output. But when I try to run make command I get:
make[2]: *** No rule to make target '/home/marcin/opencv/build/lib/libopencv_core.so.4.0.1',
needed by 'DisplayImage'. Stop.
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/DisplayImage.dir/all' failed
make[1]: *** [CMakeFiles/DisplayImage.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
As #Tsyvarev suggestet, I reinstalled the library one more time. It seems like it was broken.

Error while running make command [Packet Generator in DPDK]

I am trying to install packet generator in my system. I have downloaded packet generator from DPDK.org. I follow the instructions mentioned in the following link.
When I run the make command I get the below error:
/root/DPDK/pktgen-dpdk/app/pktgen-latency.c:17:25: fatal error: rte_bus_pci.h: No such file or directory
compilation terminated.
/root/DPDK/dpdk-stable-17.08.1//mk/internal/rte.compile-pre.mk:138:
recipe for target 'pktgen-latency.o' failed
make[2]: *** [pktgen-latency.o] Error 1
/root/DPDK/dpdk-stable-17.08.1//mk/rte.extapp.mk:47: recipe for
target 'pktgen' failed
make[1]: *** [pktgen] Error 2
/root/DPDK/dpdk-stable-17.08.1//mk/rte.extsubdir.mk:48: recipe for
target 'app' failed
make: *** [app] Error 2
Upgrading the version of DPDK solves this issue. I used a version of 17.08 and later on upgraded it to 17.11
Looks like the RTE_TARGET is set incorrectly or DPDK is not compiled. First we set:
export RTE_SDK=<DPDKInstallDir>
export RTE_TARGET=x86_64-native-linuxapp-gcc
Then we compile DPDK and then Pktgen.

Why Xsd Cannot Load a Transcoding Service?

I am using CodeSynthesis XSD (XML Data Binding Tool for C++) to auto-generate .hpp and .cpp files from a .xsd file. But when running xsd over my .xsd file, I am getting this error:
Could not load a transcoding service
I am using openSUSE Leap-42.2, Xsd 4.0 and Apache Xercess 3.1.4. Here are the detailed message:
Scanning dependencies of target XSDModel
[ 2%] Generating C++/XML mapping
Could not load a transcoding service
lib/CMakeFiles/XSDModel.dir/build.make:51: recipe for target 'src/model/Model.cpp' failed
make[2]: *** [src/model/Model.cpp] Error 255
CMakeFiles/Makefile2:76: recipe for target 'lib/CMakeFiles/XSDModel.dir/all' failed
make[1]: *** [lib/CMakeFiles/XSDModel.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
[ 2%] Generating C++/XML mapping
Could not load a transcoding service
lib/CMakeFiles/XSDModel.dir/build.make:51: recipe for target 'src/model/Model.cpp' failed
make[2]: *** [src/model/Model.cpp] Error 255
CMakeFiles/Makefile2:76: recipe for target 'lib/CMakeFiles/XSDModel.dir/all' failed
make[1]: *** [lib/CMakeFiles/XSDModel.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
Edit 1:
I've built Apache Xercess with --enable-transcoder-gnuiconvswitch and iconv is installed on my machine as well.
Edit 2:
After some digging, I found that the echo $LANG command on my linux prints an empty line. In addition, running localedef -i en_US -f UTF-8 en_US.UTF-8prints this error:
character map file `UTF-8' not found: No such file or directory
cannot read character map directory `/usr/share/i18n/charmaps': No such file or directory
No locale has been defined on this linux. So, simply set a locale:
$ export LANG=en_US.UTF-8
and afterwards, everything will be fine.

Error while building LLVM/clang

I was trying to build LLVM/clang in HOME directory without sudo access following this link (http://clang.llvm.org/get_started.html)
But when I type 'make' this happens
Error running link command: No such file or directory
make[2]: *** [lib/libLLVMSupport.a] Error 2
make[2]: Leaving directory `/home/skataka/porple_tools/build'
make[1]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/all] Error 2
make[1]: Leaving directory `/home/skataka/porple_tools/build'
make: *** [all] Error 2
$ Write failed: Broken pipe
I have used make VERBOSE=1 and it says CMAKE-AR NOT FOUND
Edit:
Changed CMakeCXXCompiler.cmake file - SET(CMAKE_AR "path to llvm-ar")
Now I am getting "Error running link command: Permission denied"
Help me with this !
Looks like your build directory generated by cmake is broken it seems to not be able to find the linker. I'd clobber the build directory and regenerate it with cmake paying attention to if it spits out any errors while configuring.