Building Vim .debs on Ubuntu - vim

From the vim site:
sudo apt-get install mercurial libssl-dev
sudo apt-get build-dep vim
hg clone http://hg.debian.org/hg/pkg-vim/vim
cd vim
hg checkout unstable
debian/rules update-orig
dpkg-buildpackage -i -I
cd ..
It looks like there are no commands called debian/rules on my system.

The wikia vim tips site is not complete and ignores all the hard work of packagers of vim. The standard way to build a Debian or Ubuntu binary package is from a source package. Using source packages are by far a better solution for most people.
pkg_basics.en.html#s-sourcebuild
The upstream site https://code.google.com/p/vim/ is indeed hosted with mercurial and there is a github clone https://github.com/b4winckler/vim however very few people really need the most bleeding edge sources. The build-deps are pretty significant.
The Debian vim maintainers also use mercurial to maintain their packaging per debian/README.source at http://hg.debian.org/hg/pkg-vim/vim and Debian developers with commit access can help with the packaging that uses quilt to maintain patches at the URL ssh://hg.debian.org/hg/pkg-vim/vim Information about the Debian binary packages created from hg.debian.org (also used as a base for Ubuntu) can be found: http://packages.debian.org/search?keywords=vim
For Ubuntu a much better way is using a PPA (personal package archive) of someone that is familiar with the 7.4 sources, how packaging works, the latest patches and the latest dependencies. Very recently (Aug 2013) vim 7.4 landed in the future Ubuntu 13.10 Saucy archive available for everyone to install using standard methods so no effort is needed at all. https://launchpad.net/ubuntu/+source/vim Quite a few PPAs contain vim builds already. https://launchpad.net/ubuntu/+ppas?name_filter=vim but there are not many current 7.4 builds backported all the way to Ubuntu 12.04 LTS Precise yet as described https://help.ubuntu.com/community/UbuntuBackports and https://wiki.ubuntu.com/StableReleaseUpdates. As described in the following bug I tried to build it for Ubuntu 12.04 LTS precise since that is what I use on my main machine. With a three line patch I got it working. I haven't put it up in a PPA yet. The bug formally requests the backport so if you care about this please vote it up and/or comment on it so the bug will get more attention. https://bugs.launchpad.net/bugs/1211971
If you find a PPA you like, for example like this one https://launchpad.net/~cjohnston/+ppa-packages you can add it by typing "sudo apt-add-repository ppa:cjohnston/ppa; sudo apt-get update; sudo apt-get upgrade".

Related

Linux Installation libX11-devel

