You are not logged in.

#1 2019-10-18 13:45:34

vorlket
Member
Registered: 2017-09-30
Posts: 86

[SOLVED] mlpack installation issue

While pacman -U mlpack-3.2.1-1-x86_64.pkg.tar.xz, received the following message:

error: failed to commit transactions (conflicting files)
mlpack: /use/bin/cygdb exists in filesystem (owned by cython)
...
Errors occured, no packages were upgraded.

What should I do?

Last edited by vorlket (2019-10-19 08:44:37)

Offline

#2 2019-10-18 13:56:03

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 4,645

Re: [SOLVED] mlpack installation issue

Moving to AUR issues.


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.

Offline

#3 2019-10-18 17:40:20

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: [SOLVED] mlpack installation issue

Does the following PKGBUILD work for you?

# Maintainer: Roberto Hueso < robertohueso96 at gmail dot com >
# Former Maintainer: jerry73204 <jerry73204@gmail.com>
# Former Maintainer: Govind Gopakumar < govind.93 at gmail dot com>
# Former Maintainer: Daniel Wallace <danielwallace at gtmanfred dot com>
pkgname=mlpack
pkgver=3.2.1
pkgrel=1
pkgdesc='a scalable c++ machine learning library'
arch=('x86_64')
url="http://www.mlpack.org"
license=('BSD')
depends=(
  'armadillo'
  'boost>=1.49'
  'lapack'
  'libxml2>=2.6.0'
  'cython>=0.24'
  'python-numpy'
  'python-pandas>=0.15.0'
)

optdepends=(
  'openmp: parallel computation support'
)

makedepends=(
  'cmake>=3.3.2'
  'txt2man'
  'python-setuptools'
  'python-pytest-runner'
)
source=("http://www.mlpack.org/files/${pkgname}-${pkgver}.tar.gz")
sha256sums=('3fa25157a0a6e91fd5ba223ebd911e5d86c0664d969ea3f7768d823448562f36')
options=(!emptydirs)

prepare() {
  cd $pkgname-$pkgver
  mkdir -p build
}

build() {
  cd ${pkgname}-${pkgver}/build

  cmake \
      -D CMAKE_INSTALL_PREFIX="/usr" \
      -D BUILD_PYTHON_BINDINGS=ON \
      -D BUILD_TESTS=OFF \
      -D USE_OPENMP=ON \
      ..
  make
}

# check() {
#   # Comment out check() if there are failed tests. If you consider it a bug,
#   # please file an issue on upstream instead of AUR.

#   cd "${srcdir}/${pkgname}-${pkgver}"

#   make mlpack_test
#   bin/mlpack_test
# }

package() {
  cd $pkgname-$pkgver/build

  make DESTDIR="$pkgdir" install

  install -m 755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
  install -m 644 ../LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}"

#  rm -rf ${pkgdir}/usr/lib/python3.6/site-packages/{site.py,__pycache__,easy-install.pth}
}

diff of changes

diff --git a/PKGBUILD b/PKGBUILD
index 77cf38a..f70634f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -31,16 +31,22 @@ makedepends=(
 )
 source=("http://www.mlpack.org/files/${pkgname}-${pkgver}.tar.gz")
 sha256sums=('3fa25157a0a6e91fd5ba223ebd911e5d86c0664d969ea3f7768d823448562f36')
+options=(!emptydirs)
+
+prepare() {
+  cd $pkgname-$pkgver
+  mkdir -p build
+}
 
 build() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
+  cd ${pkgname}-${pkgver}/build
 
   cmake \
-      -D CMAKE_INSTALL_PREFIX="${pkgdir}/usr" \
+      -D CMAKE_INSTALL_PREFIX="/usr" \
       -D BUILD_PYTHON_BINDINGS=ON \
       -D BUILD_TESTS=OFF \
       -D USE_OPENMP=ON \
-      .
+      ..
   make
 }
 
@@ -55,12 +61,12 @@ build() {
 # }
 
 package() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
+  cd $pkgname-$pkgver/build
 
-  make install
+  make DESTDIR="$pkgdir" install
 
   install -m 755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
-  install -m 644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -m 644 ../LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}"
 
-  rm -rf ${pkgdir}/usr/lib/python3.6/site-packages/{site.py,__pycache__,easy-install.pth}
+#  rm -rf ${pkgdir}/usr/lib/python3.6/site-packages/{site.py,__pycache__,easy-install.pth}
 }

Explanation of changes:
Removing  $pkgdir from  CMAKE_INSTALL_PREFIX and instead using make DESTDIR="$pkgdir" appears to resolve the issue.
Switched to out of tree build.  Added emptirdirs option to remove emptry tree rooted at $pkgdir/$basedir created by stb.
Commented out rm -rf use in package as python is now 3.7 and its purpose is not clear to me.

Offline

#4 2019-10-19 01:23:16

vorlket
Member
Registered: 2017-09-30
Posts: 86

Re: [SOLVED] mlpack installation issue

Yep, it works.

Offline

#5 2019-10-19 07:57:40

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: [SOLVED] mlpack installation issue

Please post a comment on https://aur.archlinux.org/packages/mlpack/ providing the solution or linking to this thread.

Offline

#6 2019-10-19 08:16:32

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,783
Website

Re: [SOLVED] mlpack installation issue

And mark your thread as solved.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#7 2019-10-19 08:48:27

vorlket
Member
Registered: 2017-09-30
Posts: 86

Re: [SOLVED] mlpack installation issue

I am not registered to be able to comment on https://aur.archlinux.org/packages/mlpack/.

Offline

#8 2019-10-19 18:11:59

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,866

Re: [SOLVED] mlpack installation issue

Posted the link on that aur page.


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

#9 2019-10-19 18:44:38

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: [SOLVED] mlpack installation issue

Lone_Wolf wrote:

Posted the link on that aur page.

Thank You.

Offline

Board footer

Powered by FluxBB