Giter VIP home page Giter VIP logo

opus-ios's Issues

Project not buildable in Sierra / Xcode 8?

Hey Chris!

I tried to build OpusKit using the latest iOS stable release SDK (10.1) and unfortunately I get errors when running the build script.

Using opus-1.1.3.tar.gz
Building without ccache
checking whether make supports nested variables... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking build system type... x86_64-apple-darwin16.1.0
checking host system type... x86_64-apple-darwin16.1.0
checking how to print strings... printf
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/Users/stelabouras/Development/OpusKit/Submodules/Opus-iOS/build/src/opus-1.1.3':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details

config.log says that instead of gcc the system uses clang and it cannot recognize some commands:

clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files
configure:3534: $? = 1
configure:3523: gcc -qversion >&5
clang: error: unknown argument: '-qversion'

Any ideas?

Error using newest OPUS version

When using Opus 1.1.2 I am getting the following error while running the script:

#error Cannot build libopus with -ffast-math unless FLOAT_APPROX is defi...
 ^
1 error generated.
1 error generated.
1 error generated.
make[2]: *** [celt/celt_decoder.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [celt/celt.lo] Error 1
make[2]: *** [celt/bands.lo] Error 1
1 error generated.
make[2]: *** [celt/celt_encoder.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Build version 1.5.1 not working

please help to build 1.5.1

@chrisballinger please can you help me?

I have problem with assembler files:

CC       silk/arm/LPC_inv_pred_gain_neon_intr.lo
  CC       silk/arm/NSQ_del_dec_neon_intr.lo
  CC       silk/arm/NSQ_neon.lo
  CPPAS    celt/arm/celt_pitch_xcorr_arm-gnu.lo
celt/arm/celt_pitch_xcorr_arm-gnu.S:1:5: error: unknown directive
    .syntax unified
    ^
celt/arm/celt_pitch_xcorr_arm-gnu.S:2:1: error: unexpected token at start of statement
@ Copyright (c) 2007-2008 CSIRO
^
celt/arm/celt_pitch_xcorr_arm-gnu.S:3:1: error: unexpected token at start of statement
@ Copyright (c) 2007-2009 Xiph.Org Foundation
^
celt/arm/celt_pitch_xcorr_arm-gnu.S:4:1: error: unexpected token at start of statement
@ Copyright (c) 2013 Parrot
^
celt/arm/celt_pitch_xcorr_arm-gnu.S:5:1: error: unexpected token at start of statement
@ Written by Aurélien Zanelli

compilation error (not an object file)

Hi all,

I have been trying to compile Opus for iOS on Monterey 12.2.1 (Intel):

I have created /build/src folder and place the latest opus1.3.1 tar ball into it, changd the SDK issue and ran the build-libopus.sh script – so far it looked fine except that it eventually bails out with the following:

CCLD libopus.la
error: /opt/local/bin/ranlib: library member: .libs/libopus.a(bands.o) is not an object file (not allowed in a library with multiple architectures)
error: /opt/local/bin/ranlib: library member: .libs/libopus.a(celt.o) is not an object file (not allowed in a library with multiple architectures)
error: /opt/local/bin/ranlib: library member: .libs/libopus.a(celt_encoder.o) is not an object file (not allowed in a library with multiple architectures)
error: /opt/local/bin/ranlib: library member: .libs/libopus.a(celt_decoder.o) is not an object file (not allowed in a library with multiple architectures)

etc. for further object files.

Can anyone help to resolve this issue ?

Thanks in advance,
best

Alex

Script Fails With Configure Error

This is what I get on 2 separate machines running 10.12.16 one running Xcode 9 and the other running Xcode 8.3.3:

$ ./build-libopus.sh 
Downloading opus-1.1.3.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   453  100   453    0     0   2189      0 --:--:-- --:--:-- --:--:--  2199
100   435  100   435    0     0   1125      0 --:--:-- --:--:-- --:--:--  6126
100  955k  100  955k    0     0  1101k      0 --:--:-- --:--:-- --:--:-- 1101k
Using opus-1.1.3.tar.gz
Building without ccache
checking whether make supports nested variables... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for x86_64-apple-darwin-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking build system type... x86_64-apple-darwin16.7.0
checking host system type... x86_64-apple-darwin
checking how to print strings... printf
checking for style of include used by make... GNU
checking for x86_64-apple-darwin-gcc... no
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/Users/aaron/Downloads/Opus-iOS-master/build/src/opus-1.1.3':
configure: error: C compiler cannot create executables
See `config.log' for more details
$ open -e config.log
The file /Users/aaron/Downloads/Opus-iOS-master/config.log does not exist.
$

build steps on Xcode swift project

please can any one help me to build OPUS library to my project, I'm using swift 4,
I need to convert any type of audio to opus codec.. any body can help me please ?

Update to work with OSX project in Xcode 7

Hi.
I noticed that Xcode 7 is pickier than Xcode 6 and requires that a lib used in an OSX project be tagged properly using the -mmacosx-version-min=XX flag.

I am currently trying to update the script to do this properly, but I am not sure that I have the skills required. If someone beats me to it, please share your results.

Sincerely
Daniel Armyr

cannot run C compiled programs in i386 x86_64

i have successfully implemented the library files given by you.
But when compiling bash build-libopus.sh, it shows Cannot Run C Compiled programs.

checking whether the C compiler works... no
configure: error: in /Users/Documents/Opus-iOS-master/build/src/opus-1.1.4': configure: error: C compiler cannot create executables See config.log' for more details.

And when i remove i386 x86_64 in build-libopus.sh line Number 50. it successfully build the build-libopus.sh.

what is the reason behind the ARCHS=i386 x86_64 giving cannot run c compiled programs error?

build error

Using opus-1.1.3.tar.gz
tar: list/Opus-iOS/build/src: Not found in archive
tar: Error exit delayed from previous errors.

i do not change anything

Reference questions

Why are all the files I download in red? But the downloaded file contains the opus.framework. Did you package it? I need to develop iOS platform can be directly referenced?

It seems doesn't support bitcode

I build a static lib using this script. And I use otools to check if the lib support bitcode. The result of otools is that it doesn't support bitcode. Could you please let the build script support bitcode. Thank you.

Apple M1 CPU compilation issue

Hi.

I have modify you r script and use it to compile OPUS for OSX.
It has been compiled without any issues for x86_64 but when i try to compile for arm64 (new M1 CPU) there are some issue.

ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd, missing required architecture arm64 in file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd
ld: dynamic main executables must link with libSystem.dylib for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Any suggestion how to compile it for M1 arm64?

build-libopus-osx.txt

current version fails

The current release of the build script (in context with the current XCode release etc.) builds the lib and it can be included into the app just fine. However, it is not possible to access the symbols although /usr/bin/nm libopus.a shows them all – we compared with two independent audio developers. Can anyone confirm ? Thanks !

how to support bitcode?

hi, my project has to enable bitcode, but opus.framework doesn't.
I try to add "-fembed-bitcode" in line 110, but it doesn't work.
EXTRA_CFLAGS="-arch ${ARCH} -fembed-bitcode"

Script not working on MacOSX Yosemite

Hi Chris I am trying to build opus Library for 64 bit support. Currently I have Xcode6 installed on my system whenever I run this script it gives me these errors
Using opus-1.1.tar.gz
Building without ccache
checking whether make supports nested variables... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking build system type... x86_64-apple-darwin14.0.0
checking host system type... x86_64-apple-darwin14.0.0
checking how to print strings... printf
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in /Users/anshul/Opus-iOS-master/build/src/opus-1.1': configure: error: C compiler cannot create executables Seeconfig.log' for more details

Here is the output of my gcc --version command
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix

Please guide me whats going wrong.

Thanks

C compiler cannot create executables in Xcode 9.4.1

when compiling bash build-libopus.sh, it shows Cannot Run C Compiled programs.

configure: error: in `/Users/mac/Downloads/OpusKit-master/Submodules/Opus-iOS/build/src/opus-1.1.3':
configure: error: C compiler cannot create executables

G729 annexb cases not handled in this library.

When callee is setting G729 annexB = no, then he is sending Comfort Noise packets for silence packets. After Integrating this library in my Dialler, the Comfort Noise packets are not handled.

Decode fails with -4 OPUS_INVALID_PACKET

Using the 2 second file from https://people.xiph.org/~giles/2012/opus/ and code attached below, all I get is -4. Am I doing something wrong here? I suppose that it might be due to the offset for header data and all that but how can I remove that from my data?

let url = Bundle.main.url(forResource: "detodos", withExtension: "opus")
        print(url) //prints path correctly
        
        var bytes = [UInt8]()
        
        if let data = NSData(contentsOf: url!) {
            var buffer = [UInt8](repeating: 0, count: data.length)
            data.getBytes(&buffer, length: data.length)
            bytes = buffer
            
            var errorDeCr: Int32 = 0
            let dd = opus_decoder_create(48000, 1, &errorDeCr)
            print(errorDeCr)
            
            var sampleBuffer = [opus_int16](repeating: 0, count: data.length)
            print(opus_int32(bytes.count)) //6270

            let w = opus_decode(dd!, bytes, opus_int32(bytes.count), &sampleBuffer, opus_int32(5760), opus_int32(0))

            print(sampleBuffer)   // 0 every time
            print(w)    //-4 every time
            //-4 = OPUS_INVALID_PACKET
            
            print(errorDeCr)
            
        }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.