tencentyun / MLVBSDK

移动直播 SDK,国内下载镜像:
https://cloud.tencent.com/document/product/454/7873
776 stars 916 forks source link

【iOS】-【TXLiteAVSDK_Smart-8.0.9644】【编译报错 Undefined symbol】 #117

Open wzso opened 3 years ago

wzso commented 3 years ago

【当前现象】 编译不通过。

【集成包】 基础版Smart, TXLiteAVSDK_Smart-8.0.9644

【问题时间段】 最近

【机型】iOS 14.2, Xcode 12.2

【之前版本有无此问题】 项目几个月没维护,之前一切正常。

【复现概率】 必现

【复现途径】

  1. 升级到最新版本;
  2. 编译就会报错。

【Demo 复现途径】 可复现 / 不可复现

  1. 点击 ...
  2. 进入 ..
  3. 等待 ...
  4. 出现 Bug

【相关附件】 日志

Undefined symbols for architecture arm64:
  "_qc_avcodec_free_context", referenced from:
      txliteav::audio::FFmpegAACDecoder::UnInitInternal() in TXLiteAVSDK_Smart(ffmpeg_aac_decoder.o)
  "_qc_avcodec_flush_buffers", referenced from:
      txliteav::audio::AudioFFmpeg::SeekTo(long long) in TXLiteAVSDK_Smart(audio_ffmpeg.o)
  "_qc_avcodec_decode_audio4", referenced from:
      txliteav::audio::AudioFFmpeg::DecodeAudioFrame() in TXLiteAVSDK_Smart(audio_ffmpeg.o)
      txliteav::audio::FFmpegAACDecoder::DoDecode(txliteav::AudioFrame const&, txliteav::AudioFrame&) in TXLiteAVSDK_Smart(ffmpeg_aac_decoder.o)
  "_qc_avcodec_alloc_context3", referenced from:
      txliteav::audio::FFmpegAACDecoder::InitInternal(txliteav::AudioFrame const&) in TXLiteAVSDK_Smart(ffmpeg_aac_decoder.o)
  "_qc_av_read_frame", referenced from:
      txliteav::audio::AudioFFmpeg::GetAudioPacket() in TXLiteAVSDK_Smart(audio_ffmpeg.o)
  "_qc_av_frame_alloc", referenced from:
      txliteav::audio::AudioFFmpeg::Open(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in TXLiteAVSDK_Smart(audio_ffmpeg.o)
      txliteav::audio::FFmpegAACDecoder::InitInternal(txliteav::AudioFrame const&) in TXLiteAVSDK_Smart(ffmpeg_aac_decoder.o)
  "_qc_avformat_alloc_context", referenced from:
      txliteav::audio::AudioFFmpeg::Open(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in TXLiteAVSDK_Smart(audio_ffmpeg.o)
      txliteav::audio::FFmpegAACDecoder::InitInternal(txliteav::AudioFrame const&) in TXLiteAVSDK_Smart(ffmpeg_aac_decoder.o)
  "_qc_av_strerror", referenced from:
      txliteav::audio::AudioFFmpeg::Open(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in TXLiteAVSDK_Smart(audio_ffmpeg.o)
  "_qc_avcodec_close", referenced from:
      txliteav::audio::AudioFFmpeg::Release() in TXLiteAVSDK_Smart(audio_ffmpeg.o)
  "_qc_av_rescale_q", referenced from:
      txliteav::audio::AudioFFmpeg::Open(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in TXLiteAVSDK_Smart(audio_ffmpeg.o)
  "_qc_av_register_all", referenced from:
      txliteav::audio::AudioFFmpeg::AudioFFmpeg() in TXLiteAVSDK_Smart(audio_ffmpeg.o)
      txliteav::audio::FFmpegAACDecoder::InitInternal(txliteav::AudioFrame const&) in TXLiteAVSDK_Smart(ffmpeg_aac_decoder.o)
  "_qc_av_malloc", referenced from:
      txliteav::audio::AudioFFmpeg::Open(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in TXLiteAVSDK_Smart(audio_ffmpeg.o)
      txliteav::audio::FFmpegAACDecoder::InitInternal(txliteav::AudioFrame const&) in TXLiteAVSDK_Smart(ffmpeg_aac_decoder.o)
  "_qc_swr_get_delay", referenced from:
      txliteav::audio::FFmpegResampler::ResampleInternal(txliteav::AudioFrame*, txliteav::AudioFrame*) in TXLiteAVSDK_Smart(audio_ffmpeg_resampler.o)
      txliteav::audio::FFmpegAACDecoder::ConvertAudioFormat(txliteav::AudioFrame&) in TXLiteAVSDK_Smart(ffmpeg_aac_decoder.o)
  "_qc_av_packet_free", referenced from:
      txliteav::audio::AudioFFmpeg::Release() in TXLiteAVSDK_Smart(audio_ffmpeg.o)
      txliteav::audio::FFmpegAACDecoder::UnInitInternal() in TXLiteAVSDK_Smart(ffmpeg_aac_decoder.o)
  "_qc_av_frame_free", referenced from:
      txliteav::audio::AudioFFmpeg::Release() in TXLiteAVSDK_Smart(audio_ffmpeg.o)
      txliteav::audio::FFmpegAACDecoder::UnInitInternal() in TXLiteAVSDK_Smart(ffmpeg_aac_decoder.o)
  "_qc_avformat_free_context", referenced from:
      txliteav::audio::AudioFFmpeg::Open(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in TXLiteAVSDK_Smart(audio_ffmpeg.o)
      txliteav::audio::FFmpegAACDecoder::UnInitInternal() in TXLiteAVSDK_Smart(ffmpeg_aac_decoder.o)
  "_qc_av_get_default_channel_layout", referenced from:
      txliteav::audio::FFmpegResampler::ResampleInternal(txliteav::AudioFrame*, txliteav::AudioFrame*) in TXLiteAVSDK_Smart(audio_ffmpeg_resampler.o)
      txliteav::audio::AudioFFmpeg::InitResampler() in TXLiteAVSDK_Smart(audio_ffmpeg.o)
      txliteav::audio::FFmpegAACDecoder::ConvertAudioFormat(txliteav::AudioFrame&) in TXLiteAVSDK_Smart(ffmpeg_aac_decoder.o)
  "_qc_swr_init", referenced from:
      txliteav::audio::FFmpegResampler::ResampleInternal(txliteav::AudioFrame*, txliteav::AudioFrame*) in TXLiteAVSDK_Smart(audio_ffmpeg_resampler.o)
      txliteav::audio::AudioFFmpeg::InitResampler() in TXLiteAVSDK_Smart(audio_ffmpeg.o)
      txliteav::audio::FFmpegAACDecoder::ConvertAudioFormat(txliteav::AudioFrame&) in TXLiteAVSDK_Smart(ffmpeg_aac_decoder.o)
  "_qc_av_find_best_stream", referenced from:
      txliteav::audio::AudioFFmpeg::Open(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in TXLiteAVSDK_Smart(audio_ffmpeg.o)
  "_qc_av_init_packet", referenced from:
      txliteav::audio::AudioFFmpeg::Open(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in TXLiteAVSDK_Smart(audio_ffmpeg.o)
      txliteav::audio::FFmpegAACDecoder::InitInternal(txliteav::AudioFrame const&) in TXLiteAVSDK_Smart(ffmpeg_aac_decoder.o)
  "_qc_swr_alloc_set_opts", referenced from:
      txliteav::audio::FFmpegResampler::ResampleInternal(txliteav::AudioFrame*, txliteav::AudioFrame*) in TXLiteAVSDK_Smart(audio_ffmpeg_resampler.o)
      txliteav::audio::AudioFFmpeg::InitResampler() in TXLiteAVSDK_Smart(audio_ffmpeg.o)
      txliteav::audio::FFmpegAACDecoder::ConvertAudioFormat(txliteav::AudioFrame&) in TXLiteAVSDK_Smart(ffmpeg_aac_decoder.o)
  "_qc_av_rescale_rnd", referenced from:
      txliteav::audio::FFmpegResampler::ResampleInternal(txliteav::AudioFrame*, txliteav::AudioFrame*) in TXLiteAVSDK_Smart(audio_ffmpeg_resampler.o)
      txliteav::audio::FFmpegAACDecoder::ConvertAudioFormat(txliteav::AudioFrame&) in TXLiteAVSDK_Smart(ffmpeg_aac_decoder.o)
  "_qc_avcodec_open2", referenced from:
      txliteav::audio::AudioFFmpeg::Open(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in TXLiteAVSDK_Smart(audio_ffmpeg.o)
      txliteav::audio::FFmpegAACDecoder::InitInternal(txliteav::AudioFrame const&) in TXLiteAVSDK_Smart(ffmpeg_aac_decoder.o)
  "_qc_swr_free", referenced from:
      txliteav::audio::FFmpegResampler::~FFmpegResampler() in TXLiteAVSDK_Smart(audio_ffmpeg_resampler.o)
      txliteav::audio::AudioFFmpeg::Release() in TXLiteAVSDK_Smart(audio_ffmpeg.o)
      txliteav::audio::FFmpegAACDecoder::UnInitInternal() in TXLiteAVSDK_Smart(ffmpeg_aac_decoder.o)
  "_qc_avcodec_find_decoder", referenced from:
      txliteav::audio::FFmpegAACDecoder::InitInternal(txliteav::AudioFrame const&) in TXLiteAVSDK_Smart(ffmpeg_aac_decoder.o)
  "_qc_av_samples_get_buffer_size", referenced from:
      txliteav::audio::FFmpegResampler::ResampleInternal(txliteav::AudioFrame*, txliteav::AudioFrame*) in TXLiteAVSDK_Smart(audio_ffmpeg_resampler.o)
      txliteav::audio::AudioFFmpeg::ResampleAndOutputPCM() in TXLiteAVSDK_Smart(audio_ffmpeg.o)
  "_qc_avformat_find_stream_info", referenced from:
      txliteav::audio::AudioFFmpeg::Open(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in TXLiteAVSDK_Smart(audio_ffmpeg.o)
  "_qc_av_seek_frame", referenced from:
      txliteav::audio::AudioFFmpeg::SeekTo(long long) in TXLiteAVSDK_Smart(audio_ffmpeg.o)
  "_qc_avformat_close_input", referenced from:
      txliteav::audio::AudioFFmpeg::Release() in TXLiteAVSDK_Smart(audio_ffmpeg.o)
  "_qc_swr_convert", referenced from:
      txliteav::audio::FFmpegResampler::ResampleInternal(txliteav::AudioFrame*, txliteav::AudioFrame*) in TXLiteAVSDK_Smart(audio_ffmpeg_resampler.o)
      txliteav::audio::AudioFFmpeg::ResampleAndOutputPCM() in TXLiteAVSDK_Smart(audio_ffmpeg.o)
      txliteav::audio::FFmpegAACDecoder::ConvertAudioFormat(txliteav::AudioFrame&) in TXLiteAVSDK_Smart(ffmpeg_aac_decoder.o)
  "_qc_av_packet_unref", referenced from:
      txliteav::audio::AudioFFmpeg::Decode() in TXLiteAVSDK_Smart(audio_ffmpeg.o)
  "_qc_avformat_open_input", referenced from:
      txliteav::audio::AudioFFmpeg::Open(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in TXLiteAVSDK_Smart(audio_ffmpeg.o)
ld: symbol(s) not found for architecture arm64
wzso commented 3 years ago

32个 Undefined symbol

Undefined symbol: _qc_avcodec_free_context

Undefined symbol: _qc_avcodec_flush_buffers

Undefined symbol: _qc_avcodec_decode_audio4

Undefined symbol: _qc_avcodec_alloc_context3

Undefined symbol: _qc_av_read_frame

Undefined symbol: _qc_av_frame_alloc

Undefined symbol: _qc_avformat_alloc_context

Undefined symbol: _qc_av_strerror

Undefined symbol: _qc_avcodec_close

Undefined symbol: _qc_av_rescale_q

Undefined symbol: _qc_av_register_all

Undefined symbol: _qc_av_malloc

Undefined symbol: _qc_swr_get_delay

Undefined symbol: _qc_av_packet_free

Undefined symbol: _qc_av_frame_free

Undefined symbol: _qc_avformat_free_context

Undefined symbol: _qc_av_get_default_channel_layout

Undefined symbol: _qc_swr_init

Undefined symbol: _qc_av_find_best_stream

Undefined symbol: _qc_av_init_packet

Undefined symbol: _qc_swr_alloc_set_opts

Undefined symbol: _qc_av_rescale_rnd

Undefined symbol: _qc_avcodec_open2

Undefined symbol: _qc_swr_free

Undefined symbol: _qc_avcodec_find_decoder

Undefined symbol: _qc_av_samples_get_buffer_size

Undefined symbol: _qc_avformat_find_stream_info

Undefined symbol: _qc_av_seek_frame

Undefined symbol: _qc_avformat_close_input

Undefined symbol: _qc_swr_convert

Undefined symbol: _qc_av_packet_unref

Undefined symbol: _qc_avformat_open_input
wzso commented 3 years ago

与此同时,7.2.8940 版本不会报错。

emosiony commented 3 years ago

同问,请问有解决方式了吗

wzso commented 3 years ago

@emosiony 暂时不升级库,保持在 7.2.8946 版本。感觉这 Issue 提了也没人搭理,真是垃圾。

emosiony commented 3 years ago

这是别人的已经集成的,我的刚准备集成SDK,但是报错是一样的。

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: Benjamin Wen <notifications@github.com> 发送时间: 2021年1月5日 09:41 收件人: tencentyun/MLVBSDK <MLVBSDK@noreply.github.com> 抄送: Emosiony <1403660461@qq.com>, Mention <mention@noreply.github.com> 主题: 回复:[tencentyun/MLVBSDK] 【iOS】-【TXLiteAVSDK_Smart-8.0.9644】【编译报错 Undefined symbol】 (#117)

emosiony commented 3 years ago

@benjamin-wen 好的,谢谢

emosiony commented 3 years ago

@benjamin-wen 手动添加路径试一下(我的是 pod) 1、 Other link Flags 添加路径 ${PODS_ROOT}/TXLiteAVSDK_Smart/TXLiteAVSDK_Smart/SDK/TXLiteAVSDK_Smart.framework/TXLiteAVSDK_Smart 2、Franework Search Paths 添加路径: "${PODS_ROOT}/TXLiteAVSDK_Smart/TXLiteAVSDK_Smart/SDK" 3、Header Search Paths 添加路径: ${PODS_ROOT}/TXLiteAVSDK_Smart/TXLiteAVSDK_Smart/SDK/TXLiteAVSDK_Smart.framework/Headers/

xialisuper commented 3 years ago

与此同时,7.2.8940 版本不会报错。

真蠢这个版本, 折腾了我2天. 试了各种办法都是32个报错. 最后直接pod 7.2了. 总算能跑起来了