You are not logged in.
Pages: 1
Hello,
I would like to install FLINT package with an extra package : MPIR. I should edit PKGBUILD to do so during the installation phase. My problem is the following, flint is already installed as a dependency of many packages (some of them are quite big, e.g. sagemath). Have I to uninstall all these packages? It does not seem a good way to do to me. Is there another way to proceed?
When I try to install it with yaourt, it does not propose to edit PKGBUILD file. For this reason, I ask you for some help.
Have a nice day.
Offline
I'm not sure what you're trying to do, but you can just compile mpir with the --enable-gmpcompat flag and replace gmp with it. It's not a good idea to have both gmp and mpir installed simultaneously, since some programs may link to both and crash due to symbol conflicts
Offline
Not a Pacman issue, moving to Creating Packages...
Offline
I'm not sure what you're trying to do, but you can just compile mpir with the --enable-gmpcompat flag and replace gmp with it. It's not a good idea to have both gmp and mpir installed simultaneously, since some programs may link to both and crash due to symbol conflicts
I already compiled mpir with this flag. The problem is the next step. I dont know how to replace gmp with mpir by using yaourt or pacman. I would like to edit PKGBUILD and specify where MPIR is on my system. For AUR package, the system propose to edit PKGBUILD. For FLINT, it is not the case as the package is contained in [Community]. I wonder if it is possible with yaourt/pacman or if I need to install FLINT manually to use it with MPIR.
Last edited by fyloukira (2015-10-22 20:19:04)
Offline
Add conflicts=(gmp) and provides=(gmp) to the mpir PKGBUILD and install it with pacman. You don't have to rebuild flint, the package from community should work fine.
Offline
I can believe you but I dont really understand why it should work.
If we look to FLINT's PKGBUILD, we have:
build() {
cd $pkgname-$pkgver
./configure --prefix=/usr --with-gmp=/usr --with-mpfr=/usr --with-ntl=/usr
make
}
According to FLINT's doc, I should replace "--with-gmp" by "--with-mpir"
Offline
In that case, create a new package for your flint version, let's call it flint-mpir .
copy flint PKGBUILD to a flint-mpir folder in your home .
edit the pkgbuild :
change the $pkgname to flint-mpir
add lines so your new packge provides & replaces & conflicts flint .
run makepkg, solve any errors.
once ready , install your flint-mpir pacakge with pacman -U.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
OK this is great, thanks.
If I compile MPIR with the right flag (--enable-gmpcompat) and also with conflicts=(gmp) and provides=(gmp), it proposes to remove gmp.
GMP is a dependancy of several packages (e.g sagemath).
1) Is it mandatory to remove all of them to build MPIR?
2) I'd like to compare GMP and MPIR. It's not possible to have them simultnaeously in a clean way?
Offline
1) Is it mandatory to remove all of them to build MPIR?
No: that's exactly what the "provides" line is for. MPIR is a drop-in replacement for GMP
2) I'd like to compare GMP and MPIR. It's not possible to have them simultnaeously in a clean way?
It is possible if you don't use --enable-gmpcompat, but as I said not a good idea: You may end up with some binaries linking to both, which will break them. For instance, if you compile Flint against MPIR as you seem to want to do, you will break Sagemath unless you recompile it and all its dependencies against MPIR too.
Offline
fyloukira wrote:1) Is it mandatory to remove all of them to build MPIR?
No: that's exactly what the "provides" line is for. MPIR is a drop-in replacement for GMP
OK but in practice, I try to build MPIR with provides and conflict as indicated and the system asks me to remove gmp. And if I say yes, it cant remove because of all the dependencies.
Offline
OK but in practice, I try to build MPIR with provides and conflict as indicated and the system asks me to remove gmp. And if I say yes, it cant remove because of all the dependencies.
Please post the full output of the command you use to install mpir and the modified PKGBUILD
Offline
# Maintainer: Joe Neeman <joeneeman@gmail.com>
# Contributor: Rémy Oudompheng <oudomphe@clipper.ens.fr>
# Contributor: Alessandro "jakedust" Andrioni <jakedust@gmail.com>
pkgname=mpir
pkgver=2.7.0
pkgrel=1
pkgdesc="Library for multiple precision integers and rationals"
arch=('i686' 'x86_64')
url="http://www.mpir.org/"
license=('LGPL')
depends=('gcc-libs')
source=(http://www.mpir.org/mpir-$pkgver.tar.lz)
md5sums=('b1d6cd2c6ab8693bb71148c638a07bc7')
install=mpir.install
conflicts=(gmp)
provides=(gmp)
build() {
cd "$srcdir/mpir-$pkgver"
[[ "$CARCH" == "i686" ]] && export ABI=32
./configure --prefix=/usr --enable-cxx --enable-gmpcompat
make
}
check() {
cd "$srcdir/mpir-$pkgver"
make check
}
package() {
cd "$srcdir/mpir-$pkgver"
make DESTDIR="$pkgdir" install
}
MPIR package is built then I get :
==> Création finie : mpir 2.7.0-1 (lun. oct. 26 08:30:52 CET 2015)
==> Installer mpir ? [O/n]
==> [A]fficher le contenu du paquet [V]érifier avec namcap
==> ------------------------------------------------------
==>
Mot de passe [sudo] de fyloukira :
chargement des paquets...
résolution des dépendances...
recherche des conflits entre paquets...
:: mpir et gmp sont en conflit. Supprimer gmp ? [o/N] o
erreur: la préparation de la transaction a échoué (la satisfaction des dépendances a échoué)
:: mpfr : requiert gmp>=5.0
Offline
Ah, those stupid versioned dependencies. Use provides=('gmp=6')
Offline
Then, I get:
==> Installer mpir ? [O/n]
==> [A]fficher le contenu du paquet [V]érifier avec namcap
==> ------------------------------------------------------
==>
Mot de passe [sudo] de fyloukira :
chargement des paquets...
résolution des dépendances...
recherche des conflits entre paquets...
Paquets (1) mpir-2.7.0-1
Taille totale installée : 1,54 MiB
:: Procéder à l’installation ? [O/n]
(1/1) vérification des clés dans le trousseau [##########################################] 100%
(1/1) vérification de l’intégrité des paquets [##########################################] 100%
(1/1) chargement des fichiers des paquets [##########################################] 100%
(1/1) analyse des conflits entre fichiers [##########################################] 100%
erreur: la validation de la transaction a échoué (conflit de fichiers)
mpir: /usr/include/gmp.h est déjà présent dans le système de fichiers
mpir: /usr/include/gmpxx.h est déjà présent dans le système de fichiers
mpir: /usr/lib/libgmp.so est déjà présent dans le système de fichiers
mpir: /usr/lib/libgmpxx.so est déjà présent dans le système de fichiers
Des erreurs se sont produites, aucun paquet n’a été mis à jour.
Offline
Did you remove the conflicts?
Offline
For non-English locale users: Please prepend LC_ALL=C to posted commands so that the output will be in English.
Please change the pkgname from mpir to something like mpir-gpm , so we can distinguish between stock mpir and your version.
Also please post the exact command you use to build/install and it's FULL output.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
I kept the line conflicts=('gmp=6') in PKGBUILD.
GMP is already installed and the system warns me there are GMP dependencies thus I cant remove directly GMP.
Offline
I kept the line conflicts=('gmp=6') in PKGBUILD.
Wrong, 'gmp=6' should be only in provides, not in conflicts.
conflicts=(gmp)
provides=('gmp=6')
Offline
This works fine. Thanks to everybody and sorry for last misreading. :-)
Offline
Pages: 1