quiet / QuietModemKit

iOS framework for the Quiet Modem (data over sound)
BSD 3-Clause "New" or "Revised" License
451 stars 50 forks source link

Build Error: clang: error: unknown argument: '-=' #28

Open cmassoudi opened 1 year ago

cmassoudi commented 1 year ago

hey @brian-armstrong, I'm running into an error while trying to build QM. I get the following error while running a carthage update command:

Run Build Command(s):/Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile cmTC_2607f/fast && /Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/cmTC_2607f.dir/build.make CMakeFiles/cmTC_2607f.dir/build
Building C object CMakeFiles/cmTC_2607f.dir/INT.c.o
/usr/bin/clang   -=  -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.0.sdk  -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.0.sdk -MD -MT CMakeFiles/cmTC_2607f.dir/INT.c.o -MF CMakeFiles/cmTC_2607f.dir/INT.c.o.d -o CMakeFiles/cmTC_2607f.dir/INT.c.o -c /Users/cmassoudi/Library/Caches/org.carthage.CarthageKit/DerivedData/14.0.1_14A400/QuietModemKit/v0.3.2/Build/Intermediates.noindex/ArchiveIntermediates/QuietModemKit/BuildProductsPath/Release-iphoneos/jansson/CMakeFiles/CheckTypeSize/INT.c
clang: error: unknown argument: '-='

That unknown arg error (clang: error: unknown argument: '-=') made it seem like some env variables might be missing. I took a peek at the apple.toolchain.make and I see the cmake flags have an arg APPLE_VERSION_FLAG- I think that's the culprit.

apple.toolchain.make L195

set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${APPLE_VERSION_FLAG} ${BITCODE_FLAG} -isysroot ${CMAKE_OSX_SYSROOT}" CACHE STRING "")

Any help would be much appreciated, thanks! -Cam

cmassoudi commented 1 year ago

I was able to get this to work by removing the APPLE_VERSION_FLAG args from the toolchain make file.