Unable to build WebRTC code on RHEL 7.4 because of `GLIBC_2.18' not found error - webrtc

I am trying to build the WebRTC code on RHEL 7.4 server as per the instructions mentioned on below link:
https://webrtc.github.io/webrtc-org/native-code/development/
But observing the below error.
$ gn gen out/Debug
../src/buildtools/linux64/gn: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by ../src/buildtools/linux64/gn)
Looks '/src/buildtools/linux64/gn' is expecting the `GLIBC_2.18' version , but RHEL 7/CentOS 7 can support till glibc 2.17.
I do not want to upgrade to RHEL 8/CentOS 8 version as of now.
I tried to build gn source code on RHEL 7, but getting different errors.
What is the solution to this problem ?

CentOS 7 : Build example, gn .
clang++ must support C++17 to build gn:
# yum install centos-release-scl-rh centos-release-scl
# yum install llvm-toolset-7
git clone https://gn.googlesource.com/gn
cd gn
python build/gen.py
scl enable llvm-toolset-7 bash
ninja -C out
... to get the executable out/gn

Related

Newer version of cmake available in CentOS 7 than in CentOS 8?

I have CentOS 7 and CentOS 8 installed on 2 VMs. Both have epel enabled.
CentOS 7:
$ cat /etc/redhat-release
CentOS Linux release 7.8.2003 (Core)
$ yum repolist
...
repo id repo name status
base/7/x86_64 CentOS-7 - Base 10070
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 13445
extras/7/x86_64 CentOS-7 - Extras 413
updates/7/x86_64 CentOS-7 - Updates 1127
repolist: 25055
CentOS 8:
$ cat /etc/redhat-release
CentOS Linux release 8.2.2004 (Core)
$ yum repolist
repo id repo name
AppStream CentOS-8 - AppStream
BaseOS CentOS-8 - Base
PowerTools CentOS-8 - PowerTools
epel Extra Packages for Enterprise Linux 8 - x86_64
epel-modular Extra Packages for Enterprise Linux Modular 8 - x86_64
extras CentOS-8 - Extras
On CentOS 7, cmake3 is available from the epel repo, and provides cmake version 3.17.
$ yum provides cmake3
...
cmake3-3.17.3-3.el7.x86_64 : Cross-platform make system
Repo : epel
On CentOS 8, cmake3 is available from the AppStream repo, and provides cmake version 3.11.
$ yum provides cmake3
...
cmake-3.11.4-7.el8.x86_64 : Cross-platform make system
Repo : #System
Matched from:
Provide : cmake3 = 3.11.4-7.el8
I tried to disable all repos except for epel, but it's still coming back with the one from AppStream (which seems counter intuitive to me - surely it should come back with nothing if I've disabled all the other repos?)
$ yum --disablerepo=* --enablerepo=epel info cmake
Last metadata expiration check: 0:21:06 ago on Fri 11 Sep 2020 09:44:08 AM UTC.
Installed Packages
Name : cmake
Version : 3.11.4
Release : 7.el8
Architecture : x86_64
Size : 24 M
Source : cmake-3.11.4-7.el8.src.rpm
Repository : #System
From repo : AppStream
Summary : Cross-platform make system
URL : http://www.cmake.org
License : BSD and MIT and zlib
Description : CMake is used to control the software compilation process using simple
: platform and compiler independent configuration files. CMake generates
: native makefiles and workspaces that can be used in the compiler
: environment of your choice. CMake is quite sophisticated: it is possible
: to support complex environments requiring system configuration, preprocessor
: generation, code generation, and template instantiation.
I searched on pkgs.org, and it certainly does seem that cmake-3.11 is the latest version available to CentOS 8.
Apart from building from source, is there any other way to obtain a newer version of cmake on CentOD 8?
The cmake: 3.11.4 version will still be listed when you run yum info because it is already installed, so disabling the AppStream repo won't affect what is shown. If you only want to show available packages (based on your enabled yum repos), you can run this instead:
yum --disablerepo=* --enablerepo=epel info cmake --available
If you want to install the latest version of CMake (or some other version), you can always download the binary distribution from the CMake download page.
Once downloaded, you can extract the package to somewhere you have access to on your machine, e.g.:
mkdir ~/cmake
tar xvzf ~/Downloads/cmake-3.18.2-Linux-x86_64.tar.gz -C ~/cmake
Finally, make sure you add the extracted bin directory to your PATH environment variable so you can run the cmake executable from the command line.

How to install xclip on Centos 8?

