pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkgsrc 2021Q4 on M1 Mac
On Wed, Apr 14, 2021 at 6:53 AM Jonathan Perkin <jperkin%joyent.com@localhost> wrote:
>
> >But zlib still won't build. Looking at the file zconf.h in
> >devel/zlib/files/ I see:
> >
> >#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
> ># define Z_HAVE_UNISTD_H
> >#endif
> >
> >(same for devel/zlib/work/zlib-1.2.11/zconf.h)
> >
> >If I get the zlib source separately and run configure script, zconf.h
> >looks like this:
> >
> >#if 1 /* was set to #if 1 by ./configure */
> ># define Z_HAVE_UNISTD_H
> >#endif
>
> Right, we don't run configure, we just use the unpacked sources as-is.
>
> I don't know why you're getting -Werror, I don't when I try to reproduce
> on my mac. It may be reasonable for us to add
>
> CFLAGS.Darwin+= -DHAVE_UNISTD_H
That worked great.
> to the Makefile, which certainly removes the warnings for me, but it's
> worth investigating why you are seeing -Werror being added, as I can't
> see where pkgsrc would be inserting it.
I think it's the new default, -Wimplicit-function-declaration is an error now.
Previously:
$ clang --version
Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
$ clang x.c
x.c:1:18: warning: implicit declaration of function 'puts' is invalid in C99
[-Wimplicit-function-declaration]
int main(void) { puts("Hello world!"); return 0; }
^
1 warning generated.
Now:
% clang --version
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: arm64-apple-darwin20.3.0
Thread model: posix
InstalledDir:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
% clang x.c
x.c:1:18: error: implicit declaration of function 'puts' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
int main(void) { puts("Hello world!"); return 0; }
^
1 error generated.
Putting -Wno-error=implicit-function-declaration in CFLAGS also worked.
Home |
Main Index |
Thread Index |
Old Index