Opened 4 months ago
Closed 4 months ago
#70418 closed defect (fixed)
mpich fails to build with gcc14: error: passing argument 3 of 'scandir' from incompatible pointer type
Reported by: | barracuda156 | Owned by: | eborisch (Eric A. Borisch) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.9.3 |
Keywords: | Cc: | mascguy (Christopher Nielsen) | |
Port: | mpich, mpich-gcc14 |
Description
We got this issue here as well:
libtool: compile: /opt/local/bin/gcc-mp-14 -DHAVE_CONFIG_H -I. -I./include -D_GNU_SOURCE -D__USE_XOPEN2K8 -DSYSCONFDIR=\"/opt/local/etc/mpich-gcc14\" -DRDMADIR=\"@rdmadir@\" -DPROVDLDIR=\"/opt/local/lib/mpich-gcc14/libfabric\" -I./prov/hook/include -I./prov/hook/hook_debug/include -I./prov/hook/hook_hmem/include -I./prov/hook/dmabuf_peer_mem/include -isystem/opt/local/include/LegacySupport -Wall -O2 -DNDEBUG -pipe -arch ppc -c src/var.c -fno-common -DPIC -o src/.libs/libfabric_la-var.o src/fabric.c: In function 'ofi_ini_dir': src/fabric.c:668:36: error: passing argument 3 of 'scandir' from incompatible pointer type [-Wincompatible-pointer-types] 668 | n = scandir(dir, &liblist, lib_filter, alphasort); | ^~~~~~~~~~ | | | int (*)(const struct dirent *) In file included from /opt/local/include/LegacySupport/dirent.h:27, from src/fabric.c:43: /usr/include/dirent.h:129:5: note: expected 'int (*)(struct dirent *)' but argument is of type 'int (*)(const struct dirent *)' 129 | int (*)(struct dirent *), int (*)(const void *, const void *)) __DARWIN_INODE64(scandir); | ^~~~~~~~~~~~~~~~~~~~~~~~ libtool: compile: /opt/local/bin/gcc-mp-14 -DHAVE_CONFIG_H -I. -I./include -D_GNU_SOURCE -D__USE_XOPEN2K8 -DSYSCONFDIR=\"/opt/local/etc/mpich-gcc14\" -DRDMADIR=\"@rdmadir@\" -DPROVDLDIR=\"/opt/local/lib/mpich-gcc14/libfabric\" -I./prov/hook/include -I./prov/hook/hook_debug/include -I./prov/hook/hook_hmem/include -I./prov/hook/dmabuf_peer_mem/include -isystem/opt/local/include/LegacySupport -Wall -O2 -DNDEBUG -pipe -arch ppc -c src/perf.c -o src/libfabric_la-perf.o >/dev/null 2>&1 make[3]: *** [src/libfabric_la-fabric.lo] Error 1 make[3]: *** Waiting for unfinished jobs....
Change History (3)
comment:1 Changed 4 months ago by barracuda156
comment:2 Changed 4 months ago by ryandesign (Ryan Carsten Schmidt)
You didn't attach a log or say what version of OS you're using but the prototype of scandir
did change in OS X 10.8; modern software is probably written to assume that newer scandir
.
This has come up several times before; see query:summary=~scandir
An example of how to patch software to work with the 10.7-and-older scandir
is [74405bfa3c405e2c316d669fba0a0a744cc6dad5/macports-ports].
comment:3 Changed 4 months ago by Eric A. Borisch <eborisch@…>
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
This is the only error for the current version of the port. (I temporarily changed the declaration in
dirent.h
to make MPICH compile.)