[MacPorts] #61975: codec2 @20210101-1f701514 fails to build using Xcode 12 due to implicitly declared library functions
MacPorts
noreply at macports.org
Sat Jan 2 16:53:20 UTC 2021
#61975: codec2 @20210101-1f701514 fails to build using Xcode 12 due to implicitly
declared library functions
-----------------------+--------------------
Reporter: michaelld | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: | Port: codec2
-----------------------+--------------------
From the build log:
{{{
:info:build
/opt/local/var/macports/build/_opt_sources_MacPorts_ports_github_macports_audio_codec2/codec2/work/codec2-1f70151444f9add31848905946abcf2dd12d5c0e/src/c2dec.c:114:13:
warning: unused variable 'nread' [-Wunused-variable]
:info:build int nread = fread(&in_hdr,sizeof(in_hdr),1,fin);
:info:build ^
:info:build /usr/bin/clang -pipe -Os -DNDEBUG -I/opt/local/include
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk -Wall
-Wno-strict-overflow -std=gnu11 -fPIC -arch x86_64 -isysroot
/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk -mmacosx-version-
min=11.0 -Wl,-search_paths_first -Wl,-headerpad_max_install_names
-L/opt/local/lib -Wl,-headerpad_max_install_names
-Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk
CMakeFiles/vhf_frame_c2.dir/vhf_frame_c2.c.o -o vhf_frame_c2
-Wl,-rpath,/opt/local/lib -lm libcodec2.0.9.dylib -lm
:info:build
/opt/local/var/macports/build/_opt_sources_MacPorts_ports_github_macports_audio_codec2/codec2/work/codec2-1f70151444f9add31848905946abcf2dd12d5c0e/src/fmfsk_mod.c:47:9:
error: implicitly declaring library function 'exit' with type 'void (int)
__attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
:info:build exit(1);
:info:build ^
:info:build
/opt/local/var/macports/build/_opt_sources_MacPorts_ports_github_macports_audio_codec2/codec2/work/codec2-1f70151444f9add31848905946abcf2dd12d5c0e/src/fmfsk_mod.c:47:9:
note: include the header <stdlib.h> or explicitly provide a declaration
for 'exit'
:info:build /usr/bin/clang -pipe -Os -DNDEBUG -I/opt/local/include
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk -Wall
-Wno-strict-overflow -std=gnu11 -fPIC -arch x86_64 -isysroot
/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk -mmacosx-version-
min=11.0 -Wl,-search_paths_first -Wl,-headerpad_max_install_names
-L/opt/local/lib -Wl,-headerpad_max_install_names
-Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk
CMakeFiles/cohpsk_get_test_bits.dir/cohpsk_get_test_bits.c.o -o
cohpsk_get_test_bits -Wl,-rpath,/opt/local/lib -lm libcodec2.0.9.dylib
-lm
:info:build
/opt/local/var/macports/build/_opt_sources_MacPorts_ports_github_macports_audio_codec2/codec2/work/codec2-1f70151444f9add31848905946abcf2dd12d5c0e/src/fmfsk_mod.c:51:10:
error: implicit declaration of function 'atoi' is invalid in C99 [-Werror
,-Wimplicit-function-declaration]
:info:build Fs = atoi(argv[1]);
:info:build ^
:info:build
/opt/local/var/macports/build/_opt_sources_MacPorts_ports_github_macports_audio_codec2/codec2/work/codec2-1f70151444f9add31848905946abcf2dd12d5c0e/src/fmfsk_mod.c:76:24:
error: implicitly declaring library function 'alloca' with type 'void
*(unsigned long)' [-Werror,-Wimplicit-function-declaration]
:info:build bitbuf = (uint8_t*)alloca(sizeof(uint8_t)*fmfsk->nbit);
:info:build ^
:info:build
/opt/local/var/macports/build/_opt_sources_MacPorts_ports_github_macports_audio_codec2/codec2/work/codec2-1f70151444f9add31848905946abcf2dd12d5c0e/src/fmfsk_mod.c:76:24:
note: include the header <stdlib.h> or explicitly provide a declaration
for 'alloca'
:info:build 3 errors generated.
}}}
Good chance there will be more of these in files further into the build.
--
Ticket URL: <https://trac.macports.org/ticket/61975>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list