I am trying to build QT4 (porting from Redhat 5 to 7 with an upgraded gcc compiler) in RedHat 7 and I was getting an error saying X11/Xlib.h can't be found. Anyways, after doing some research most people said to install libX11-devel to get those x11 libraries. Since I am using an offline machine I can't do "apt-get" type commands and have to manually install RPMs. So, I went to my RH-7 installation DVD and got "libX11-devel-1.6.3-3.el7.x86-64" (I have 64 bit OS) and tried to install using "yum install libX11-devel-1.6.3-3.el7.x86_64" and I am getting dependencies errors. It's saying
...Requires: pkgconfig(kbproto)
...Required: pkgconfig(xcb)
...Requires: pkgconfig(xproto)
...Requires: pkgconfig(xcb) >= 1.1.92
So, here are my questions.
1) when it says "pkgconfig(kbproto)", is it saying find the "kbproto....RPM" and do a "yum install". In my dvd I only have "xorg-x11-proto-devel-7.7.13.el7.noarch.rpm". Do I have to somehow find "xorg-x11-proto......x86_64.rpm" since it's a 64 bit machine?
2) Is there a difference between "yum install" and pkgconfig "install"? Are there any other installation variants in Linux?
3)For an offline machine, Is there anyway I can get all the dependencies and install everything at once ?
4) Why is it saying "xcb" requires twice. If I just get a xcb...rpm version above 1.1.92 can I just install it once?
Before actually answering the questions, I am going to suggest to see if you can get the latest version of the packages. The packages on the installation DVD may be really out of date and contain known vulernabilities, and other bugs. Can you use yumdownloader - in an online environment - to download the latest version onto a separate DVD and use that as the installation source? See https://access.redhat.com/solutions/10154 for more information.
To answer the questions themselves:
Requires: foo can refer to a package foo or a "feature" foo. pkgconfig(kbproto) is a "feature" (or virtual requires). You can use yum/rpm to see what provides this. On my Fedora box, for example, rpm -q --provides xorg-x11-proto-devel shows that this package indeed provides pkgconfig(kbproto).
As for x86_64 vs noarch, it doesn't matter. noarch packages work everywhere. Other packages are restricted to the platform. So x86_64 only works on intel/amd x86 64-bit machines. Installing noarch should be fine in your case. If you only had a i686 package, though, that wouldn't be sufficient. You would have to find a x86_64 or noarch package.
Yes, there's a big difference between yum and pkg-config. They do completely different things. One is a system tool for installing RPM packages. The other is a tool for developers for using the right headers and compiler flags. If your concern is finding/installing RPMs, do not use pkg-config directly.
Do you have access to an online machine that can access the RHEL 7 yum repositories? On that machine, do something like this:
mkdir rhel7-packages
cd rhel7-packages
yum provides '*/X11/Xlib.h' # make a note of the package that provides this file. it's libX11-devel on Fedora here
yumdownloader --resolve libX11-devel # download libX11-devel and all dependencies not installed on the system
Then copy/install the RPMs on the machine without internet access.
It's probably printing out xcb twice because it's two different requirements. The unversioned requirement will be satisfied if you install any verison of xcb. The versioned requirement will only be satisfied if you install 1.1.92. If you install 1.1.92, it will satisified both the requirements.
1.
You have to resolve the dependency on the system where you are building your package. This means you need to have those dependencies installed, inclusing libX11-devel. To do that, download the RPMs manually from EL7 repos to local disk and run this:
$ mkdir -p /tmp/libX11_dep_rpms && cd /tmp/libX11_dep_rpms
# Download all dependencies from here. All your packages should be available here:
# http://mirror.centos.org/centos-7/7/os/x86_64/Packages/
# Then install
$ yum localinstall *.rpm
# After this you should be able to build your qt4 package, provided all dependencies are resolved. Otherwise, repeat the procedure for all dependencies
# If you can't download packages, then you need to create a FULL DVD ISO that will contain all packages.
2.
pkgconfig ensures that a requirement is coming from a particular build that provides a particular version of the library. Here are some detail.
3.
Get the Everything ISO from EL7.
4.
This has to do with the pkgconfig and library versions.

How to install smlnj in arch linux?

Earlier I was in Ubuntu & it was easy to install smlnj using
apt-get install smlnj
but now I shifted to Arch & I'm finding it difficult to install smlnj.
I tried to find smlnj package through yaourt but I didn't found any.
Then I tried to install it by steps given in official site by downloading tar file. I followed given steps and extracted tar file in /usr/local/sml & then compiled by running command
config/install.sh.
After doing all this I tried to run sml but was not successful. I tried setting environment variable but again was not successful.
Please tell me whether I'm missing any steps or doing it wrong way. What is correct way to install smlnj in Arch Linux?
Update: As Alexander (xyproto) points out, pacman -S smlnj should work again now that SML/NJ is in the [multilib] repository. The solution below would still work, but credit for making installation more convenient should go to him. :-)
Before: It seems that the package became unavailable for x86_64 in Feb 2017, but it doesn't look like it should have happened. I've asked Alexander who maintains the package in [community].
The AUR doesn't contain an smlnj package because it's against AUR policy to overlap with official packages, unless the AUR package is compiled with some tweak that is clearly visible in the package name.
You can still build an Arch package and install that by finding the PKGBUILD and accompanying files at: https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/smlnj (or by cloning the git repo below with those four files in it):
~ $ git clone https://github.com/sshine/smlnj-arch.git
~ $ cd smlnj-arch
~/smlnj-arch $ makepkg
~/smlnj-arch $ sudo pacman -U smlnj-110.80-3-x86_64.pkg.tar.xz

