Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Libs Build Error for x86_64 Arch #37

Open
ForGuru opened this issue Jul 5, 2019 · 2 comments
Open

Libs Build Error for x86_64 Arch #37

ForGuru opened this issue Jul 5, 2019 · 2 comments

Comments

@ForGuru
Copy link

ForGuru commented Jul 5, 2019

Version

3.4.1

File / Feature

Build Libraries

Expected behaviour

{what should happen}

Actual behaviour

{what happens}

Stacktrace / Error message

aconfigure:2527: checking build system type
aconfigure:2541: result: x86_64-apple-darwin18.6.0
aconfigure:2561: checking host system type
aconfigure:2574: result: x86_64-apple-darwin_ios
aconfigure:2594: checking target system type
aconfigure:2607: result: x86_64-apple-darwin_ios
aconfigure:2651: checking for x86_64-apple-darwin_ios-gcc
aconfigure:2678: result: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/../../../Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
aconfigure:2947: checking for C compiler version
aconfigure:2956: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/../../../Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --version >&5
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/../../../Toolchains/XcodeDefault.xctoolchain/usr/bin
aconfigure:2967: $? = 0
aconfigure:2956: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/../../../Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v >&5
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/../../../Toolchains/XcodeDefault.xctoolchain/usr/bin
aconfigure:2967: $? = 0
aconfigure:2956: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/../../../Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -V >&5
clang: error: unsupported option '-V -Wno-atomic-implicit-seq-cst'
clang: error: no input files
aconfigure:2967: $? = 1
aconfigure:2956: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/../../../Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -qversion >&5
clang: error: unknown argument '-qversion', did you mean '--version'?
clang: error: no input files
aconfigure:2967: $? = 1
aconfigure:2987: checking whether the C compiler works
aconfigure:3009: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/../../../Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -O2 -m32 -mios-simulator-version-min=9.0 -fembed-bitcode -miphoneos-version-min=9.0 -DPJ_SDK_NAME=""iPhoneSimulator12.2.sdk"" -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk -O2 -m32 -mios-simulator-version-min=9.0 -Wl,-no_compact_unwind -lstdc++ -miphoneos-version-min=9.0 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk -framework AudioToolbox -framework Foundation conftest.c >&5
ld: -no_compact_unwind and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together
clang: error: linker command failed with exit code 1 (use -v to see invocation)
aconfigure:3013: $? = 1
aconfigure:3051: result: no
aconfigure: failed program was:

Other info

{anything else that might be related/useful}

@rcorrie
Copy link

rcorrie commented Aug 21, 2019

I am seeing the same issue. I am building using the vialerbuild script.

I notice that the COLLECT for x86_64 output is empty. Also the generated Framework is only 80mb in size.

Looks to me like it is not able to build for x86_64.

@rcorrie
Copy link

rcorrie commented Aug 21, 2019

@ForGuru I managed to solve this issue by making the following change in the vialerbuild script

function configure_i386 () {
    echo "Configure for i386"
    export DEVPATH=$XCODE_SIMULATOR_DEV_PATH
    export CFLAGS="-O2 -m32 -mios-simulator-version-min=$MIN_IOS_VERSION"
-   export LDFLAGS="-O2 -m32 -mios-simulator-version-min=$MIN_IOS_VERSION -Wl,-no_compact_unwind"
+  export LDFLAGS="-O2 -m32 -mios-simulator-version-min=$MIN_IOS_VERSION -Wl"
}

function configure_x86_64 () {
    echo "Configure for x86_64"
    export DEVPATH=$XCODE_SIMULATOR_DEV_PATH
    export CFLAGS="-O2 -m32 -mios-simulator-version-min=$MIN_IOS_VERSION"
-   export LDFLAGS="-O2 -m32 -mios-simulator-version-min=$MIN_IOS_VERSION -Wl,-no_compact_unwind"
+   export LDFLAGS="-O2 -m32 -mios-simulator-version-min=$MIN_IOS_VERSION -Wl"
}

For some reason, the -no_compact_unwind flag will cause pjsip/src/configure-iphone script to fail thus the pjsip/src/build.mak file is never generated for the x86_64 and i386 architectures.

Make the changes above, rebuild the framework, link it to your project, clean and run. Hope it solves it for you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants