Open superbonaci opened 3 days ago
@superbonaci The build log doesn't show the cause for the build error. You need to copy and paste the actual error.
@CuriousTommy where is such error?
If you did a multi-threaded build, you would have to look for it in the output (try searching for any reference to "Error").
make[1]: *** [CMakeFiles/Makefile2:40843: src/CoreAudio/AudioToolbox/CMakeFiles/AudioToolbox.dir/all] Error 2
This error above only tells me that an error occurred in AudioToolbox, it's not enough information for me to know what is actually causing the error.
If you are not sure where the actual error is located, I strongly recommend post the entire output (either in a pastebin, or equivalent site).
Okay, here is the cause:
[ 84%] Building C object src/external/security/SecurityTool/macOS/CMakeFiles/securitytool_macos.dir/keychain_lock.c.o
/home/jmss/darling/src/CoreAudio/AudioToolbox/AudioConverterImpl.cpp:103:8: error: no member named 'channels' in 'AVCodecContext'
103 | cIn->channels = inSourceFormat->mChannelsPerFrame;
| ~~~ ^
/home/jmss/darling/src/CoreAudio/AudioToolbox/AudioConverterImpl.cpp:106:52: error: no member named 'channels' in 'AVCodecContext'
106 | std::cout << "Converting from PCM with " << cIn->channels << " channels at " << cIn->sample_rate << " Hz\n";
| ~~~ ^
/home/jmss/darling/src/CoreAudio/AudioToolbox/AudioConverterImpl.cpp:134:13: error: no member named 'channels' in 'AVCodecContext'
134 | m_encoder->channels = m_destinationFormat.mChannelsPerFrame;
| ~~~~~~~~~ ^
/home/jmss/darling/src/CoreAudio/AudioToolbox/AudioConverterImpl.cpp:136:13: error: no member named 'channel_layout' in 'AVCodecContext'
136 | m_encoder->channel_layout = CAChannelCountToLayout(m_destinationFormat.mChannelsPerFrame);
| ~~~~~~~~~ ^
/home/jmss/darling/src/CoreAudio/AudioToolbox/AudioConverterImpl.cpp:164:16: error: no member named 'channel_layout' in 'AVFrame'
164 | m_audioFrame->channel_layout = m_encoder->channel_layout;
| ~~~~~~~~~~~~ ^
/home/jmss/darling/src/CoreAudio/AudioToolbox/AudioConverterImpl.cpp:164:44: error: no member named 'channel_layout' in 'AVCodecContext'
164 | m_audioFrame->channel_layout = m_encoder->channel_layout;
| ~~~~~~~~~ ^
/home/jmss/darling/src/CoreAudio/AudioToolbox/AudioConverterImpl.cpp:167:78: error: no member named 'channels' in 'AVCodecContext'
167 | int audioSampleBuffer_size = av_samples_get_buffer_size(nullptr, m_encoder->channels, m_audioFrame->nb_samples, m_encoder->sample_fmt, 0);
| ~~~~~~~~~ ^
/home/jmss/darling/src/CoreAudio/AudioToolbox/AudioConverterImpl.cpp:177:66: error: no member named 'channels' in 'AVCodecContext'
177 | if (int err = avcodec_fill_audio_frame(m_audioFrame, m_encoder->channels, m_encoder->sample_fmt,
| ~~~~~~~~~ ^
/home/jmss/darling/src/CoreAudio/AudioToolbox/AudioConverterImpl.cpp:456:4: warning: TODO: test this new avcodec decoder code [-W#warnings]
456 | #warning TODO: test this new avcodec decoder code
| ^
/home/jmss/darling/src/CoreAudio/AudioToolbox/AudioConverterImpl.cpp:570:5: warning: TODO: test this new avcodec encoder code [-W#warnings]
570 | #warning TODO: test this new avcodec encoder code
| ^
2 warnings and 8 errors generated.
Seems that AVCodecContext
is part of ffmpeg
(avcodec.h). Looking at the built Arch Linux's ffmpeg
package confirms that channels
does not exist inside AVCodecContext
anymore.
After some further digging, channels
is a deprecated API that has been recently removed:
@superbonaci I pushed a ffmpeg_fix
branch that should fix your issue. Please test and let me know if the build succeeds.
Still fails
Hmm...
/home/jmss/darling/src/CoreAudio/AudioToolbox/AudioConverterImpl.cpp:150:13: error: no member named 'channel_layout' in 'AVCodecContext'
150 | m_encoder->channel_layout = CAChannelCountToLayout(m_destinationFormat.mChannelsPerFrame);
| ~~~~~~~~~ ^
/home/jmss/darling/src/CoreAudio/AudioToolbox/AudioConverterImpl.cpp:178:16: error: no member named 'channel_layout' in 'AVFrame'
178 | m_audioFrame->channel_layout = m_encoder->channel_layout;
| ~~~~~~~~~~~~ ^
/home/jmss/darling/src/CoreAudio/AudioToolbox/AudioConverterImpl.cpp:178:44: error: no member named 'channel_layout' in 'AVCodecContext'
178 | m_audioFrame->channel_layout = m_encoder->channel_layout;
| ~~~~~~~~~ ^
Build Log What is the build error?
System Information What system are you building with?