How to install CLISP in Redhat Linux

I was searching, how to install CLISP (http://www.clisp.org) in RedHat Linux. In the CLISP web site Fedora installation link is broken.
yum install clisp doesn't work even though sudo apt-get install clisp in Ubuntu.
Anyone there, installed CLISP in RedHat Linux?
If you just want a CL-implementation you can use sbcl which will run standard CL-code as good as clisp.
If you want clisp download the tarball and follow the instructions in ihe INSTALL file.
There is a thread in the CentOS forums about a yum installation alternative, but it might not work on recent releases.
I just installed it on Fedora 18. Repo:
http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/18/Everything/x86_64/os/Packages/c/
It has been moved to 'archives.fedoraproject.org' because it's old. So if you have an old fedora you might have to add this repo to your yum repos.
You can build from source, I just wanted to learn a little bit about lisp and this allowed me to get setup and get started:
You can find releases here: ftp://ftp.gnu.org/pub/gnu/clisp/release/
wget ftp://ftp.gnu.org/pub/gnu/clisp/release/2.49/clisp-2.49.tar.gz
tar xvfz clisp-2.49.tar.gz
cd clisp-2.49
./configure --prefix=$HOME --ignore-absence-of-libsigsegv
cd ./src
make install

how to update make 3.81 linux

I am new to Linux (new as in installed it yesterday), I need it for my programming course in the university and I've been told to install specific versions of specific programs, but though I've used apt-get install to install them (having previously done apt-get update) they aren't in the correct version.
The programs that I need are make 4.0 and valgrind 3.10.1.
apt-get installs make 3.81 and valgrind 3.10.0.SVN.
I have tried typing "apt-get install make4.0" and "apt-get install valgrind10.3.1" to no avail. I have downloaded them from the internet and followed what instructions I could understand to install the newer versions but it keeps saying that I have the older ones. (I'm not sure if I can post direct links here, if I can let me know and I'll post where I got them from).
What have I been doing wrong? How can I fix this?
I am currently running Linux Mint.
Thanks for any answer in advance.
Due to a long-standing unresolved Debian bug report, GNU Make remained the age-old 3.81 in Debian for a very long time, and as a consequence, in Debian-based distributions such as Ubuntu and Mint.
The latest Debian release, Jessie, has upgraded to 4.0, so Debian-based distributions will have that upgrade. However, it is better to use 4.1.
This has been discussed many times on the GNU Make mailing list and elsewhere.
So to get a newer version, you must compile it from scratch.
This is easy:
Install the required packages (gcc, make and such).
Open up a shell (if you're using the GUI, a terminal window).
Type the following commands (or something equivalent, e.g. you can use curl instead of wget):
cd /tmp
wget http://ftp.gnu.org/gnu/make/make-4.1.tar.gz
tar xvf make-4.1.tar.gz
cd make-4.1/
./configure
make
sudo make install
cd ..
rm -rf make-4.1.tar.gz make-4.1
Now, make 4.1 is in /usr/local/bin/make.
You can verify it is there with whereis make.
You can make it your default make by prefixing /usr/local/bin to your $PATH variable in your shell startup file; for instance, in .profile or .bashrc if you use the bash shell.
Don't try to install a self-compiled make (or anything else that doesn't come from the distribution's package manager) into /bin or /usr/bin; doing that will confuse your package manager.

Installing Mercurial on Redhat Linux

Will Mercurial work on Redhat Linux? I tried, yum install mercurial, with no success. I tried downloading a tar ball from Mercurial site but it failed when I tried to install. Does Mercurial work at all on Redhat?
Here's instructions for obtaining RPM packages for Linux systems.
Here is a discussion describing many methods for obtaining Mercurial in Red Hat.
On Rhel 7.2 i performed below command and it worked like charm :)
sudo rpm -ivh https://www.mercurial-scm.org/release/centos7/RPMS/x86_64/mercurial-3.4-0.x86_64.rpm
Mercurial project provides RPM packages starting from version 3.4.

Resources