[tex-k] bibtex build issue under macOS: error: implicit declaration of function

Marius Schamschula lists at schamschula.com
Tue Jun 30 15:34:23 CEST 2020

While building latex-bin using MacPorts under the latest macOS beta, I have run into an issue due to the fact that the build system is more strict in terms of implicit function declarations.

Here is the error in context (loads of notes and warnings):

:info:build depbase=`echo bibtex.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
:info:build 	/usr/bin/clang -DHAVE_CONFIG_H -I. -I./w2c  -I/opt/local/var/macports/build/_Users_mariusschamschula_Development_MacPorts_ports_tex_texlive-bin/texlive-bin/work/texlive-source-2019.50896-stripped/texk -I/opt/local/var/macports/build/_Users_mariusschamschula_Development_MacPorts_ports_tex_texlive-bin/texlive-bin/work/texlive-source-2019.50896-stripped/texk -isystem/opt/local/include -isysroot/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.16.sdk -Wimplicit -Wreturn-type -pipe -Os -isysroot/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.16.sdk -arch x86_64 -MT bibtex.o -MD -MP -MF $depbase.Tpo -c -o bibtex.o bibtex.c &&\
:info:build 	mv -f $depbase.Tpo $depbase.Po
:info:build bibtex.c:310:18: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
:info:build   if ( ( history == 1 ) ) 
:info:build          ~~~~~~~~^~~~
Lots of notes and warnings
:info:build bibtex.c:6898:19: note: use ‘=' to turn this equality comparison into an assignment
:info:build     if ( ( auxptr == auxstacksize ) ) 
:info:build                   ^~
:info:build                   =
:info:build bibtex.c:6956:36: error: implicit declaration of function 'open_input_with_dirname' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
:info:build       auxfile [auxptr ], -1 ) && ! aopeninwithdirname ( auxfile [auxptr ], 
:info:build                                    ^
:info:build ./cpascal.h:145:35: note: expanded from macro 'aopeninwithdirname'
:info:build #define aopeninwithdirname(f,p,s) open_input_with_dirname (&(f), p, s)
:info:build                                   ^
:Lots of notes and warnings
:info:build bibtex.c:10134:18: note: use '=' to turn this equality comparison into an assignment
:info:build         if ( ( errcount == 1 ) ) 
:info:build                         ^~
:info:build                         =
:info:build 188 warnings and 1 error generated.

I'm not familiar with the latex build system, and have found no simple way of patching the bibtex.h, of for that matter bibtex.c,  file prior to building, as it seems to be generated after the configure phase, as latex-bin acts as a meta package and runs configure on sub-packages during the make phase.

The full log file is available at https://gist.github.com/Schamschula/4253b747b64a5714ea090b84b8bd8850


More information about the tex-k mailing list.