I recently started using Centos 8 on my Workstation and there is no xsel or xclip
Is there something wrong or is it on purpose, that xclip is not available?
Here is the output of dnf repolist, maybe I'm missing some must-have repo?
repo id repo name status
AppStream CentOS-8 - AppStream 5.089
Atom Atom Editor 142
BaseOS CentOS-8 - Base 2.843
amdgpu-pro-local AMD amdgpu Pro local repository 70
docker-ce-stable Docker CE Stable - x86_64 57
*epel Extra Packages for Enterprise Linux 8 - x86_64 3.643
extras CentOS-8 - Extras 3
virtualbox Oracle Linux / RHEL / CentOS-8 / x86_64 - VirtualBox 4
You can compile from yourself:
# Obtain the sourcecode
git clone https://github.com/astrand/xclip.git
./bootstrap
./configure
make
make install
Verify that is installed:
man xclip
First Enable EPEL (Extra Packages for Enterprise Linux) repo on CentOS 8 to install extra packages such xclip.
Step 1: Install epel repo
# yum install epel-release.noarch
or
# dnf install epel-release
Step 2: Install xclip from the EPEL repo
# dnf install xclip
Last metadata expiration check: 0:06:09 ago on Mon 07 Feb 2022 10:39:39 AM IST.
Dependencies resolved.
=============================================================================================================================================================
Package Architecture Version Repository Size
=============================================================================================================================================================
Installing:
xclip x86_64 0.13-8.el8 epel 35 k
Transaction Summary
=============================================================================================================================================================
Install 1 Package
In Centos 8 while running pyperclip.copy("Hello"), I found centos 8 don't have xclip and so the package gives me error.
I have search all packages but repository of Centos8 don't have any similar packages.
I resolve this in following steps.
Install libXmu and X11 development library
sudo yum install libXmu-devel libX11-devel
Obtain the sourcecode
git clone https://github.com/astrand/xclip.git
./bootstrap
./configure
make
sudo make install
Then test install
man xclip
Now I can use pyperclip in python to use clipboard.

Getting error java.lang.UnsatisfiedLinkError: no jzmq in java.library.path in IntelliJ ide with windows 10

I have a java project which have zeromq implementation. i have installed zeromq windows version in my windows 10 OS.
When running the application i am getting above error.
I have downloaded zeromq (windows) installer from http://zeromq.org/area:download and installed it in C:\ZeroMQ4.0.4 folder.
Any idea what further action i have to take?
As i am not able to successfully work it in windows i have installed it in a ubuntu 16 vm under my windows 10 machine
Steps i have done are
Installed java in ubuntu
apt-get install -y libtool pkg-config build-essential autoconf automake uuid-dev libzmq3-dev checkinstall
Download Required Package
wget https://github.com/zeromq/zeromq4-x/releases/download/v4.0.8/zeromq-4.0.8.tar.gz
wget https://github.com/zeromq/jzmq/archive/v2.2.2.zip
tar -xzf zeromq-4.0.8.tar.gz
unzip v2.2.2.zip
Install ZMQ
cd zeromq-4.0.8
./configure
make
checkinstall it will creat deb package to be removed easily if required
ldconfig
install jzmaq
cd jzmq-2.2.2/
./autogen.sh
./configure
make
make install
*** In case error show up --- autogen.sh: error: could not find libtool. libtool is required to run autogen.sh. run the mentioned command.
ln -s /usr/bin/libtoolize /usr/bin/libtool
Set java_home path in ubuntu
Still i am getting same error when debugging it from my windows 10 machine with Intellij IDE

cuda install error on Ubuntu 17.04

