Need help on compiling DPDK hello world - dpdk

I try to learn DPDK using the following link: https://doc.dpdk.org/guides/prog_guide/build_app.html
I have downloaded DPDK 19.11.1 version in Ubuntu 16 virtual machine. Then unzipped the tar.gz file. Then I have given the following commands
~/DPDK$ cd examples/helloworld/
~/DPDK/examples/helloworld$ export RTE_SDK=/home/vijay/dpdk
~/DPDK/examples/helloworld$ export RTE_TARGET=x86_64-native-linuxapp-gcc
~/DPDK/examples/helloworld$ make
The following error is displayed:
/home/vijay/dpdk/mk/internal/rte.extvars.mk:29 cannot find .config in /home/vijay/dpdk/build. stop
If I put sudo make, the following error is displayed
Makefile:44: *** "Please define RTE_SDK environment variable". stop
When I put echo $RTE_SDK and echo $RTE_TARGET the values are printed correctly. I tried x86_64-native-linux-gcc for RTE_TARGET also.
I tried multiple times and referred to different sources. Not sure whether I miss any steps in the process. What can I try next?

Based on the error logs, it looks like you have not built dpdk libraries in the desired target folder. To do it correctly
cd dpdk-main-folder
export RTE_SDK=$PWD
export RTE_TARGET=x86_64-native-linuxapp-gcc
make config T=$RTE_TARGET O=$RTE_TARGET
cd $RTE_TARGET
make -j 10
With these done go to your desired example and execute make

Related

Environment variable error while trying to create a solver in OpenFOAM 9

I'm trying to create a solver in my /opt/OpenFOAM/OpenFOAM-9/applications/solvers/electromagnetics directory using sudo foamNewSource App newSolver. But, I keep getting the following error:
foamNewSource: Creating new interface file newSolver.C
wmakeFilesAndOptions error: environment variable $WM_OPTIONS not set
And then, although I can see a newSolver.C file, I cannot see a Make directory and neither the rest of the files.
I'm running EndeavourOS Linux x86_64 with kernel 5.15.6-arch2-1 and shell bash 5.1.12. I installed the openfoam-org package from the AUR, and in order to set it up, I have the following in my .bashrc config file:
source /opt/OpenFOAM/OpenFOAM-9/etc/bashrc
At first, when I did env | grep WM I couldn't find WM_OPTIONS in my system. So, after googling a little bit, I added this to my .bashrc file:
source /opt/OpenFOAM/OpenFOAM-9/etc/bashrc
export WM_OPTIONS=linux64GccDPOpt
And now, doing env | grep WM I get:
WM_COMPILER=Gcc
WM_PRECISION_OPTION=DP
WM_PROJECT_USER_DIR=/home/username/OpenFOAM/username-9
WM_MPLIB=SYSTEMOPENMPI
WM_OPTIONS=linux64GccDPOpt
WM_ARCH=linux64
WM_LABEL_SIZE=32
WM_PROJECT=OpenFOAM
WM_THIRD_PARTY_DIR=/opt/OpenFOAM/ThirdParty-9
WM_LABEL_OPTION=Int32
WM_CC=gcc
WM_CFLAGS=-m64 -fPIC
WM_LINK_LANGUAGE=c++
WM_OSTYPE=POSIX
WM_PROJECT_VERSION=9
WM_DIR=/opt/OpenFOAM/OpenFOAM-9/wmake
WM_ARCH_OPTION=64
WM_CXXFLAGS=-m64 -fPIC -std=c++0x
WM_PROJECT_INST_DIR=/opt/OpenFOAM
WM_LDFLAGS=-m64
WM_CXX=g++
WM_COMPILE_OPTION=Opt
WM_PROJECT_DIR=/opt/OpenFOAM/OpenFOAM-9
WM_COMPILER_TYPE=system
WM_COMPILER_LIB_ARCH=64
Now I can see the WM_OPTIONS environment variable (just above WM_ARCH=linux64 and below WM_MPLIB=SYSTEMOPENMPI), but I still get the same wmakeFilesAndOptions error.
I don't know what configuration I'm messing up, so I'd appreciate some help!
Thanks!
Using sudo in this case is not a good idea, instead run the scripts on your home directory:
mkdir -p $FOAM_RUN
cd $FOAM_RUN
foamNewSource App newSolver
For WM_OPTIONS environment variable, don't set it manually, instead use:
export WM_OPTIONS=$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION$WM_COMPILE_OPTION

ROS link issue: "No rule to make target vtk6.2"

