Building Kurento on lubuntu 15.04 - cmake

I am trying to build whole Kurento on my lubuntu 15.04 (same as ubuntu 15.04 vivid with different UI). I started by cloning all repos:
mkdir kurento
cd kurento
git clone https://github.com/Kurento/kms-jsonrpc.git
git clone https://github.com/Kurento/kurento-module-creator.git
git clone https://github.com/Kurento/kms-filters.git
git clone https://github.com/Kurento/kms-core.git
git clone https://github.com/Kurento/kms-elements.git
git clone https://github.com/Kurento/adm-scripts.git
git clone https://github.com/Kurento/kms-cmake-utils.git
git clone https://github.com/Kurento/kms-crowddetector.git
git clone https://github.com/Kurento/kms-pointerdetector.git
git clone https://github.com/Kurento/kms-platedetector.git
git clone https://github.com/Kurento/kurento-media-server.git
git clone https://github.com/Kurento/kms-plugin-sample.git
git clone https://github.com/Kurento/kms-opencv-plugin-sample.git
then installing kms-cmake-utils:
cd kms-cmake-utils
mkdir build
cd build
cmake ..
make install
ok done, it installs a bunch of files in cmake module directory. then I tried to install kms-core:
cd kms-core
mkdir build
cd build
cmake ..
but cmake stops with following error
-- checking for module 'KurentoModuleCreator'
-- package 'KurentoModuleCreator' not found
CMake Error at /usr/share/cmake-3.0/Modules/GenericFind.cmake:93 (message):
Library KurentoModuleCreator not found
I tried to install kurento-module-creator:
cd kurento-module-creator
mvn install
it complies and installs some files in .m2 directory. I don't have any experience with maven to know if it is done correctly.
However it doesn't resolves the error with kms-core. apparently, cmake find_package command is not able to locate FindKurentoModuleCreator.cmake. I couldn't find the file in any Kurento's repos. can anybody please tell me if I am doing st wrong?

By default, all kms related projects are ready to be build as debian packages.
Instead of using cmake and make install by hand, it will be easier for you to generate debian packages and install them.
The instructions to do generate are very simple:
export PROJECT_NAME=<project_name>
mkdir build_$PROJECT_NAME
cd build_$PROJECT_NAME
git clone https://github.com/Kurento/$PROJECT_NAME
cd $PROJECT_NAME
debuild -uc -us
Once debuild finishes successfully you will have some debian packages in build_<project_name> directory, you can just install them using:
sudo dpkg -i *deb
It is possible that debuild fails because dependencies are not met, in this case you may have to install them using apt-get or generate them if they are kurento dependencies.
Nevertheless, we have available all kurento packages (including some custom dependencies whose sources are also available on github), already compiled in kurento repository:
deb http://ubuntu.kurento.org trusty kms6
or in the dev channel that has all the master branches builds
deb http://ubuntu.kurento.org trusty-dev kms6
Packages are for trusty release, because they are generated using this release which is the officially supported by kurento, but they can generally be installed on 15.04 too.

Related

Installing / Building the newest version of Inkscape (v 1.2) on Linux Ubuntu 20.04

