Kernel compilation for Click modular router - networking

I am trying to install Click modular router in kernel mode. For this I need to patch and compile a custom kernel. I am presently running ubuntu on kernel 2.6.22.14 and I am trying to compile the kernel 2.6.24 from kernel.org
I patched the downloaded kernel with the I use the /boot/config file of my present kernel to do a compilation of new kernel via make oldconfig. I then did a make modules_install and finally make install.
The kernel compiled fine and boots nicely. However when I try to insert the kernel module Click.o it fails.
I am guessing I need to do some changes in config file before installing. Please help.

I think that the better way is to try patchless installation of Click in kernel mode. Patchless installation works on modern kernel versions. For example you can use Debian 6.0 Squeeze (kernel 2.6.32) or Debian Wheezy (kernel 3.2). I checked, it works.
When you get error like that on Wheezy:
=========================================
Can't find include/linux/skbuff.h in /lib/modules/3.2.0-4-686-pae/build.
Are you sure /lib/modules/3.2.0-4-686-pae/build contains Linux kernel source?
=========================================
You might need to apply that hack: https://github.com/kohler/click/issues/104

Related

Can not use Elixir in jupyter notebook

Question Summary
I'm trying to use Elixir in jupyter notebook but IElixir doesn't work.
Does somebody know how to solve below error & use Elixir in jupyter notebook?
Environments
OS Ubuntu ver.“18.04.3 LTS (Bionic Beaver)”
CPU Intel Core i7-7700HQ 2.80GHz
RAM 16GB
GPU NVIDIA GeForce GTX 1600 Mobile
Version Information
anaconda 4.7.12
jupyter 1.0.0
elixir 1.9.4
What I did & stacking points
I refer to IElixir github comments to built a deverop environment.
https://github.com/pprzetacznik/IElixir
Progressed Situation
Repository clone (done)
git clone https://github.com/pprzetacznik/IElixir.git
cd IElixir
Built IElixir (Stacking Point)
mix deps.get
mix test
MIX_ENV=prod mix compile
Error was happen in mix test
kojiro#Inspiron7577:~/IElixir$ mix test
===> Compiling esqlite
===> Compiling /home/kojiro/IElixir/deps/esqlite/c_src/esqlite3_nif.c
===> /home/kojiro/IElixir/deps/esqlite/c_src/esqlite3_nif.c:25:10: fatal error: sqlite3.h: ãã®ãããªãã¡ã¤ã«ã ãã£ã¬ã¯ããªã¯ããã¾ãã #include “sqlite3.h” ^~~~~~~~~~~ compilation terminated.
** (Mix) Could not compile dependency :esqlite, “/home/kojiro/.mix/rebar3 bare compile --paths=”/home/kojiro/IElixir/_build/test/lib/*/ebin"" command failed. You can recompile this dependency with “mix deps.compile esqlite”, update it with “mix deps.update esqlite” or clean it with “mix deps.clean esqlite”
first time, I thought error caused by esqlite could not compile in Mix.
so I tried all of error commented command but error doesn't solved.
What I did to solve this error
I follow to IElixir github comment.
use mix local.rebar --force
add ~/.mix/ to PATH then try mix test again.
(base) kojiro#Inspiron7577:~/IElixir$ export PATH="$PATH:~/.mix/"
but error doensn't solved.
I already tried to search "Could not compile dependency :esqlite" but all environmentl situation is different.
Does someone know how to solve this situation?
I am not familiar with this problem, however I found some resources that might help you get Elixir working in jupyter (if ever you didn't already found them !) :
This medium post take you step by step through the installation, and also mention that is a Docker image that exists for it.
you can also find an installation tutorial with Docker here (different from the above mentioned one)
Hope it helps.

OpenFlipper fails to compile, unable to find Qt

On its website OpenFlipper says it can be compiled in three steps as:
cd build
cmake ..
make # or, even better, make -j8
However I get an error saying Qt is unable to be found at the cmake step and that I should specify a QT5_INSTALL_PATH. However even if I do this OpenFlipper is still issuing the same complaint!
You are not supposed to specify where Qt is installed in the QT5_INSTALLED_DIR but prior to that as environment variable in your terminal:
# assuming Qt was installed in your home directory, as is default
export CMAKE_PREFIX_PATH=~/Qt5.7.0/5.7/gcc_64/
# note that you now have to call cmake etc from that process
Compiling and running it after that you might get errors telling you GL_ARB_vertex_buffer_object is not present, even if your glxinfo | grep ARB_vertex_buffer is telling you it is.* Clicking "Ignore" results in a crash. To mitigate this, you have to manually change (4,3) to (3,0) in
OpenFlipper/widgets/coreWidget/CoreWidget.cc
If you still experience errors, try deleting your cmake cache, this is accomplished by using cmake-gui (was in the package cmake-qt-gui for me) and hitting "Delete Cache"
(optional) remove the very annoying warning message you get at every start of OpenFlipper by removing the line concerning "renderers shipped" in
OpenFlipper/Core/Core.cc
*: My teaching assistant told me that there is a bug in Qt (<5.9) that forces OpenFlipper to use the OpenGL Compatibility Profile. Additionally Intel and AMD drivers hand back an OpenGL 3.0 Core Context when asked for an OpenGL 4.3 Compatibility Context (my TA described this behavior as a "bug", I'm not so sure about this), leading to a crash in Qt. So this should be resolved in Qt 5.9 (not out yet). This seems to affect also mainly integrated graphics, so one could try using a dedicated GPU.

GLEW program can't find libglew.so even when file exists

I am trying to set up an OpenGL development environment on a Linux machine (Mint 17). I have just installed GLEW from the source on the GLEW source forge page (Downloaded source; extracted; make install).
I want to check that everything is set up correctly and am trying to run a test program. My program compiles and links but when I try to run it I get the error "error while loading shared libraries: libGLEW.so.1.12: cannot open shared object file: No such file or directory"
libGLEW.so.1.12 exists; from what I read I think I have a 32bit executable and the SO is 64bit. However I can't find a solution to this problem; I know I need to create a 32bit library but I can't find any instructions for doing this.
Can someone please provide instructions to either (or preferably both):
Install 32bit libraries for GLEW
Link with GLEW statically
Preferably I'd like to link statically for now (I find it far more convenient for testing) but the instructions on the GLEW website only say how to do this for windows. Eventually I do plan to link everything dynamically.

Setting Code Block to run MPICH2

Greeting Everyone!
I am a student and currently I got problem in setting Code Block.
Can anyone help me or guide me how to configure Code Block so it can run MPI?
I already install Code Block and MPICH2.
But when I trying to compile the code, it does not work. Code block doesn't detect MPI.
Anyone can show to me step by step to configure it.
Really Appreciate it :)
I assume you are asking about Code::Blocks IDE.
I think, you should modify your IDE and project settings and switch from default GCC compiler setup to MPI one.
First your should to clone GCC Compiler Setup in IDE Settings (menu "Settings" -> "Compiler and debugger"). http://www.codeblocks.org/docs/main_codeblocks_en3.html#x3-270001.11.6 You must clone the some complier settings (I recommend to copy a default "GNU GCC Compiler"), then you can change new settings set on the tab "Toolchain executables" -- replace the gcc and g++ by mpicc and mpicxx.
Second step is to change your MPI project build settings to use new compiler settings.
This will allow you to build MPI applications with Code::Blocks IDE.
To run them you can use the command line, and to debug them... debugging of MPI is not so easy...
Use Eclipse PTP. It has builtin support for MPI based programs.

Error -1001 in clGetPlatformIDs Call !

I am trying to start working with OpenCL. I have two NVidia graphics card, I installed "developer driver" as well as SDK from NVidia website. I compiled the demos but when I run
./oclDeviceQuery
I see:
OpenCL SW Info:
Error -1001 in clGetPlatformIDs Call
!!!
How can I fix it? Does it mean my nvidia cards cannot be detected? I am running Ubuntu 10.10 and X server works properly with nvidia driver.
I am pretty sure the problem is not related to file permissions as it doesn't work with sudo either.
In my case I have solved it by installing nvidia-modprobe package available in ubuntu (utopic/multiverse). And the driver itself (v346) was installed from https://launchpad.net/~mamarley/+archive/ubuntu/nvidia
Concretely, I have installed nvidia-opencl-icd-346, nvidia-libopencl1-346, nvidia-346-uvm, nvidia-346 and libcuda1-346. Not sure if they are all needed for OpenCL.
This is a result of not installing the ICD portion of Nvidia's openCL runtime. The ICD profile will instruct your application of the different openCL implementations installed on the system as multiple implementations from different vendors can coexist. Whe your application does not find the ICD information it gives the Error -1001.
Run your program as root. In case of success: you have trouble with cl_khr_icd- extension to load the vendor driver.
If you not running X11, you have to create device files manually or by (boot-)script:
ERROR: clGetPlatformIDs -1001 when running OpenCL code (Linux)
Same problem for me on a Linux system. Solution is to add the user to the video group:
# sudo usermod -aG video your-user-name
Since I just spend a couple of hours on this, I thought I would share:
I got the error because I was connected to the machine per remote desktop (mstsc). On the machine itself everything worked fine.
I have been told that it should work with TeamViewer by the way.
Dont know if you ever solved this problem, but I had the same issue and solved it in this post: ERROR: clGetPlatformIDs -1001 when running OpenCL code (Linux)
Hope it helps!
I have solved it in Ubuntu 13.10 saucy for intel opencl by created link:
sudo ln -s /opt/intel/opencl-1.2-3.2.1.16712/etc/intel64.icd /etc/OpenCL/vendors/nvidia.icd
I just ran into this problem on ubuntu 14.04 and I could not find ANY working answers anywhere online including this thread (though this was the first to show up on google). What ended up working for me was to remove ALL previous nvidia software and then to reinstall it using the .run file provided on the nvidia website. Installing the components through apt-get seems to fail for some reason.
1) Download CUDA .run file: https://developer.nvidia.com/cuda-downloads
2) Purge all previous nvidia packages
sudo apt-get purge nvidia-*
3) Install all run file components (you will likely have to stop X or restart in recovery mode to run this)
sudo sh cuda_X.X.XX_linux.run
This is because OpenCL has the same brain damaged one library per vendor setup that OpenGL has. A likely reason for the -1001 error is that you have compiled with a different library than the linker is trying to dynamically load.
So see if this is the problem run:
$ ldd oclDeviceQuery
...
libOpenCL.so.1 => important path here (0x00007fe2c17fb000)
...
Does the path point towards the NVidia-provided libOpenCL.so.1 file? If it doesn't, you should recompile the program with an -L parameter pointing towards the directory containing NVidia's libOpenCL.so.1. If you can't do that, you can override the linker's path like this:
$ LD_LIBRARY_PATH=/path/to/nvidias/lib ./oclDeviceQuery
For me, I was missing the CUDA OpenCL library, Running sudo apt install cuda-opencl-dev-12-0 solved it.
You should get number of platforms, allocate the memory for platforms, again get this platforms and then create context from this platform. There is good example:
http://developer.amd.com/support/KnowledgeBase/Lists/KnowledgeBase/DispForm.aspx?ID=71
This might be due to querying clGetPlatformIDs by multiple threads at the same time

Resources