abigail#abilina:~/Downloads$ sudo dpkg -i cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
Selecting previously unselected package cuda-repo-ubuntu1604.
(Reading database ... 205999 files and directories currently installed.)
Preparing to unpack cuda-repo-ubuntu1604_8.0.61-1_amd64.deb ...
Unpacking cuda-repo-ubuntu1604 (8.0.61-1) ...
Setting up cuda-repo-ubuntu1604 (8.0.61-1) ...
Warning: The postinst maintainerscript of the package cuda-repo-ubuntu1604
Warning: seems to use apt-key (provided by apt) without depending on gnupg or gnupg2.
Warning: This will BREAK in the future and should be fixed by the package maintainer(s).
Note: Check first if apt-key functionality is needed at all - it probably isn't!
Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package cuda-repo-ubuntu1604)
OK
abigail#abilina:~/Downloads$ sudo apt-get install cuda
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
cuda : Depends: cuda-8-0 (>= 8.0.61) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
My ubuntu version is 17.04. Does this mean my Linux currently can't install CUDA? I want to install TensorFlow with GPU support.
Per suggestion:
abigail#abilina:~/Downloads$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
https://launchpad.net/ubuntu/zesty/amd64/nvidia-cuda-toolkit
above is the correct one.
apt-get install nvidia-cuda-toolkit
but remember the cuda installed through apt were installed in different location. manually create ln -s at /usr/local/cuda for include,lib64,and bin
I have successfully installed CUDA 8.0 + the latest patch from NVIDIA on Ubuntu 17.04:
Download the .run file from https://developer.nvidia.com/cuda-downloads, choosing Ubuntu 16.04 (Base Installer)
You will not be able to install it by just running, because it is looking for a file called InstallUtils.pm which is not present in Ubuntu 17.04, but curiously, is present in the .run file - so: unpack the .run file using ./cuda*.run --tar mxvf
copy InstallUtils.pm (should be in the /bin path) to /usr/lib/x86_64-linux-gnu/perl-base
Run the installer (You may want to say no to the driver install step to keep the one you install through apt - I'm using 381.22, because 375.26, which is provided by the .run file does not support my 1080ti)
gcc 6 is incompatible with CUDA, but this is easily remedied for compiling the sample files: just add export EXTRA_NVCCFLAGS="-Xcompiler -std=c++98" to your bashrc file, and comment out
from one of the headers (I think it was host_config.h, but you'll see it once you try to compile) - comment out these lines:
#if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ > 3)
#error -- unsupported GNU version! gcc versions later than 5.3 are not supported!
This is all from memory, so hopefully it's accurate enough.
I managed to find this solution thanks to these useful posts:
https://devtalk.nvidia.com/default/topic/983777/can-t-locate-installutils-pm-in-inc/
https://devtalk.nvidia.com/default/topic/949770/cuda-8-0rc-supporting-gcc6-/
For ubuntu 17.04, I had to use cuda 9.0 (deb version)
https://developer.nvidia.com/cuda-release-candidate-download
I couldn't get it to work otherwise. Cuda 8.0 needs gcc 5.3.1 but cuda 9.0 is compatible with gcc 6.3.0 which is installed on ubuntu 17.04 automatically.
More precisely, this is what I did:
On Ubuntu 17.04, install CUDA 9.0 — you can currently download the beta version 
https://developer.nvidia.com/cuda-release-candidate-download
I downloaded the .deb file and haven’t had any problems — follow the steps they recommend when you download cuda 9.0 
sudo dpkg -i cuda-repo-ubuntu1704-9-0-local-rc_9.0.103-1_amd64.deb
sudo apt-key add /var/cuda-repo-9.0-local-rc/7fa2af80.pub
sudo apt-get update
sudo apt-get install cuda
Then follow the post installation steps from the nvidia instructions (i.e., setting PATH and LD_LIBRARY_PATH) 
 http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#post-installation-actions)
export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64 ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Cuda 9 is compatible with gcc 6.3.0 (which comes with 17.04). I used arch=sm_52 and sometimes for my make files have to go ‘make clean’.
Installing Cuda 9.0 was the simplest solution in my case.
Alternatively, if you'd prefer cuda 8, you can download the deb file and then use the command
dpkg-deb -x cuda_8.*.deb /usr/local/cuda-8.0
to extract the contents from the deb file and have them placed in the desired directory.
Source: http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#advanced-setup)

Update Mono via CentOS

Hello i have CentOS and im trying my damnedest to update Mono i have version 1.2.4 at the moment some how, and im trying to compile something via xbuild and it isn't working im thinking because im using to old a version of mono.
Please BEFORE you link me ANY guide, if it links to the ftp.novell directory it no longer works, that directory is all scrapped. So i dont even know where to get a proper tarball for it now because on their site it only shows opensuse and such? Not CentOS like there used to be.
Can anyone help me with this :\
What version of CentOS are you using? 4?
The instructions below were tested on CentOS 5.9. They will also work fine on the latest CentOS version (6.4 as of this writing) and I imagine they would work with older versions as well.
Head over to /usr/src as root
su
cd /usr/src
Ensure GCC and friends are installed (to build the Mono source code)
yum install gcc gcc-c++ bison
Grab and unpack the Mono source code
wget http://download.mono-project.com/sources/mono/mono-3.0.7.tar.bz2
tar -xvjf mono-3.0.7.tar.bz2
Build and install Mono
cd mono-3.0.7
./configure --prefix=/usr
make && make install
Verify that you have a working Mono installation with mono --version and mcs --version
Build the GDI+ compatibility layer (required for System.Drawing)
yum install glib2-devel libX11-devel pixman-devel fontconfig-devel freetype-devel libexif-devel libjpeg-devel glib2-devel libtif-devel libpng-devel giflib-devel
cd /usr/src
wget http://download.mono-project.com/sources/libgdiplus/libgdiplus-2.10.tar.bz2
tar -xvjf libgdiplus-2.10.tar.bz2