bug-recutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Build errors on MacOS Big Sur


From: Jose E. Marchesi
Subject: Re: Build errors on MacOS Big Sur
Date: Tue, 14 Sep 2021 23:41:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> Hello Jose,
>
> I’m trying to add GNU Recutils to MacPorts and I’m running into a
> small issue in getting it compiled on macOS Big Sur (11.5) due to a
> few -Wimplicit-function-declaration] warnings which are being treated
> like errors on newer MacOS versions.
>
> The PR with the proposed changes is at
> https://github.com/macports/macports-ports/pull/12165
> <https://github.com/macports/macports-ports/pull/12165> and the log
> showing the errors is at
> https://gist.github.com/zaid/1e2010700b9b03b3e48a4b794524997d
> <https://gist.github.com/zaid/1e2010700b9b03b3e48a4b794524997d>
>
> For example, we see the following in the log file:
>
> :info:build rec-sex-parser.c:67:7: error: implicit declaration of
> function 'sexlex_init' is invalid in C99
> [-Werror,-Wimplicit-function-declaration]
> :info:build       sexlex_init (&(new->scanner));
> :info:build       ^
> :info:build rec-sex-parser.c:68:7: error: implicit declaration of
> function 'sexset_extra' is invalid in C99
> [-Werror,-Wimplicit-function-declaration]
> :info:build       sexset_extra (new, new->scanner);
> :info:build       ^
> :info:build /bin/sh ../libtool --tag=CC --mode=compile /usr/bin/clang
> -DHAVE_CONFIG_H -I.  -I../lib -I../lib
> -DLOCALEDIR=\"/opt/local/share/locale\" -DREMOTE_DESCRIPTORS
> -DUUID_TYPE -I/opt/local/include
> -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -pipe
> -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk
> -arch x86_64 -c -o rec-sex-tab.lo rec-sex-tab.c
> :info:build rec-sex-parser.c:85:7: error: implicit declaration of
> function 'sexlex_destroy' is invalid in C99
> [-Werror,-Wimplicit-function-declaration]
> :info:build       sexlex_destroy (parser->scanner);
> :info:build       ^
> :info:build 3 errors generated.
>
> The code builds (despite the warnings) on older version of MacOS
> (10.13) but it looks like newer versions are treating warnings as
> errors and failing the build.
>
> Any advice on how to fix these?

These implicit function declarations happen in code generated by flex.
I would suggest you to pass -Wno-implicit-function-declaration in CFLAGS
in your build script or recipe.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]