I am trying to install Inkscape 1.2beta on Linux Ubuntu 20.04. The website currently only offers an AppImage and a source tarball. Since I would like to access the newest features of Inkscape via the command line, I need to build and install the source tarball.
INSTALL.md states that I need all submodules and dependencies before install.
How do I find these dependencies to successfully build and install Inkscape?
This list should satisfy all required dependencies on Linux Ubuntu:
apt install
cmake
imagemagick
libdouble-conversion-dev
libgdl-3-dev
libagg-dev
libpotrace-dev
libboost-all-dev
libsoup2.4-dev
libgc-dev
libwpg-dev
poppler-utils
libpoppler-dev
libpoppler-glib-dev
libpoppler-private-dev
libvisio-dev libvisio-tools
libcdr-dev
libgtkmm-3.0-dev
libgspell-1-dev
libxslt-dev libxslt1-dev
libreadline6-dev
lib2geom-dev
lib2geom-dev is needed to solve error "<ieeefp.h> not found".
For building Inkscape:
Download source tarball for Inkscape v1.2 from inkscape.org and extract
cd <extracted inkscape directory>
mkdir build && cd build
cmake ..
make
make install
If you still get an error during cmake .., please comment below with the names of the missing modules in the error message.
The details on how to build Inkscape (and the dependencies) could be found in the repository itself, or Inkscape website (For completness, the steps are copied from the website here):
To obtain the latest source code, use the following command (downloads into a subdirectory of your current working directory called "inkscape" by default):
git clone --recurse-submodules https://gitlab.com/inkscape/inkscape.git
To update this code later, change into the download folder and use:
git pull --recurse-submodules && git submodule update
By default, git will download every branch and every commit. If you are on a slow machine, have limited disk space, or limited internet bandwidth, you can use shallow clone and single branch clone options to limit the amount of data it will download:
git clone --depth=1 --single-branch --recurse-submodules --shallow-submodule https://gitlab.com/inkscape/inkscape.git
Building Inkscape on Linux
Open a terminal at the root of the folder into which you downloaded the source code in the previous step.
Install build dependencies
Download and run the script to install everything required for compiling Inkscape (check script to see if your distribution is supported):
wget -v https://gitlab.com/inkscape/inkscape-ci-docker/-/raw/master/install_dependencies.sh -O install_dependencies.sh
bash install_dependencies.sh --recommended
Compile
To compile with CMake, do the following:
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=${PWD}/install_dir -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
make -j8
make install
Notes:
Using ccache is optional but speeds up compilation.
The optional -j8 argument to make tells it to run 8 jobs in parallel. Feel free to adjust this to the number of hardware threads (physical cores) available on your computer.
The recommended -DCMAKE_INSTALL_PREFIX argument allows to specify a custom isolated installation location (in the example above install_dir/ inside the build folder). It avoids installation into system locations (where it could conflict with other versions of Inkscape) and allows running multiple versions of Inkscape in parallel. It will still use all the files (including the preferences.xml) that reside in the ~/.config/inkscape directory.
Run
Run it from the build directory:
install_dir/bin/inkscape

Using Github CI Pipeline with wxWidgets

I got a cross platform application using a wxWidgets gui and want to test the cross build with github ci pipeline.
The Linux test runs fine as i'm able to install the wxWidgets dependencies using apt-get.
But i got no idea how to setup the wxWidgets Windows dependencies. Google didn't help me either.
any suggestions what command i need to put into my yml-file?
thanks!
edit: what i've tried so far...
- name: install wxwidgets
shell: powershell
run: |
choco install wxwidgets
but this is the same like cloning the git version, only with an older version
and
run: |
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
bootstrap-vcpkg.bat
vcpkg integrate install
vcpkg install wxwidgets
the pipeline keeps hanging while installing vcpkg
You should be able to install wxWidgets using vcpkg, of course, but you can also just download the official binaries and use them instead, e.g. like this:
build-cpp-windows-2019:
name: C++/MSVS (windows-2019)
runs-on: windows-2019
env:
wxMSW_VER: 3.1.3
WXWIN: c:\wx
steps:
[...]
- name: Install wxWidgets
run: |
mkdir ${env:WXWIN} | Out-Null
cd ${env:WXWIN}
curl -OL https://github.com/wxWidgets/wxWidgets/releases/download/v${env:wxMSW_VER}/wxWidgets-${env:wxMSW_VER}-headers.7z
7z x wxWidgets-${env:wxMSW_VER}-headers.7z
curl -OL https://github.com/wxWidgets/wxWidgets/releases/download/v${env:wxMSW_VER}/wxMSW-${env:wxMSW_VER}_vc14x_x64_Dev.7z
7z x wxMSW-${env:wxMSW_VER}_vc14x_x64_Dev.7z

CLion make install globally

