conda-forge / compilers-feedstock

A conda-smithy repository for compilers.
BSD 3-Clause "New" or "Revised" License
9 stars 17 forks source link

fcntl.h does not include linux/falloc.h #63

Open zmbc opened 6 months ago

zmbc commented 6 months ago

Solution to issue cannot be found in the documentation.

Issue

On Ubuntu (tested on 20.04 and 22.04):

conda create -n broken-compilers cxx-compiler
conda activate broken-compilers
c++ falloc_test.cpp

where falloc_test.cpp is:

#include <fcntl.h>
#include <iostream>

int main() {
    std::cout << FALLOC_FL_PUNCH_HOLE;
    return 0;
}

outputs:

falloc_test.cpp: In function 'int main()':
falloc_test.cpp:6:18: error: 'FALLOC_FL_PUNCH_HOLE' was not declared in this scope
    6 |     std::cout << FALLOC_FL_PUNCH_HOLE;
      |

Running the exact same command, c++ falloc_test.cpp, outside my conda environment works. Adding #include <linux/falloc.h> also fixes the issue. However, fcntl is supposed to already include this.

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
c-compiler                1.7.0                hd590300_0    conda-forge
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
ld_impl_linux-64          2.40                 h41732ed_0    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
libsanitizer              12.3.0               h0f45ef3_5    conda-forge
libstdcxx-devel_linux-64  12.3.0             h8bca6fd_105    conda-forge
libstdcxx-ng              13.2.0               h7e041cc_5    conda-forge
sysroot_linux-64          2.12                he073ed8_17    conda-forge

Environment info

__    __    __    __
                 /  \  /  \  /  \  /  \
                /    \/    \/    \/    \
███████████████/  /██/  /██/  /██/  /████████████████████████
              /  / \   / \   / \   / \  \____
             /  /   \_/   \_/   \_/   \    o \__,
            / _/                       \_____/  `
            |/
        ███╗   ███╗ █████╗ ███╗   ███╗██████╗  █████╗
        ████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
        ██╔████╔██║███████║██╔████╔██║██████╔╝███████║
        ██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
        ██║ ╚═╝ ██║██║  ██║██║ ╚═╝ ██║██████╔╝██║  ██║
        ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝╚═════╝ ╚═╝  ╚═╝

        mamba (1.1.0) supported by @QuantStack

        GitHub:  https://github.com/mamba-org/mamba
        Twitter: https://twitter.com/QuantStack

█████████████████████████████████████████████████████████████

     active environment : falloc_test
    active env location : ~/zmbc/mambaforge/envs/falloc_test
            shell level : 1
       user config file : ~/.condarc
 populated config files : ~/zmbc/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 : ~/zmbc/mambaforge  (writable)
      conda av data dir : ~/zmbc/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 : ~/zmbc/mambaforge/pkgs
                          ~/.conda/pkgs
       envs directories : ~/zmbc/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-172-generic ubuntu/20.04.6 glibc/2.31
                UID:GID : 701366:50513
             netrc file : None
           offline mode : False