Package Details: micromamba 2.3.0-1

Git Clone URL: https://aur.archlinux.org/micromamba.git (read-only, click to copy)
Package Base: micromamba
Description: The fast cross-platform package manager
Upstream URL: https://github.com/mamba-org/mamba
Licenses: BSD-3-Clause
Conflicts: micromamba-bin
Provides: libmamba, libmambapy
Submitter: gdolle
Maintainer: carlosal1015 (brianrobt)
Last Packager: carlosal1015
Votes: 8
Popularity: 0.000233
First Submitted: 2021-03-21 15:23 (UTC)
Last Updated: 2025-06-17 04:01 (UTC)

Latest Comments

« First ‹ Previous 1 2 3 Next › Last »

brianrobt commented on 2025-05-29 13:07 (UTC) (edited on 2025-05-29 13:07 (UTC) by brianrobt)

Why does it still say provides=(python-libmambapy) then?

Was in a hurry and forgot to remove it.

Can the fmt incompatibility be fixed? The conda package depends on python-libmambapy.

I think so. On the surface it looks like there were only a few breaking API changes limited to a single file. If I have some time today, I'll do a deeper dive and try to get a working patch.

EDIT: Also, once we get this working, I think it's safe to delete the python-libmamba package.

flying-sheep commented on 2025-05-29 13:02 (UTC) (edited on 2025-05-29 13:03 (UTC) by flying-sheep)

I also had to disable building libmambapy

Why does it still say provides=(python-libmambapy) then?

Can the fmt incompatibility be fixed? The conda package depends on python-libmambapy.

brianrobt commented on 2025-05-27 19:55 (UTC) (edited on 2025-05-28 13:06 (UTC) by brianrobt)

@anlorn, I stand corrected. Looks like patching the CMakeLists.txt file fixed the issue.

EDIT: I also had to disable building libmambapy due to the incompatibility with fmt>=11.x.

PKGBUILD:

# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
# Contributor: Guillaume Dolle  <dev at gdolle.com>
pkgname=micromamba
_pkgname=${pkgname/micro/}
pkgver=2.1.1
pkgrel=2
pkgdesc="The fast cross-platform package manager"
arch=(i686 x86_64)
url="https://github.com/${_pkgname}-org/${_pkgname}"
license=(BSD-3-Clause)
depends=(python fmt libsolv reproc yaml-cpp simdjson)
makedepends=(cli11 spdlog tl-expected nlohmann-json cmake pybind11) # gtest
source=(${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz
    static-off.patch)
sha512sums=('99777c9711af0f36731aa3be9fd89cd730ab1878d4c9485fb0d5d39464ee13e29d6e8a5f4ecb4cbb0149c9a2962d91cb212e9a052536283b46a9e1776ed6899f'
    'SKIP')
provides=("libmamba=${pkgver}" "python-libmambapy=${pkgver}")
conflicts=('micromamba-bin' 'python-libmamba')

prepare() {
  cd ${_pkgname}-${pkgver}
  patch -p0 -i ../../static-off.patch
}

build() {
  cmake \
    -S ${_pkgname}-${pkgver} \
    -B build \
    -DBUILD_SHARED=ON \
    -DCMAKE_BUILD_TYPE=None \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
    -DBUILD_LIBMAMBA=ON \
    -DBUILD_LIBMAMBAPY=OFF \
    -DBUILD_LIBMAMBA_TESTS=OFF \
    -DBUILD_MAMBA_PACKAGE=OFF \
    -DBUILD_MICROMAMBA=ON \
    -DBUILD_STATIC=OFF \
    -Wno-dev
  cmake --build build
}

check() {
  ctest --test-dir build
}

package() {
  DESTDIR="${pkgdir}" cmake --build build --target install
  install -Dm 644 ${_pkgname}-${pkgver}/${pkgname}/LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

static-off.patch:

--- CMakeLists.txt.orig 2025-05-27 19:39:41.831173013 +0000
+++ CMakeLists.txt  2025-05-27 19:40:21.521306004 +0000
@@ -68,7 +68,8 @@

 # micromamba requires static linkage
 if(BUILD_MICROMAMBA)
-    set(BUILD_STATIC ON)
+    set(BUILD_STATIC OFF)
+    set(BUILD_SHARED ON)
 endif()

 # libmamba library and tests

brianrobt commented on 2025-05-27 19:32 (UTC)

I think I already tried to patch that but ran into some errors.

From the documentation, it sounds like -DBUILD_MICROMAMBA is only meant to be built statically. I don't think that trying to force it to use BUILD_SHARED is going to get us anywhere.

In the meantime, I tried setting -DBUILD_MICROMAMBA=OFF and adding -DBUILD_MAMBA=ON.

-DBUILD_MAMBA is meant to be used for compiling micromamba dynamically, so it seems like that might be what we want. There is already a micromamba-bin package for the standalone static version.

With that being said, I ran into more issues with libmambapy and its fmt dependency. libmambapy is expecting v10.1.1 (I think), but fmt is v11.2.0.

I spent a couple of hours trying to get a working patch, but to no avail.

I'll try some additional build flag combos to see if we can get a working version, but eventually the micromamba upstream is going to need to update libmambapy to use fmt v11.0.0 at the very least.

anlorn commented on 2025-05-27 02:35 (UTC)

Looks like mamba cmake enforces static compiling when build as micromamba


if(BUILD_MICROMAMBA)
    set(BUILD_STATIC ON)
endif()

brianrobt commented on 2025-05-21 13:42 (UTC) (edited on 2025-05-21 13:46 (UTC) by brianrobt)

Trying to build this, I get the following error:

CMake Error at cmake/Checks.cmake:9 (message):
  Expected type "STATIC_LIBRARY" for target "yaml-cpp::yaml-cpp" but found
  "SHARED_LIBRARY"
Call Stack (most recent call first):
  libmamba/CMakeLists.txt:469 (mamba_target_check_type)
  libmamba/CMakeLists.txt:706 (libmamba_create_target)


-- Configuring incomplete, errors occurred!
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: micromamba-exit status 4
 -> Failed to install the following packages. Manual intervention is required:

I've tried several patches to get around the "STATIC_LIBRARY" error, installing static versions of yaml-cpp, reproc, and reproc++, and building with a different combination of flags--all to no avail.

AFAICT, no changes have been made to yaml-cpp since this package was last published.

It seems like -DBUILD_SHARED=ON and -DBUILD_STATIC=OFF aren't being respected.

I'm not sure what to do at this point or if anyone else has run into the same error.

xZTtV2 commented on 2025-04-18 17:25 (UTC) (edited on 2025-04-18 17:25 (UTC) by xZTtV2)

==> Сборка пакета micromamba 2.1.0-1 (Пт 18 апр 2025 17:15:37)
==> Проверка зависимостей для запуска...
==> Проверка зависимостей для сборки...
==> Получение исходных файлов...
  -> Найден micromamba-2.1.0.tar.gz
==> Проверка файлов source с использованием sha512sums...
    micromamba-2.1.0.tar.gz ... Готово
==> Удаление директории '$srcdir/'...
==> Распаковка исходных файлов...
  -> Распаковка 'micromamba-2.1.0.tar.gz' с помощью bsdtar
==> Исходные файлы готовы.
==> Сборка пакета micromamba 2.1.0-1 (Пт 18 апр 2025 17:15:38)
==> Проверка зависимостей для запуска...
==> Проверка зависимостей для сборки...
==> ВНИМАНИЕ: Использование существующего дерева исходных файлов в '$srcdir/'
==> Удаление директории '$pkgdir/'...
==> Запускается build()...
-- The C compiler identification is GNU 14.2.1
-- The CXX compiler identification is GNU 14.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building libmamba v2.1.0
-- libmamba binary version: v3.0.0
-- Found Python3: /usr/bin/python3.13 (found version "3.13.2") found components: Interpreter
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found nlohmann_json: /usr/share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake (found version "3.12.0")
-- Found PkgConfig: /usr/bin/pkg-config (found version "2.4.3")
-- Found Libsolv: /usr/include (found version "0.7.31")
-- Skipping LTO for target libmamba::solv-cpp, the build type is not a release
-- Adding shared libmamba target
-- Skipping LTO for target libmamba::libmamba-dyn, the build type is not a release
   -> Dynamically linking against libmamba (shared) dependencies
-- Found CURL: /usr/lib/libcurl.so (found version "8.13.0")
-- Found LibArchive: /usr/lib/libarchive.so (found version "3.7.9")
-- Found BZip2: /usr/lib/libbz2.so (found version "1.0.8")
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
-- Found OpenSSL: /usr/lib/libcrypto.so (found version "3.5.0")
-- Adding static libmamba target
-- Skipping LTO for target libmamba::libmamba-static, the build type is not a release
   -> Statically linking against libmamba (static) dependencies
CMake Error at cmake/Checks.cmake:9 (message):
  Expected type "STATIC_LIBRARY" for target "yaml-cpp::yaml-cpp" but found
  "SHARED_LIBRARY"
Call Stack (most recent call first):
  libmamba/CMakeLists.txt:469 (mamba_target_check_type)
  libmamba/CMakeLists.txt:706 (libmamba_create_target)


-- Configuring incomplete, errors occurred!
==> ОШИБКА: Произошел сбой в build().
    Прерывание...
 -> Failed to install layer, rolling up to next layer.error:error making: micromamba - exit status 4

pacman -Ss yaml-cpp

extra/yaml-cpp 0.8.0-2 [installed]
    YAML parser and emitter in C++, written around the YAML 1.2 spec

carlosal1015 commented on 2025-03-18 19:36 (UTC)

If someone Arch Linux User found a solution, please share here.

flying-sheep commented on 2024-10-23 19:19 (UTC) (edited on 2024-10-23 19:32 (UTC) by flying-sheep)

OK, thanks to henriii, we got it!

pkgname=micromamba
pkgver=2.0.0
_srcver=2024.09.25 
_name=mamba-$_srcver
pkgrel=1
pkgdesc="The fast cross-platform package manager"
arch=('x86_64')
url="https://github.com/mamba-org/mamba"
license=('BSD-3-Clause')
depends=(
  'fmt'
  'libsolv'
  'python>=3.9'
  'reproc'
  'yaml-cpp>=0.8.0'
  'simdjson'
)
makedepends=(
  # header-only libs
  'cli11'
  'spdlog'
  'tl-expected'
  'nlohmann-json'
  # C++ build tools
  'ccache'
  'python-cmake>=3.18'
  'doctest'
  'python-ninja'
  'pybind11'
  # python build tools
  'python-build'
  'python-installer'
  'python-scikit-build>=0.13'
  'python-setuptools>=42'
  'python-wheel'
)
provides=("libmamba=$pkgver" "python-libmambapy=$pkgver")
replaces=('python-libmamba')
conflicts=('python-libmamba')
#options=(!emptydirs)
#backup=(etc/conda/condarc)
source=("$_name-$pkgver.tar.gz::$url/archive/refs/tags/$_srcver.tar.gz")
sha512sums=('6b3e64255f8aa63723dd08f578f79195b46249a02002b6d0d77713fd181f0557e3b6044075a823e639b0240b07b4e17dd0c9c17790c9152a68992e3ca9a599fa')

build() {
  cd "$srcdir/$_name"

  cmake -S. -Bbuild \
    -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
    -DBUILD_LIBMAMBA=ON \
    -DBUILD_LIBMAMBAPY=ON \
    -DBUILD_MICROMAMBA=ON \
    -DBUILD_MAMBA_PACKAGE=ON \
    -DBUILD_SHARED=ON
  cmake --build build --parallel 8
  cmake --install build --prefix install

  cd libmambapy
  export SKBUILD_CONFIGURE_OPTIONS="\
      -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
      -DBUILD_LIBMAMBA=ON \
      -DBUILD_LIBMAMBAPY=ON \
      -DBUILD_MICROMAMBA=ON \
      -DBUILD_MAMBA_PACKAGE=ON \
      -Dlibmamba_ROOT=$PWD/../install"
  python -m build -x --wheel --no-isolation
}

package() {
  cd "$srcdir/$_name"
  cmake --install build/ --prefix "$pkgdir/usr"

  cd "$srcdir/$_name/libmambapy"
  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm 644 LICENSE $pkgdir/usr/share/licenses/${pkgname}/LICENSE.txt
}

flying-sheep commented on 2024-09-28 09:09 (UTC) (edited on 2024-09-28 09:49 (UTC) by flying-sheep)

OK, it also has some more build dependencies: python-cmake and python-ninja

python-ninja exists, and I packaged https://aur.archlinux.org/packages/python-cmake-bin for that reason. We might want to change it so it uses system cmake!

Once you updated this package to build and to have provides=(... python-libmamba) I can retire https://aur.archlinux.org/packages/python-libmamba

I think I’m almost at a point where I’m getting this to build. Only problem is that 2.0 calls cmake on its own, and I’m unsure how to deal with it. I asked the scikit-build people for help, let’s see.