Missing #include <math.h> in src/ucs/time/time.h
Closed this issue · 1 comments
PHHargrove commented
Describe the bug
Compiling UCX 1.17.0 on OLCF's summit complains that INFINITY
is undefined in src/ucs/time/time.h
Steps to Reproduce
- Download and unpack UCX 1.17.0 from GitHub on OLCF's Summit
module load gcc
./configure
in top level of source directory, no options needed to reproducemake
Make step will terminate with
CC event/libucm_la-event.lo
In file included from /[redacted]/ucx-1.17.0/src/ucm/util/sys.h:13,
from /[redacted]/ucx-1.17.0/src/ucm/mmap/mmap.h:11,
from event/event.c:13:
/[redacted]/ucx-1.17.0/src/ucs/time/time.h: In function 'ucs_time_units_to_sec':
/[redacted]/ucx-1.17.0/src/ucs/time/time.h:165:16: error: 'INFINITY' undeclared (first use in this function)
165 | return INFINITY;
| ^~~~~~~~
/[redacted]/ucx-1.17.0/src/ucs/time/time.h:165:16: note: each undeclared identifier is reported only once for each function it appears in
make[3]: *** [Makefile:783: event/libucm_la-event.lo] Error 1
make[3]: Leaving directory '/[redacted]/ucx-1.17.0/src/ucm'
make[2]: *** [Makefile:916: all-recursive] Error 1
make[2]: Leaving directory '/[redacted]/ucx-1.17.0/src/ucm'
make[1]: *** [Makefile:777: all-recursive] Error 1
make[1]: Leaving directory '/[redacted]/ucx-1.17.0'
make: *** [Makefile:640: all] Error 2
Adding #include <math>
to the includes near the top (i.e. at line 14) of src/ucs/time/time.h
provides the definition and allows compilation to complete normally.
Setup and versions
[hargrove@login4.summit ~]$ lsb_release -a
LSB Version: :core-4.1-noarch:core-4.1-ppc64le
Distributor ID: RedHatEnterprise
Description: Red Hat Enterprise Linux release 8.6 (Ootpa)
Release: 8.6
Codename: Ootpa
[hargrove@login4.summit ~]$ gcc --version
gcc (GCC) 12.1.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See https://www.olcf.ornl.gov/summit/
for more info