Skip to content

Fails to compile on Solaris 11.4 #714

Open
@hulbs9nw

Description

@hulbs9nw

I'm trying to compile fio-master on Solaris 11.4 and it fails with an error - too many arguments to function 'ctime_r'. See configure and gmake output below:

Operating system              SunOS
CPU                           sparc64
Big endian                    yes
Compiler                      gcc
Cross compile                 no

Static build                  no
Wordsize                      64
zlib                          yes
Linux AIO support             no
POSIX AIO support             yes
POSIX AIO support needs -lrt  no
POSIX AIO fsync               yes
POSIX pshared support         yes
Solaris AIO support           yes
__sync_fetch_and_add          yes
__sync_synchronize            yes
__sync_val_compare_and_swap   yes
libverbs                      yes
rdmacm                        yes
asprintf()                    yes
vasprintf()                   yes
Linux fallocate               no
POSIX fadvise                 yes
POSIX fallocate               yes
sched_setaffinity(3 arg)      no
sched_setaffinity(2 arg)      no
clock_gettime                 yes
CLOCK_MONOTONIC               yes
CLOCK_MONOTONIC_RAW           no
CLOCK_MONOTONIC_PRECISE       no
clockid_t                     yes
gettimeofday                  yes
fdatasync                     yes
sync_file_range               no
EXT4 move extent              no
Linux splice(2)               no
GUASI                         no
libnuma                       no
strsep                        yes
strcasestr                    yes
strlcat                       yes
getopt_long_only()            yes
inet_aton                     yes
socklen_t                     yes
__thread                      yes
RUSAGE_THREAD                 no
SCHED_IDLE                    no
TCP_NODELAY                   yes
Net engine window_size        yes
TCP_MAXSEG                    yes
RLIMIT_MEMLOCK                no
pwritev/preadv                no
pwritev2/preadv2              no
IPv6 helpers                  yes
http engine                   yes
Rados engine                  no
Rados Block Device engine     no
setvbuf                       yes
Gluster API engine            no
s390_z196_facilities          no
HDFS engine                   no
MTD                           no
libpmem                       no
libpmemblk                    no
PMDK pmemblk engine           no
PMDK dev-dax engine           no
PMDK libpmem engine           no
DDN's Infinite Memory Engine  no
lex/yacc for arithmetic       no
getmntent                     no
getmntinfo                    no
Static Assert                 yes
bool                          yes
strndup                       yes
Valgrind headers              no
Zoned block device support    no
march_armv8_a_crc_crypto      no
cuda                          no
mkdir(a, b)                   yes
Build march=native            no
CUnit                         no

root@# gmake
FIO_VERSION = fio-3.12
    CC crc/crc16.o
    CC crc/crc32.o
    CC crc/crc32c-arm64.o
    CC crc/crc32c-intel.o
    CC crc/crc32c.o
    CC crc/crc64.o
    CC crc/crc7.o
    CC crc/fnv.o
    CC crc/md5.o
    CC crc/murmur3.o
    CC crc/sha1.o
    CC crc/sha256.o
    CC crc/sha3.o
    CC crc/sha512.o
    CC crc/test.o
    CC crc/xxhash.o
    CC lib/axmap.o
    CC lib/bloom.o
    CC lib/flist_sort.o
    CC lib/gauss.o
    CC lib/getrusage.o
    CC lib/hweight.o
    CC lib/ieee754.o
    CC lib/lfsr.o
    CC lib/memalign.o
    CC lib/memcpy.o
    CC lib/mountcheck.o
    CC lib/num2str.o
    CC lib/output_buffer.o
    CC lib/pattern.o
    CC lib/prio_tree.o
    CC lib/rand.o
    CC lib/rbtree.o
    CC lib/strntol.o
    CC lib/zipf.o
    CC gettime.o
    CC ioengines.o
    CC init.o
    CC stat.o
In file included from os/os.h:46:0,
                 from thread_options.h:5,
                 from fio.h:18,
                 from stat.c:7:
stat.c: In function 'show_thread_status_normal':
os/os-solaris.h:46:33: error: too many arguments to function 'ctime_r'
 #define os_ctime_r(x, y, z)     ctime_r((x), (y), (z))
                                 ^
stat.c:793:2: note: in expansion of macro 'os_ctime_r'
  os_ctime_r((const time_t *) &time_p, time_buf, sizeof(time_buf));
  ^~~~~~~~~~
In file included from /usr/include/sys/time.h:448:0,
                 from /usr/include/sys/select.h:27,
                 from /usr/include/sys/types.h:665,
                 from /usr/include/string.h:15,
                 from stat.c:2:
/usr/include/time.h:265:14: note: declared here
 extern char *ctime_r(const time_t *, char *);
              ^~~~~~~
In file included from os/os.h:46:0,
                 from thread_options.h:5,
                 from fio.h:18,
                 from stat.c:7:
stat.c: In function '__show_run_stats':
os/os-solaris.h:46:33: error: too many arguments to function 'ctime_r'
 #define os_ctime_r(x, y, z)     ctime_r((x), (y), (z))
                                 ^
stat.c:1910:3: note: in expansion of macro 'os_ctime_r'
   os_ctime_r(&tv_sec, time_buf, sizeof(time_buf));
   ^~~~~~~~~~
In file included from /usr/include/sys/time.h:448:0,
                 from /usr/include/sys/select.h:27,
                 from /usr/include/sys/types.h:665,
                 from /usr/include/string.h:15,
                 from stat.c:2:
/usr/include/time.h:265:14: note: declared here
 extern char *ctime_r(const time_t *, char *);
              ^~~~~~~
gmake: *** [Makefile:359: stat.o] Error 1

Any idea what the issue might be?

Metadata

Metadata

Assignees

No one assigned

    Labels

    needsattentionpatcheswelcomeNo one internal is working on this but an external contributor's help is very welcome!triagedIssue cause is understood but a patch is needed to fix it

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions