Open EDePasquale opened 3 years ago
thanks for reporting. I have not compiled it on/for Mac. Perhaps you can file a regular pull request, please, so that someone else can pull your request and try that. I am very sorry, that I cannot test it at the moment.
It's easier to change the Makefile:
-CFLAGS = $(MYDEFINEFLAGS) $(SUBDIRCFLAGS) +CFLAGS = $(MYDEFINEFLAGS) $(SUBDIRCFLAGS) -Wno-implicit-function-declaration
However, I'm not sure how to ifdef that so it only happens on the mac, and turning off that warning seems like a bad idea overall.
I am using @EDePasquale's changes to run agrep
on macOS Monterey and Red Hat Enterprise Linux Server Version 7.7 (Maipo). I'm happy to create a pull request but don't want to overreach. @Wikinaut which option do you prefer I use here:
Of course, you can issue a pull request, perhaps best in form of a well-named branch.
I have not compiled it on/for Mac.
I am very sorry, that I cannot test it at the moment.
You don't need a Mac to verify the problem or its fix. You can add -Werror=implicit-function-declaration
to CFLAGS to test it on any OS with any version of clang (and maybe gcc; I don't know). If you use LLVM.org clang 16 or later, that is even the default behavior (as it is for Apple clang 12 or later).
It's easier to change the Makefile:
-CFLAGS = $(MYDEFINEFLAGS) $(SUBDIRCFLAGS) +CFLAGS = $(MYDEFINEFLAGS) $(SUBDIRCFLAGS) -Wno-implicit-function-declaration
However, I'm not sure how to ifdef that so it only happens on the mac, and turning off that warning seems like a bad idea overall.
Right, don't disable the error. Apple and LLVM.org have made it an error in their respective clangs for a reason. It needs to be fixed properly. Much more information at https://trac.macports.org/wiki/WimplicitFunctionDeclaration.
A sequence of errors occurred during installation when calling the 'make' command. In general, most of them seem to be related to implicit declarations, examples:
To correct this for my machine, I modified the files to either remove or move the if blocks beginning with 'ifdef_WIN32', though there is likely a better solution that doesn't affect other non-Windows operating systems. To make it successfully build on my machine I changed the following:
I may have missed a change or 2 while writing this issue, but these same actions can be used to correct other similar errors.