[MacPorts] #69792: geany @2.0 Fails to Build on Lion - error: conflicting types for 'scandir'
MacPorts
noreply at macports.org
Sun Apr 21 03:11:19 UTC 2024
#69792: geany @2.0 Fails to Build on Lion - error: conflicting types for 'scandir'
---------------------+--------------------
Reporter: RobK88 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.9.3
Resolution: | Keywords: lion
Port: geany |
---------------------+--------------------
Comment (by RobK88):
Thanks Ken for the feedback. I will take a closer look and see if we can
patch the code.
Please note that two of the errors disappear if one uses `clang-15` or
earlier to build `geany`.
See https://trac.macports.org/ticket/69791
As a result only the `scandir` error remains.
Here is the output when building `geany` on Lion using `clang-15`:
{{{
bash-3.2$ sudo port clean geany
Password:
---> Cleaning geany
bash-3.2$
bash-3.2$
bash-3.2$ sudo port -v upgrade geany configure.compiler=macports-clang-15
---> Computing dependencies for geany.
---> Fetching archive for geany
etc
etc
main/portable-scandir.c:136:1: error: conflicting types for 'scandir'
scandir(const char *directory_name,
^
/usr/include/dirent.h:128:5: note: previous declaration is here
int scandir(const char *, struct dirent ***,
^
main/portable-scandir.c:238:49: warning: incompatible function pointer
types passing 'int (*)(const struct dirent *)' to parameter of type 'int
(*)(struct dirent *)' [-Wincompatible-function-pointer-types]
return scandir (directory_name, array_pointer, select_function,
compare_function);
^~~~~~~~~~~~~~~
/usr/include/dirent.h:129:11: note: passing argument to parameter here
int (*)(struct dirent *), int (*)(const void *, const void *))
__DARWIN_INODE64(scandir);
^
main/portable-scandir.c:238:66: warning: incompatible function pointer
types passing 'int (*)(const struct dirent **, const struct dirent **)' to
parameter of type 'int (*)(const void *, const void *)' [-Wincompatible-
function-pointer-types]
return scandir (directory_name, array_pointer, select_function,
compare_function);
^~~~~~~~~~~~~~~~
/usr/include/dirent.h:129:37: note: passing argument to parameter here
int (*)(struct dirent *), int (*)(const void *, const void *))
__DARWIN_INODE64(scandir);
^
2 warnings and 1 error generated.
make[2]: *** [main/portable-scandir.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
1 warning generated.
make[2]: Leaving directory
`/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_geany/geany/work/geany-2.0/ctags'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_geany/geany/work/geany-2.0'
make: *** [all] Error 2
make: Leaving directory
`/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_geany/geany/work/geany-2.0'
Command failed: cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_geany/geany/work/geany-2.0"
&& /usr/bin/make -j4 -w all
Exit code: 2
Error: Failed to build geany: command execution failed
Error: See
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_geany/geany/main.log
for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe
there is a bug.
}}}
--
Ticket URL: <https://trac.macports.org/ticket/69792#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list