Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syscall.h does not include SYS_getrandom #86

Closed
1 task done
zmbc opened this issue Jan 28, 2025 · 5 comments
Closed
1 task done

syscall.h does not include SYS_getrandom #86

zmbc opened this issue Jan 28, 2025 · 5 comments
Labels
question Further information is requested

Comments

@zmbc
Copy link

zmbc commented Jan 28, 2025

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

I'm trying to build DuckDB (a C++ project) using a conda environment. It fails with an error about SYS_getrandom not being defined. I believe it should be defined in syscall.h, and I'm not sure why it isn't here.

See duckdb/duckdb#15967

Installed packages

# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
binutils                  2.40                 hdd6e379_0    conda-forge
binutils_impl_linux-64    2.40                 hf600244_0    conda-forge
binutils_linux-64         2.40                 hdade7a5_3    conda-forge
black                     24.4.2                   pypi_0    pypi
bzip2                     1.0.8                hd590300_5    conda-forge
c-ares                    1.28.1               hd590300_0    conda-forge
c-compiler                1.7.0                hd590300_0    conda-forge
ca-certificates           2024.2.2             hbcca054_0    conda-forge
clang-format              11.0.1                   pypi_0    pypi
click                     8.1.7                    pypi_0    pypi
cmake                     3.29.2               hcfe8598_0    conda-forge
cmake-format              0.6.13                   pypi_0    pypi
cmakelang                 0.6.13                   pypi_0    pypi
cxx-compiler              1.7.0                h00ab1b0_0    conda-forge
gcc                       12.3.0               h95e488c_3    conda-forge
gcc_impl_linux-64         12.3.0               he2b93b0_5    conda-forge
gcc_linux-64              12.3.0               h6477408_3    conda-forge
gxx                       12.3.0               h95e488c_3    conda-forge
gxx_impl_linux-64         12.3.0               he2b93b0_5    conda-forge
gxx_linux-64              12.3.0               h4a1b8e8_3    conda-forge
kernel-headers_linux-64   2.6.32              he073ed8_17    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
krb5                      1.21.2               h659d440_0    conda-forge
ld_impl_linux-64          2.40                 h41732ed_0    conda-forge
libcurl                   8.7.1                hca28451_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 hd590300_2    conda-forge
libexpat                  2.6.2                h59595ed_0    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-devel_linux-64     12.3.0             h8bca6fd_105    conda-forge
libgcc-ng                 13.2.0               h807b86a_5    conda-forge
libgomp                   13.2.0               h807b86a_5    conda-forge
libnghttp2                1.58.0               h47da74e_1    conda-forge
libnsl                    2.0.1                hd590300_0    conda-forge
libsanitizer              12.3.0               h0f45ef3_5    conda-forge
libsqlite                 3.45.2               h2797004_0    conda-forge
libssh2                   1.11.0               h0841786_0    conda-forge
libstdcxx-devel_linux-64  12.3.0             h8bca6fd_105    conda-forge
libstdcxx-ng              13.2.0               h7e041cc_5    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libuv                     1.48.0               hd590300_0    conda-forge
libxcrypt                 4.4.36               hd590300_1    conda-forge
libzlib                   1.2.13               hd590300_5    conda-forge
make                      4.3                  hd18ef5c_1    conda-forge
mypy-extensions           1.0.0                    pypi_0    pypi
ncurses                   6.4.20240210         h59595ed_0    conda-forge
ninja                     1.11.1               h924138e_0    conda-forge
openssl                   3.2.1                hd590300_1    conda-forge
packaging                 24.0                     pypi_0    pypi
pathspec                  0.12.1                   pypi_0    pypi
pip                       24.0               pyhd8ed1ab_0    conda-forge
platformdirs              4.2.2                    pypi_0    pypi
python                    3.12.2          hab00c5b_0_cpython    conda-forge
readline                  8.2                  h8228510_1    conda-forge
rhash                     1.4.4                hd590300_0    conda-forge
setuptools                69.2.0             pyhd8ed1ab_0    conda-forge
six                       1.16.0                   pypi_0    pypi
sysroot_linux-64          2.12                he073ed8_17    conda-forge
tk                        8.6.13          noxft_h4845f30_101    conda-forge
tzdata                    2024a                h0c530f3_0    conda-forge
wheel                     0.43.0             pyhd8ed1ab_1    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
zstd                      1.5.5                hfc55251_0    conda-forge

Environment info

active environment : duckdb
    active env location : ~/mambaforge/envs/duckdb
            shell level : 1
       user config file : ~/.condarc
 populated config files : ~/mambaforge/.condarc
                          ~/.condarc
          conda version : 4.12.0
    conda-build version : not installed
         python version : 3.9.16.final.0
       virtual packages : __linux=5.4.0=0
                          __glibc=2.31=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : ~/mambaforge  (writable)
      conda av data dir : ~/mambaforge/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : ~/mambaforge/pkgs
                          ~/.conda/pkgs
       envs directories : ~/mambaforge/envs
                          ~/.conda/envs
               platform : linux-64
             user-agent : conda/4.12.0 requests/2.27.1 CPython/3.9.16 Linux/5.4.0-200-generic ubuntu/20.04.6 glibc/2.31
                UID:GID : 701366:50513
             netrc file : None
           offline mode : False
@h-vetinari
Copy link
Member

h-vetinari commented Jan 29, 2025

You have a very old sysroot

sysroot_linux-64          2.12                he073ed8_17    conda-forge

which corresponds to glibc 2.12 from May 2010. The default in conda-forge is 2.17 currently, but you can easily go higher than that if you're not concerned about dropping support for systems that are older that the baseline you choose. Note though that we only have RHEL based choices for glibc versions, so 2.12, 2.17, 2.28 & 2.34.

For example, Ubuntu 20.04 has glibc 2.31, so you could use sysroot_linux-64=2.28, which would still create binaries that can run on RHEL 8+, Ubuntu 20.04+ and Debian 10+ (Buster) etc.

@zmbc
Copy link
Author

zmbc commented Jan 29, 2025

Ah, thanks for pointing that out. I don't think I did anything special to create this environment, just mamba create -n duckdb python cmake cxx-compiler ninja, but it was on April 19th, 2024. I get 2.17 in a new environment.

It is surprising to me that versions from 2010 and 2012 would have been the defaults now and so recently. Am I correct in understanding that this lag is intentional, so that binaries will be compatible with older systems? That makes sense, but seems like it should be documented somewhere users will see it in case they run into issues like this.

@h-vetinari
Copy link
Member

It is surprising to me that versions from 2010 and 2012 would have been the defaults now and so recently. Am I correct in understanding that this lag is intentional, so that binaries will be compatible with older systems?

Read about it here: conda-forge/conda-forge.github.io#2383 (and links therein). It needed a lot of work to change something we had never changed before (the glibc baseline). For user installs getting the newer sysroots by default (in contrast to the needs of our infra), there's #68

@zmbc
Copy link
Author

zmbc commented Jan 30, 2025

Thanks for that context! It sounds like conda-forge is on the path to decoupling the compilation of packages from the package that gets installed by default, so that's great. I think that coupling is what is surprising to me.

@h-vetinari
Copy link
Member

The coupling is what allows us to build packages that are widely installable. This is first and foremost a need of our infrastructure, and our compilers are primarily concerned with the our package-building needs, and not being installed by end-users. That's been changing a bit (people like our compilers I guess), and so discussions like #68 happen.

@h-vetinari h-vetinari added question Further information is requested and removed bug Something isn't working labels Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants