conda-forge / conda-forge/compilers-feedstock
fcntl.h does not include linux/falloc.h
- Dominant language
- No language data
- Stars
- 12
- Forks
- 19
- Avg merge
- 1h 6m
- Merged PRs (30d)
- 2
Description
### Solution to issue cannot be found in the documentation.
- [X] I checked the documentation.
### Issue
On Ubuntu (tested on 20.04 and 22.04):
```bash
conda create -n broken-compilers cxx-compiler
conda activate broken-compilers
c++ falloc_test.cpp
```
where `falloc_test.cpp` is:
```cpp
#include
#include
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 ` also fixes the issue. However, [fcntl is supposed to already include this](https://bugzilla.redhat.com/show_bug.cgi?id=1476120).
### Installed packages
```shell
# 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
```shell
__ __ __ __
/ \ / \ / \ / \
/ \/ \/ \/ \
███████████████/ /██/ /██/ /██/ /████████████████████████
/ / \ / \ / \ / \ \____
/ / \_/ \_/ \_/ \ 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
```
Contributor guide
Research direction
Reproduce the reported c++ falloc_test.cpp command inside and outside the conda environment, then compare the fcntl.h and linux/falloc.h include paths supplied by the compiler. Inspect the kernel-headers_linux-64 and sysroot_linux-64 packages and their header layout. Done means the test compiles in the conda environment with only fcntl.h included.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100