2

I'm learning how to create conda packages, and I am having trouble with a package that will work locally, but that when downloaded from anaconda into a different server will return an error:

/lib64/libm.so.6: version `GLIBC_2.29' not found

The meta.yaml looks like the following:

package:
  name: app
  version: 2.4

source:
  git_url: https://gitlab.com/user/repo.git
  git_tag: v2.4

requirements:
  build:
  host:
  run:

about:
  home: https://gitlab.com/user/repo
  license: GPL-3
  license_family: GPL
  summary: blabla.

The app is build with a simple build.sh script:

#!/bin/bash

set -x
echo $(pwd)
make

BIN=$PREFIX/bin
mkdir -p $BIN
cp app $BIN

I assumed that build: glibc >= 2.29 under requirements would make the job, but that results in an error when running conda build ..

How can I include GLIBC in the package? is that something meant to be done manually? from the package version I can download from anaconda, I can see other packages are downloaded as well (e.g. libgcc-ng) that I did not really mention in the meta.yaml or anywhere.

elcortegano
  • 2,444
  • 11
  • 40
  • 58
  • 1
    I'm not clear on the details, but it seems GLIBC dependencies come from the build system. That is, the error indicates that the package was compiled on a system that was using a GLIBC v2.29, but that the system you try to run on is older. So, the resolution is either rebuild on an older image or update your deployment system. Alternatively, I think Conda Forge provides distributable sysroots, which you can build against (see [docs](https://conda-forge.org/docs/maintainer/infrastructure.html?highlight=glibc#centos-sysroot-for-linux-platforms)). – merv Nov 19 '21 at 00:19
  • Also, maybe ensure that the build is linking to Conda-supplied libraries and not just system libs. The fact that you have no requirements listed in **meta.yaml** is rather strange. – merv Nov 19 '21 at 00:24

1 Answers1

2

How can I include GLIBC in the package?

You can't, for reasons explained here.

Your best bet is to build on a system (or in a docker container) which has the lowest version of GLIBC you need to support (i.e. the version installed on the server(s) you will be running your package on).

Employed Russian
  • 199,314
  • 34
  • 295
  • 362