Closed faiziakbr closed 3 years ago
My understanding (as a non-iOS developer) is that you can ask the compiler to include bitcode with the -fembed-bitcode
argument.
I've tried adding this to the end of the ARCHFLAGS_DEV
and ARCHFLAGS_SIM
definitions in Makefile.ios
within the Rubber Band source tree, and I can confirm that compilation succeeds, although I haven't tested whether the resulting library still works!
Provisionally I'm adding this argument in the repo - would appreciate any views from other readers on the merits of it.
I am writing C++ to C wrapper for rubberband to use it in my IOS project. I am getting BitCode error.
librubberband.a(rubberband-c.dev.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
This is my code
If disable the bitCode i get 27 errors and 1 warning.
Warning: ignoring file /Users/confu002/Documents/Ios/RBTest2/RB/Lib/librubberband.sim.a, missing required architecture arm64 in file /Users/confu002/Documents/Ios/RBTest2/RB/Lib/librubberband.sim.a (2 slices)
Errors: Undefined symbols for architecture arm64: "_vDSP_destroy_fftsetup", referenced from: RubberBand::FFTs::D_VDSP::~D_VDSP() in librubberband.a(FFT.dev.o) "_vDSP_destroy_fftsetupD", referenced from: RubberBand::FFTs::D_VDSP::~D_VDSP() in librubberband.a(FFT.dev.o) "_vvlogf", referenced from: RubberBand::FFTs::D_VDSP::inverseCepstral(float const, float) in librubberband.a(FFT.dev.o) "_vvsincosf", referenced from: RubberBand::FFTs::D_VDSP::inversePolar(float const, float const, float) in librubberband.a(FFT.dev.o) "_vvlog", referenced from: RubberBand::FFTs::D_VDSP::inverseCepstral(double const, double) in librubberband.a(FFT.dev.o) "_vDSP_vclr", referenced from: RubberBand::RingBuffer::zero(int) in librubberband.a(StretcherImpl.dev.o)
RubberBand::RubberBandStretcher::Impl::study(float const const, unsigned long, bool) in librubberband.a(StretcherImpl.dev.o)
RubberBand::RubberBandStretcher::Impl::synthesiseChunk(unsigned long, unsigned long) in librubberband.a(StretcherProcess.dev.o)
RubberBand::RubberBandStretcher::Impl::writeChunk(unsigned long, unsigned long, bool) in librubberband.a(StretcherProcess.dev.o)
RubberBand::RubberBandStretcher::Impl::ChannelData::construct(std::1::set<unsigned long, std::1::less, std::__1::allocator > const&, unsigned long, unsigned long, unsigned long) in librubberband.a(StretcherChannelData.dev.o)
RubberBand::RubberBandStretcher::Impl::ChannelData::setSizes(unsigned long, unsigned long) in librubberband.a(StretcherChannelData.dev.o)
float RubberBand::reallocate_and_zero(float, unsigned long, unsigned long) in librubberband.a(StretcherChannelData.dev.o)
...
"_vDSP_ctoz", referenced from:
RubberBand::FFTs::D_VDSP::forward(float const, float, float) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::forwardInterleaved(float const, float) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::forwardPolar(float const, float, float) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::forwardMagnitude(float const, float) in librubberband.a(FFT.dev.o)
"_vDSP_ztocD", referenced from:
RubberBand::FFTs::D_VDSP::inverse(double const, double const, double) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::inverseInterleaved(double const, double) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::inversePolar(double const, double const, double) in librubberband.a(FFT.dev.o)
"_vDSP_vsdiv", referenced from:
RubberBand::FFTs::D_VDSP::forward(float const, float, float) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::forwardMagnitude(float const, float) in librubberband.a(FFT.dev.o)
"_vDSP_ztoc", referenced from:
RubberBand::FFTs::D_VDSP::inverse(float const, float const, float) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::inverseInterleaved(float const, float) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::inversePolar(float const, float const, float) in librubberband.a(FFT.dev.o)
"_vvatan2", referenced from:
RubberBand::FFTs::D_VDSP::forwardPolar(double const, double, double) in librubberband.a(FFT.dev.o)
"_vDSP_zvmagsD", referenced from:
RubberBand::FFTs::D_VDSP::forwardPolar(double const, double, double) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::forwardMagnitude(double const, double) in librubberband.a(FFT.dev.o)
"_vDSP_vclrD", referenced from:
RubberBand::RubberBandStretcher::Impl::calculateIncrements(unsigned long&, unsigned long&, bool&) in librubberband.a(StretcherProcess.dev.o)
void RubberBand::RubberBandStretcher::Impl::cutShiftAndFold<double, float>(double, int, float, RubberBand::Window) in librubberband.a(StretcherProcess.dev.o)
RubberBand::MovingMedian::MovingMedian(int, float) in librubberband.a(CompoundAudioCurve.dev.o)
RubberBand::MovingMedian::reset() in librubberband.a(CompoundAudioCurve.dev.o)
RubberBand::RubberBandStretcher::Impl::ChannelData::construct(std::1::set<unsigned long, std::1::less, std::__1::allocator > const&, unsigned long, unsigned long, unsigned long) in librubberband.a(StretcherChannelData.dev.o)
RubberBand::RubberBandStretcher::Impl::ChannelData::setSizes(unsigned long, unsigned long) in librubberband.a(StretcherChannelData.dev.o)
double RubberBand::reallocate_and_zero(double, unsigned long, unsigned long) in librubberband.a(StretcherChannelData.dev.o)
...
"_vDSP_vsdivD", referenced from:
RubberBand::FFTs::D_VDSP::forward(double const, double, double) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::forwardMagnitude(double const, double) in librubberband.a(FFT.dev.o)
"_vDSP_ctozD", referenced from:
RubberBand::FFTs::D_VDSP::forward(double const, double, double) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::forwardInterleaved(double const, double) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::forwardPolar(double const, double, double) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::forwardMagnitude(double const, double) in librubberband.a(FFT.dev.o)
"_vDSP_create_fftsetupD", referenced from:
RubberBand::FFTs::D_VDSP::initDouble() in librubberband.a(FFT.dev.o)
"_vDSP_vspdp", referenced from:
void RubberBand::RubberBandStretcher::Impl::cutShiftAndFold<double, float>(double, int, float, RubberBand::Window) in librubberband.a(StretcherProcess.dev.o)
RubberBand::SpectralDifferenceAudioCurve::processFloat(float const, int) in librubberband.a(SpectralDifferenceAudioCurve.dev.o)
RubberBand::PercussiveAudioCurve::processFloat(float const, int) in librubberband.a(PercussiveAudioCurve.dev.o)
"_vvatan2f", referenced from:
RubberBand::FFTs::D_VDSP::forwardPolar(float const, float, float) in librubberband.a(FFT.dev.o)
"_vDSP_fft_zriptD", referenced from:
RubberBand::FFTs::D_VDSP::forward(double const, double, double) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::forwardInterleaved(double const, double) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::forwardPolar(double const, double, double) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::forwardMagnitude(double const, double) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::inverse(double const, double const, double) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::inverseInterleaved(double const, double) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::inversePolar(double const, double const, double) in librubberband.a(FFT.dev.o)
...
"_vDSP_create_fftsetup", referenced from:
RubberBand::FFTs::D_VDSP::initFloat() in librubberband.a(FFT.dev.o)
"_vDSP_zvmags", referenced from:
RubberBand::FFTs::D_VDSP::forwardPolar(float const, float, float) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::forwardMagnitude(float const, float) in librubberband.a(FFT.dev.o)
"_vDSP_vdpsp", referenced from:
RubberBand::RubberBandStretcher::Impl::synthesiseChunk(unsigned long, unsigned long) in librubberband.a(StretcherProcess.dev.o)
"_vvsincos", referenced from:
RubberBand::FFTs::D_VDSP::inversePolar(double const, double const, double) in librubberband.a(FFT.dev.o)
"_vvexp", referenced from:
void RubberBand::v_exp(double, int) in librubberband.a(StretcherProcess.dev.o)
"_vvsqrtf", referenced from:
RubberBand::FFTs::D_VDSP::forwardPolar(float const, float, float) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::forwardMagnitude(float const, float) in librubberband.a(FFT.dev.o)
"_vvsqrt", referenced from:
void RubberBand::v_sqrt(double, int) in librubberband.a(SpectralDifferenceAudioCurve.dev.o)
RubberBand::FFTs::D_VDSP::forwardPolar(double const, double, double) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::forwardMagnitude(double const, double) in librubberband.a(FFT.dev.o)
"_vDSP_fft_zript", referenced from:
RubberBand::FFTs::D_VDSP::forward(float const, float, float) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::forwardInterleaved(float const, float) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::forwardPolar(float const, float, float) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::forwardMagnitude(float const, float) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::inverse(float const, float const, float) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::inverseInterleaved(float const, float) in librubberband.a(FFT.dev.o)
RubberBand::FFTs::D_VDSP::inversePolar(float const, float const, float) in librubberband.a(FFT.dev.o)
...
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any clue how i can solve this issue?