Why I can't compile Drwright in Ubuntu 12.04 - compilation

Drwright is not included in the main Ubuntu distribution but is availble through a PPA.
In this way installation steps:
sudo add-apt-repository ppa:drwright/stable
sudo apt-get update
sudo apt-get install drwright
Installation completed succesfully.
But I want correct the source code of this program. I use
apt-get source drwright
to download it. And first of all I try compile the source code without changes:
./configure
But configure doesn't execute:
configure: error: Package requirements (
glib-2.0 >= 2.31.13
gio-2.0 >= 2.31.13
gdk-pixbuf-2.0 >= 2.25.3
gtk+-3.0 >= 3.0.0
libcanberra-gtk3 >= 0
libnotify >= 0.7
x11) were not met:
No package 'glib-2.0' found
No package 'gio-2.0' found
No package 'gdk-pixbuf-2.0' found
No package 'gtk+-3.0' found
No package 'libcanberra-gtk3' found
No package 'libnotify' found
No package 'x11' found
Why Drwring installed from PPA and work succesfully, but I can't compile it from source code?

Header Files
To build a program from source, you don't just need the compiled binaries for the libraries it uses. You also need their header files.
In Debian, Ubuntu, and other Debian-based operating systems, header files are provided by packages whose names end in -dev. Usually it's the binary package name with -dev appended, or the binary package name with some version numbers removed and -dev appended.
-dev packages (for compiling) should not be confused with -dbg packages (for debugging). Here's some information about how and why these packages are made.
pkg-config Packages vs. Your Package Manager's Packages
When you build from source code and ./configure tells you about missing packages, usually it is not checking with the package manager to see what is installed, and the names of missing packages typically are not the exact names of the packages you need to install with your package manager. (pkg-config is a common way for ./configure scripts to calculate dependencies--see this article, the manpage, and the project page for more information.)
Figuring Out What Packages to Install with the Package Manager
To find out what packages you do need to install, you can look at packages that start the same...or that start with lib followed by the name of the "packages" spit out by ./configure. Packages starting with lib are more common (on Debian and Debian-based systems) since most library packages are named that way.
You can search for packages online (other distributions typically also provide this, here's Debian's). Or you can use bash completion to find them. Since this uses the locally stored information on your system about what packages are available in what versions from where, you should update that information first:
sudo apt-get update
Then type in a command that would install a package, with just the beginning of the name--however much you think you know. For example, for glib-2.0:
ek#Del:~$ apt-get install libglib2
libglib2.0-0 libglib2.0-cil-dev
libglib2.0-0-dbg libglib2.0-data
libglib2.0-0-dbgsym libglib2.0-dev
libglib2.0-0-refdbg libglib2.0-dev-dbgsym
libglib2.0-0-refdbg-dbgsym libglib2.0-doc
libglib2.0-bin libglib2-ruby
libglib2.0-bin-dbgsym libglib2-ruby1.8
libglib2.0-cil libglib2-ruby1.8-dbg
libglib2.0-cil-dbgsym
There, I did not run the command I entered. (It wouldn't have succeeded if I had, both because there is no package called libglib2 and because apt-get install will not succeed unless run as root.)
Instead, I pressed Tab a couple times at the end of the line, and I got a list of suggestions.
From these suggestions, the right one is libglib2.0-dev.
If You're Still Not Sure
Sometimes you won't necessarily know which one is right; then you can use apt-cache show ... to find out. For example, suppose I'm wondering if I also need libglib2.0-cil-dev:
ek#Del:~$ apt-cache show libglib2.0-cil-dev
Package: libglib2.0-cil-dev
Priority: optional
Section: libs
Installed-Size: 174
Maintainer: Ubuntu Developers <ubuntu-devel-discuss#lists.ubuntu.com>
Original-Maintainer: Debian CLI Libraries Team <pkg-cli-libs-team#lists.alioth.debian.org>
Architecture: i386
Source: gtk-sharp2
Version: 2.12.10-2ubuntu4
Replaces: libglib2.0-cil (<< 2.12.9-2)
Depends: libglib2.0-cil (= 2.12.10-2ubuntu4)
Filename: pool/main/g/gtk-sharp2/libglib2.0-cil-dev_2.12.10-2ubuntu4_i386.deb
Size: 2408
MD5sum: 50fa0825eb4d73593bdc8419c5fc9737
SHA1: f9659e85410505f7463a7117ebb92c70af6ad3aa
SHA256: 8f9d39465f2a1d5b4cc7832660ea53bacc681811ab2c80b57cad1655d4055b01
Description-en: CLI binding for the GLib utility library 2.12
This package provides the glib-sharp assembly that allows CLI (.NET) programs
to use the GLib utility library 2.12. This is mostly useful for the GTK+ and
GNOME bindings.
.
GTK# 2.10 is a CLI (.NET) language binding for the GTK+ 2.10 toolkit
.
This package contains development files for the glib-sharp library, and should
be used for compilation
Homepage: http://www.mono-project.com/GtkSharp
Description-md5: e7432bd7eb91c1c711c14150f81a3556
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 18m
If you want, you can use command-line completion on incomplete package names as arguments to apt-cache show instead of apt-get install. Any command that takes the name of a package (and takes it whether the package is installed or not) is suitable for this purpose.
The Specific Packages You Need
Given the messages that appeared, the -dev packages you need are probably:
libglib2.0-dev Install libglib2.0-dev http://hostmar.co/software-small
(provides both "glib-2.0" and "gio-2.0" headers, see the manifest)
libgdk-pixbuf2.0-dev Install libgdk-pixbuf2.0-dev http://hostmar.co/software-small (provides "gdk-pixbuf-2.0" headers)
libgtk-3-dev Install libgtk-3-dev http://hostmar.co/software-small (provides "gtk+-3.0" headers)
libcanberra-gtk3-dev Install libcanberra-gtk3-dev http://hostmar.co/software-small (provides "libcanberra-gtk3" headers)
libnotify-dev Install libnotify-dev http://hostmar.co/software-small (provides "libnotify" headers)
libx11-dev Install libx11-dev http://hostmar.co/software-small (provides "x11" headers)
You can install these in the Software Center but I recommend the command-line as it's easier for installing multiple packages:
sudo apt-get update && sudo apt-get install libglib2.0-dev libgdk-pixbuf2.0-dev libgtk-3-dev libcanberra-gtk3-dev libnotify-dev libx11-dev

try command in shell as root
$apt-get install glib-2.0 gio-2.0 gdk-pixbuf-2.0 gtk+-3.0 libcanberra-gtk3 libnotify x11 -f -y

Related

Issue installing Tax4Fun

I'm trying to install the package "Tax4Fun" but keep failing.
I've tried 2 different ways:
install.packages("devtools")
devtools::install_url("http://tax4fun.gobics.de/Tax4Fun/Tax4Fun_0.3.1.tar.gz")
library(Tax4Fun)
The error that I get is:
ERROR: dependency 'biom' is not available for package 'Tax4Fun'
I've also tried installing biom directly
BiocManager::install("biom")
which does not work either
Bioconductor version 3.10 (BiocManager 1.30.10), R 3.6.1 (2019-07-05)
Installing package(s) 'biom'
Installation path not writeable, unable to update packages: boot, foreign, KernSmooth,
mgcv, nlme, survival
Warning message:
package ‘biom’ is not available (for R version 3.6.1)
The other way I've tried to install Tax4Fun directly is
BiocManager::install("Tax4Fun")
I get the following error code:
Bioconductor version 3.10 (BiocManager 1.30.10), R 3.6.1 (2019-07-05)
Installing package(s) 'Tax4Fun'
Installation path not writeable, unable to update packages: boot, foreign, KernSmooth,
mgcv, nlme, survival
Warning message:
package ‘Tax4Fun’ is not available (for R version 3.6.1)
Please help :)
You need to install it by downloading the packages from source (http://tax4fun.gobics.de). Then it depends whether you are running on Linux/Mac or Windows.
From the command line, you navigate to the folder containing the .tar.gz downloaded package. Then you should install it using:
R CMD INSTALL Tax4Fun_0.3.1.tar.gz
But dependancies are not installed by default. So you need to install dependancies manually, Qiimer and Biom, which are both deprecated on Cran. You install them using the same command, after you have downloaded the packages from the Cran archives.
Before that, you need to also install their dependancies in R:
install.packages("pheatmap")
install.packages("RJSONIO")
Then you should be able to proceed as mentioned above: install Qiimer and Biom from the command line first. Then Tax4Fun from the command line too.
If you are running on Windows you should have quite the same issues, but the installation of the different packages and dependancies is different. You can have a look at the readme at http://tax4fun.gobics.de

Installing specific versions of pyproj from github

I have been trying to install obspy and have been running into a lot of problems. I want to install obspy which has a dependency on pyproj. But apparently obspy only works with pyproj 1.9.5.1, which I tried installing using pip (pip3 install pyproj==1.9.5.1), but only got the errors like-
_proj.c:7488:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
Digging deeper I found that it might be a Cython problem, and installing pyproj directly from github might help, because it would apparently make Cython recompile all the necessary files. Something along the lines of -
pip3 install git+https://github.com/jswhit/pyproj.git
However this one gives the error -
ERROR: Minimum supported proj version is 6.2.0, installed version is 5.2.0.
I di try installing a higher version of libproj-dev (sudo apt install libproj-dev=6.2.0) however it shows that there is no candidate for 6.2.0. I tried downloading the deb file and installing from that using -
sudo apt-get install ~/Downloads/libproj-dev_6.2.0-1_amd64.deb
which just leads to the error -
The following packages have unmet dependencies:
libproj-dev : Depends: libproj15 (= 6.2.0-1) but it is not installable
E: Unable to correct problems, you have held broken packages.
But I think this is not the right way to install for me anyway, since I need a specific version. Hence I tried installing directly from the tarball of the release -
pip3 install https://github.com/pyproj4/pyproj/archive/v1.9.5.1rel.tar.gz
Which leads to the first error I had, evidently due to Cython.
With errors on everything I tried to do to fix this, I am not sure what even is relevant to my problem now.
Any help is appreciated, and if this site is not the correct place for this question, please help me migrate it to its proper destination.
I am on Ubuntu 18.10.
The problem is, that Cython-generated c-files don't work for Python-3.7 if generated with Cython versions up to 0.27.3 (at least): The setup.py of pyproj (at least in the version 1.9.5.1) doesn't regenerate the_proj.c, which is generated with Cython 0.23.2 and thus the installation cannot succeed.
You have the following options:
stay on Python3.6 where everything works out of the box.
regenerate _proj.c with a current Cython-version.
For the second option:
download and unzip your prefered version from https://github.com/pyproj4/pyproj/releases/tag/v1.9.5.1rel and switch to the created folder pyproj-1.9.5.1rel.
check, that the cython-version is >=0.27.3. via cython --version.
regenerate the _proj.c file via cython -3 _proj.pyx (_proj.pyx looks like Python3-code, but also language_level=2 (i.e. cython -2 _proj.pyx) will probably work.
install running pip install .
pyproj 1.9.5.1 was release at Jan 7, 2016. At that time, the latest version Python was 3.5. In my tests. pyproj 1.9.5.1 failed to be installed on Python 3.7.4, but succeeded on Python 3.5.7.
You need to create a environment with Python 3.5 by pyenv or conda.
References
pyproj 1.9.5.1 release
Python release history

Building Valama IDE on Windows using MSYS2 and MingW

I am using MSYS2 to build Valama [the next generation IDE for Vala].
what the GitHub repository says that some dependencies are required.
and they are provided for Ubuntu using this command
sudo apt-get install build-essential valac-0.24 libvala-0.24-dev cmake pkg-config libgtksourceview-3.0-dev libgee-0.8-dev libxml2-dev libgdl-3-dev libgladeui-dev libclutter-gtk-1.0-dev libwebkit2gtk-3.0-dev intltool gnome-icon-theme-symbolic librsvg2-bin
and I started to download these dependencies using
pacman -S [PACKAGE NAME]
but these packages names are not the same in pacman for mingw as they are in apt-get for ubuntu
so I found that pacman supports searching for packages using this command
pacman -sS [PACKAGE NAME substring]
so after every successful installation I tested cmake .. command as in the GitHub repository
until I get stuck with this dependency
gladeui-2.0
and this what the log of cmake look like :
-- Checking for module 'gee-0.8 >= 0.10.5'
-- Found gee-0.8 , version 0.18.1
-- Update files for GtkSourceView 3.14.3
-- Use enhanced gdl-3.0 vapi to support new features with gdl-3.0 >= 3.9.91.
-- Checking for module 'gladeui-2.0'
-- No package 'gladeui-2.0' found
CMake Error at /usr/share/cmake-3.6.2/Modules/FindPkgConfig.cmake:424 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-3.6.2/Modules/FindPkgConfig.cmake:597 (_pkg_check_modules_internal)
CMakeLists.txt:201 (pkg_check_modules)
-- Configuring incomplete, errors occurred!
See also "/e/valama/build/CMakeFiles/CMakeOutput.log".
See also "/e/valama/build/CMakeFiles/CMakeError.log".
as you can see from the log that [gladeui-2.0] is not found on the MSYS-mingw subsystem, and I failed to find the supported library for it.
what I am asking is what is the command to install the remaining dependencies of valama, or how to build them and install them, including gladeui-2.0.
On the MSYS2 home page there are two GitHub repositories listed for issues with packages. The first is issues for msys2 packages on GitHub and the second is issues for mingw-w64 packages on GitHub. Both of these repositories list packages as sub-directories.
The most interesting are the mingw-w64 packages, which includes mingw-w64-glade and mingw-w64-glade3. So you could try installing either of those. Glade3 is the newer version, but Valarama may be dependent on the older Glade 2.

How to install Net::SSH2 from CPAN on Cygwin

I needed to install Net:SSH2 in a Cygwin environment under Windows 7 (64 bit). As usually I tried to install it with cpanm.
I already had the necessary Cygwin packages (see below) installed but the Perl build failed because it couldn't find the libssh2 library.
There is a special text file BUILDING.WIN32 in the Net::SSH2 package but this is only useful when building the module by hand and it refers mainly to MinGW. So this no help.
This is the log of the build:
Entering Net-SSH2-0.53
Checking configure dependencies from META.yml
Checking if you have ExtUtils::MakeMaker 6.59 ... Yes (7.02)
Running Makefile.PL
Configuring Net-SSH2-0.53 ... Subroutine checklibs redefined at inc/Module/Install/CheckLib.pm line 11.
Subroutine assertlibs redefined at inc/Module/Install/CheckLib.pm line 25.
Subroutine _author_side redefined at inc/Module/Install/CheckLib.pm line 39.
The libssh2 library is required by this module. If you don't have it, you can
download it from http://www.libssh2.org; you may also need OpenSSL, which can
be obtained from http://www.openssl.org , or libgcrypt, which can be obtained
from http://www.gnupg.org .
Debian: sudo aptitude install libssh2-1-dev
OpenSUSE: sudo zypper in libssh2-1 libssh2-devel
You can pass your libssh2 lib and include dirs (and extra link args) on the
command line. E.g.:
perl Makefile.PL lib=$HOME/libssh2/lib inc=$HOME/libssh2/include \
ldargs="-lz"
These can also be set through the LIBSSH2_LIB/LIBSSH2_INCLUDE/LIBSSH2_LDARGS
environment variables.
To build with libgcrypt instead of OpenSSL, pass 'gcrypt' as a parameter to
Makefile.PL, e.g.:
perl Makefile.PL gcrypt
If you want to build on Windows, see the file BUILDING.WIN32 in the
distribution.
Can't link/include C library 'ssh2', aborting.
First install the libssh2-devel package from Cygwin, e.g. with apt-cyg the command line frontend for installing packages from within a cygwin shell.
apt-cyg install libssh2-devel
Then set some environment variables to the right path for getting Net::SSH2 to work with the Cygwin packages:
LIBSSH2_LIB=/usr/lib/ LIBSSH2_INCLUDE=/usr/include/ cpanm -v Net::SSH2
That worked for me. Much easier than what the readme file linked above looked like.

Finding a source package for libsn

I am trying to compile the i3 window manager from source, which requires a header file from libsn (#include ).
I cannot find libsn's source package from anywhere and would like help locating it.
Fourth result from typing "libsn" into Google gives this. It's not a "package", but in order to find a package, we'd have to know what kind of package you need - RPM, DEB, tar.gz, ....
You need to locate a current version of the package: startup-notification-devel
I was trying to build i3 on CentOS 7, which includes startup-notification but not startup-notification-devel. My compilation was successful by using the package from RepoForge for CentOS 6. Exact commands will depend on your distribution, but here are the general steps.
Install RPMforge: http://wiki.centos.org/AdditionalResources/Repositories/RPMForge
Quick reference for CentOS 6/7 x86_64:
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
rpm -i rpmforge-release-0.5.3-1.el6.rf.*.rpm
Install the package:
yum install --enablerepo=rpmforge-extras startup-notification-devel
If you're not using RHEL/CentOS then you may want to download the source:
http://www.freedesktop.org/software/startup-notification/releases
Instructions to compile the libraries are available at the Linux From Scratch project:
http://www.linuxfromscratch.org/blfs/view/svn/x/startup-notification.html

Resources