RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1850174 - fatal error: stdatomic.h: No such file or directory
Summary: fatal error: stdatomic.h: No such file or directory
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gcc
Version: 7.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Marek Polacek
QA Contact: Alexandra Petlanová Hájková
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-23 16:08 UTC by Zhang Yi
Modified: 2020-10-05 08:31 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-24 14:01:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Zhang Yi 2020-06-23 16:08:04 UTC
Description of problem:
fatal error: stdatomic.h: No such file or directory

Version-Release number of selected component (if applicable):
[root@storageqe-31 fio]# rpm -qf /usr/bin/gcc
gcc-4.8.5-44.el7.x86_64


How reproducible:
100%

Steps to Reproduce:
1. compiling the latest fio source code
2.
3.

Actual results:


Expected results:


Additional info:
# cd fio && ./configure && make && make install
STDOUT:
Operating system              Linux
CPU                           x86_64
Big endian                    no
Compiler                      gcc
Cross compile                 no

Static build                  no
Wordsize                      64
zlib                          yes
Linux AIO support             yes
Linux AIO support rw flags    no
Linux AIO over io_uring       no
POSIX AIO support             yes
POSIX AIO support needs -lrt  yes
POSIX AIO fsync               yes
POSIX pshared support         yes
pthread_condattr_setclock()   yes
pthread_sigmask()             yes
Solaris AIO support           no
__sync_fetch_and_add          yes
__sync_synchronize            yes
__sync_val_compare_and_swap   yes
libverbs                      no
rdmacm                        no
asprintf()                    yes
vasprintf()                   yes
Linux fallocate               yes
POSIX fadvise                 yes
POSIX fallocate               yes
sched_setaffinity(3 arg)      yes
sched_setaffinity(2 arg)      no
clock_gettime                 yes
CLOCK_MONOTONIC               yes
CLOCK_MONOTONIC_RAW           yes
CLOCK_MONOTONIC_PRECISE       no
clockid_t                     yes
gettimeofday                  yes
fdatasync                     yes
pipe()                        yes
pipe2()                       yes
pread()                       yes
sync_file_range               yes
EXT4 move extent              yes
Linux splice(2)               yes
GUASI                         no
libnuma                       no
strsep                        yes
strcasestr                    yes
strlcat                       no
getopt_long_only()            yes
inet_aton                     yes
socklen_t                     yes
__thread                      yes
RUSAGE_THREAD                 yes
SCHED_IDLE                    yes
TCP_NODELAY                   yes
Net engine window_size        yes
TCP_MAXSEG                    yes
RLIMIT_MEMLOCK                yes
pwritev/preadv                yes
pwritev2/preadv2              no
IPv6 helpers                  yes
http engine                   no
Rados engine                  no
Rados Block Device engine     no
setvbuf                       yes
Gluster API engine            no
s390_z196_facilities          no
HDFS engine                   no
MTD                           yes
libpmem                       yes
libpmemblk                    yes
PMDK pmemblk engine           yes
PMDK dev-dax engine           yes
PMDK libpmem engine           yes
DDN's Infinite Memory Engine  no
iscsi engine                  no
NBD engine                    no
lex/yacc for arithmetic       no
getmntent                     yes
getmntinfo                    no
Static Assert                 yes
bool                          yes
strndup                       yes
Valgrind headers              no
Zoned block device support    no
libzbc engine                 no
march_armv8_a_crc_crypto      no
cuda                          no
Build march=native            yes
CUnit                         no
__kernel_rwf_t                no
-Wimplicit-fallthrough=2      no
MADV_HUGEPAGE                 yes
gettid                        no
statx(2)/libc                 no
statx(2)/syscall              no
TCMalloc support              no
make[1]: Entering directory `/mnt/tests/kernel/storage/NVDIMM/btt_md_randio/fio'
make[1]: Leaving directory `/mnt/tests/kernel/storage/NVDIMM/btt_md_randio/fio'
make[1]: Entering directory `/mnt/tests/kernel/storage/NVDIMM/btt_md_randio/fio'
    CC crc/crc16.o
    CC crc/crc32.o
    CC crc/crc32c-arm64.o
make[1]: Leaving directory `/mnt/tests/kernel/storage/NVDIMM/btt_md_randio/fio'
STDERR:FIO_VERSION = fio-3.20-57-g6532
In file included from crc/crc32c.h:23:0,
                 from crc/crc32c-arm64.c:1:
crc/../arch/arch.h:4:23: fatal error: stdatomic.h: No such file or directory
 #include <stdatomic.h>
                       ^
compilation terminated.
make[1]: *** [crc/crc32c-arm64.o] Error 1

Comment 2 Marek Polacek 2020-06-23 16:18:38 UTC
stdatomic.h was only added in gcc4.9 so it's expected that this file is missing in gcc4.8.

You can use the Developer Toolset which provides newer versions of gcc.

Comment 3 Zhang Yi 2020-06-24 03:14:42 UTC
It works now

[root@hpe-dl380gen9-01 fio]# scl enable devtoolset-7 bash
[root@hpe-dl380gen9-01 fio]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-7/root/usr --mandir=/opt/rh/devtoolset-7/root/usr/share/man --infodir=/opt/rh/devtoolset-7/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --enable-plugin --with-linker-hash-style=gnu --enable-initfini-array --with-default-libstdcxx-abi=gcc4-compatible --with-isl=/builddir/build/BUILD/gcc-7.3.1-20180303/obj-x86_64-redhat-linux/isl-install --enable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 7.3.1 20180303 (Red Hat 7.3.1-5) (GCC) 

[root@hpe-dl380gen9-01 fio]# rpm -qa devtoolset-7-gcc
devtoolset-7-gcc-7.3.1-5.16.el7.x86_64

Comment 4 Marek Polacek 2020-06-24 14:01:17 UTC
Great.  DTS7 is unsupported so I'd recommend using DTS 9, if possible.


Note You need to log in before you can comment on or make changes to this bug.