Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 756145

Summary: dev-lang/python-3.7.7: failed build on macOS Big Sur (error: implicit declaration of function 'sendfile' is invalid in C99 [-Werror,-Wimplicit-function-declaration])
Product: Gentoo/Alt Reporter: Sam James <sam>
Component: Prefix SupportAssignee: Gentoo Prefix <prefix>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard: Workaround: compile with -Wno-implicit-function-declaration and add ac_cv_enable_implicit_function_declaration_error=no in bootstrap-prefix.sh
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 755644    
Attachments: build.log

Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-11-22 23:13:46 UTC
Created attachment 674383 [details]
build.log

gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -m64 -m64 -m64  -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration   -I. -I./Include -I/Users/sam/Gentoo/tmp/usr/include -I/Users/sam/Gentoo/tmp/usr/include  -DPy_BUILD_CORE_BUILTIN  -c ./Modules/_abc.c -o Modules/_abc.o
./Modules/posixmodule.c:8436:15: error: implicit declaration of function 'sendfile' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        ret = sendfile(in, out, offset, &sbytes, &sf, flags);
              ^

----
Needed to set ac_cv_enable_implicit_function_declaration_error=no and -Wno-implicit-function-declaration.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-11-22 23:14:50 UTC
Note: you can't set -Wno-implicit-function-declaration globally for the whole bootstrap, otherwise some configure tests will end up failing when they check if functions are declared.
Comment 2 Fabian Groffen gentoo-dev 2020-11-26 16:07:06 UTC
If this was the stage1 failure, I've tackled that by simply building 3.7.8.  Version in tree is also 3.7.8, so that should work too.