I would like to build and install my project using CLion, however it must be installed globally (i.e. to /usr/local/lib/cmake/).
In bash I build with
make -j$(nproc)
sudo make install
and then run sudo ldconfig so that another app (gnuradio-companion) can find my project binaries.
When I run CLion as a regular user (non-root) and click Run > Install, I get
file INSTALL cannot set permissions on
"/usr/local/lib/cmake/
Is there any way to sudo make install and sudo ldconfig in CLion without starting CLion as root?

Yum install package and all its dependencies from local directory

I have downloaded a package and all of its dependencies using yum's download only option into a local directory. I want to then install the package and its dependencies from that directory by passing yum the name of the rpm that contains the primary package in a manner similar to how pip lets you install wheel packages from local directories (provided the wheel files for the dependencies are also present). I DO NOT want yum to try and download the dependencies from a remote repo.
Basically I want this only for yum:
pip install --no-index --find-link=/directory-with-wheel-files primary_package.whl
I have used these links to try and solve my problem:
How to make rpm auto install dependencies
https://unix.stackexchange.com/questions/281715/how-can-i-install-a-local-rpm-using-only-the-local-dependency-rpm-files?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
https://wiki.centos.org/HowTos/CreateLocalRepos
https://www.ostechnix.com/install-packages-specific-repository-linux/
My repo file looks like this:
[basemap]
name=Basemap
baseurl=file:///var/tmp/install/basemap
enabled=1
gpgcheck=0
and my folder /var/tmp/install/basemap has been turned into a repo using yum's createrepo. Yet when I run yum --enablerepo=basemap install primary_package.rpm yum still tries to download the dependencies from the internet. How do I force it to look in my local repo for the dependencies?
Figured it out. I had one option missing from my yum command. I had to disable other repos and then enable only my repo. This command worked:
yum --disablerepo='*' --enablerepo=myrepo install primary_package.rpm

Running CMake on Amazon Linux

I am trying to build OpenJpeg on an AWS Amazon Linux EC2 instance. I installed cmake and gcc and had no issues during installation. When I try to cmake openjpeg I get the following error:
-- Check if the system is big endian
-- Searching 16 bit integer
CMake Error at /usr/share/cmake/Modules/TestBigEndian.cmake:44 (message):
no suitable type found
Call Stack (most recent call first):
CMakeLists.txt:164 (TEST_BIG_ENDIAN)
-- Configuring incomplete, errors occurred!
Checking the error logs it seems CMake is unable to determine the size of integers, shorts and longs. The full error log can be found in this gist
How can I work this out and make CMake work?
Amazon has a guide: Preparing to Compile Software, which proposes the following command to install a C compiler.
sudo yum groupinstall "Development Tools"
Next, you can download and build Cmake yourself: Install Cmake 3.
wget https://cmake.org/files/v3.18/cmake-3.18.0.tar.gz
tar -xvzf cmake-3.18.0.tar.gz
cd cmake-3.18.0
./bootstrap
make
sudo make install
Note: the last make actually needs sudo.
This works in the most recent Amazon Linux image (Nov 2021):
# Install sudo, wget and openssl, which is required for building CMake
yum install sudo wget openssl-devel -y
# Install development tools
sudo yum groupinstall "Development Tools" -y
# Download, build and install cmake
wget https://cmake.org/files/v3.18/cmake-3.18.0.tar.gz
tar -xvzf cmake-3.18.0.tar.gz
cd cmake-3.18.0
./bootstrap
make
sudo make install
Though this does not actually answer why the error was happening but I was able to build OpenJpeg by building CMake from source. So I just removed Cmake which was installed via yum and I believe was 2.8.12. Downloaded the latest CMake3 sources (v 3.10) built Cmake and openjpeg and all my other packages with no issues.
You could try to set up a Docker container to replicate correct environment. This way, you could form a container on your local machine, make sure it all builds on the container environment, and later use this environment on the EC2.
There is a project on Github that provides a Docker image which can be used to compile for Lambda and test stuff locally. Have a look: https://github.com/lambci/docker-lambda