I am trying to compile a ROS project, developed by me, which is giving me compilation issues only on an Ubuntu 16.04 Virtual Machine. (The default pc on which is usually built on is always an Ubuntu 16.04 distros, the only difference is that now I am on a VM).
One of the packages I am trying to build depends on
#include <pcl/visualization/pcl_visualizer.h>
which includes the dependency on vtk6.2.
I am quite sure that vtk6.2 is installed by default on Ubuntu 16.04 distros (or I have installed it previously but I don't remember).
Indeed, if I execute the following command on a terminal
$ locate vtk-6.2
The resulting output is a wall of text containing all the files included in:
/usr/include/vtk-6.2/**
/usr/bin/**
/usr/lib/cmake/vtk-6.2/**
/usr/lib/python2.7/dist-packages/vtk/**
/usr/lib/tcltk/vtk-6.2/**
/usr/lib/x86_64-linux-gnu/libvtk*
/usr/share/vtk-6.2/**
Thus, it seems the dependencies are already present and ready to use since they are installed on the right path.
Unfortunately, when I try to compile with catkin_make -j1 the output prompt the following error:
make[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/libvtkproj4-6.2.so.6.2.0', needed by '...'. Stop.
CMakeFiles/Makefile2:14528: recipe for target '...' failed
Any help is really appreciated.
Just to relink, use libvtkCommonCore-6.2.so, as follow:
> sudo ln -s /usr/lib/x86_64-linux-gnu/libvtkCommonCore-6.2.so /usr/lib/x86_64-linux-gnu/libvtkproj4-6.2.so.6.2.0
> sudo ln -s /usr/lib/x86_64-linux-gnu/libvtkproj4-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libvtkproj4-6.2.so.6.2
> sudo ln -s /usr/lib/x86_64-linux-gnu/libvtkproj4-6.2.so.6.2 /usr/lib/x86_64-linux-gnu/libvtkproj4-6.2.so

Failed to generate gRPC service classes

I am trying to follow along with this tutorial. I am stuck on trying to generate the .grpc files (service classes) but I was able to generate the message classes. When I run
protoc -I ../proto --grpc_out=.
--plugin=protoc-gen-grpc=grpc_cpp_plugin ../proto/eample.proto
I get "grpc_cpp_plugin: program not found". How can I generate the service classes? Im not sure about the correct command I have to run.
The question is pretty old, but I hope my answer will help somebody. Giorgio Azzinnaro was right you need to install GRPC (in addition to protoc). On OSX you can do it with:
brew install grpc
For the other languages, commands are described here
Can you try to run this?
$ which grpc_cpp_plugin
If it finds a match, try to use the full path:
--plugin=protoc-gen-grpc=`which grpc_cpp_plugin`
If that isn't found, see if it is there in /usr/local/bin (it might just not be in the path), and if you find it there again use the full path in the --plugin directive.
If all this fails I suppose it might be that gRPC was not installed correctly...

Minko error building SDK

I am trying to compile the Minko framework on Windows 10 targeted at HTML. However, I'm hitting an error running the build_html5.bat script.
I've followed the instructions and completed all the steps (except for moving from the main branch to the dev branch, which is listed as optional). I cloned the source, set the new Environment Variable, ran the install_emscripten.bat file, and ran the specified commands in the emscripten command prompt.
However, when I try to run the build_html5.bat script, I get the following error:
I've looked in the MINKO_HOME directory and was able to find the jsoncpp.cpp file, but the jsoncpp.o file is not where in the directory specified in the command being called. The only file in MINKO_HOME/framework/obj/html5/release is a file named 'linker.rsp'.
I tried pulling down the dev branch into a different directory and updating the MINKO_HOME variable accordingly. I couldn't find the tool directory, but I was able to run the script scripts/solution_gmake_full.bat, after my first error trying to run build_html5_full.bat. When trying to run build_html5_full.bat, however, I get a different error:
Am I missing something here? Any help would be appreciated!
Sincerely,
Alex

Error installing pyMPI on CentOS 5.9

I'm trying to make a local install of pyMPI on a server running CentOS 5.9 (i.e. I don't have sudo privileges). The ./configure step completes successfully, however there a lot of "no"s. When i try running make i get a lot of "deprecated" error messages and the process exits with error code 2. Can anyone help me with this please?
The results of running
./configure --prefix=/inside/home/aarjunrao/apps/py_modules/pyMPI
are as follows
./configure output
I then run make, which gives the output
make output
Thanks in advance,
Arjun
From your make output, line 305:
pyMPI_util.c:22:31: error: numpy/arrayobject.h: No such file or directory
Is NumPy installed on this system? If not, that's probably your problem...
You can use this option in the configure process
./configure --prefix=/inside/home/aarjunrao/apps/py_modules/pyMPI --with-includes='-I/[path_to_numpy]/core/include'
In my case, it is
--with-includes='-I/usr/local/lib/python2.7/site-packages/numpy/core/include'
Doing that, you don't need to modify the system PATH.