TelegramMessenger / Telegram-iOS

Telegram-iOS
6.4k stars 1.68k forks source link

xcode 15 run error #1235

Open alirezarabiei7239 opened 1 year ago

alirezarabiei7239 commented 1 year ago

Description after successful build from terminal when i run the project i got this error :

Unable to discover swiftc command line tool info: Could not parse Swift versions from: Swift/ErrorType.swift:200: Fatal error: Error raised at top level: Error Domain=NSCocoaErrorDomain Code=4 "The file “swiftc” doesn’t exist." UserInfo= {NSFilePath=swiftc}

Environment Device: simulator

Xcode version: 15.0

iOS version: 17.0

App version: 10.0.3 and 10.1.1

271825126-da2f2caa-9e7f-4c05-883a-524a57e9e6f9
w1217358955 commented 1 year ago

MacOS sonoma 14.0 Xcode version: 15.0 iOS version: 17.0

same error

ali-fareed commented 1 year ago

What does xcode-select -p print?

w1217358955 commented 1 year ago

What does xcode-select -p print?

/Desktop/xcode/Xcode15.0.app/Contents/Developer

alirezarabiei7239 commented 1 year ago

/Applications/Xcode.app/Contents/Developer

williamleecn commented 1 year ago

clean all build file:

  1. run python3 build-system/Make/Make.py clean
  2. deltetelegram-bazel-cache

rebuild bazel

but build third-party/libjxl occur error:

-- Performing Test JXL_HWY_DISABLED_TARGETS_FORCED
-- Performing Test JXL_HWY_DISABLED_TARGETS_FORCED - Failed
-- Compiled IDs C:AppleClang, C++:AppleClang
-- Disabled AVX512 (set JPEGXL_ENABLE_AVX512 to enable it)
-- Disabled AVX512_ZEN4 (set JPEGXL_ENABLE_AVX512_ZEN4 to enable it)
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Performing Test ATOMICS_LOCK_FREE_INSTRUCTIONS
-- Performing Test ATOMICS_LOCK_FREE_INSTRUCTIONS - Failed
-- Performing Test ATOMICS_IN_LIBRARY
-- Performing Test ATOMICS_IN_LIBRARY - Failed
CMake Error at cmake/FindAtomics.cmake:49 (message):
  Neither lock free instructions nor -latomic found.
Call Stack (most recent call first):
  CMakeLists.txt:254 (find_package)
alirezarabiei7239 commented 1 year ago

@ali-fareed can you please help me ?

andy-sheng commented 1 year ago
  1. make sure your code base is up to date
  2. try git submodule update --recursive
  3. clean build file python3 build-system/Make/Make.py clean telegram-bazel-cache
  4. build again

In my case, I believe some outdated / bazel related submodules cause these errors.

imooccodejesse commented 11 months ago

I am encountering the same error. Has this been solved yet?

DhruvGovani commented 11 months ago

I am also facing this error. I have tried everything mentioned above. Nothing seems to be working.

infinigent-solutions commented 11 months ago

I'm also facing the same issue

315567599 commented 9 months ago

Nothing above working.

naguilarp commented 8 months ago

Worked for me after 10 days, just opening in the Xcode and changing Project Format to 14.0 for Pods and 15.0 to my app folder. Plus signing. So weird...but yeah, worked.

VinceJee commented 2 months ago

same error on macos 15, xcode 16

Tilak1028-st commented 2 months ago

same error on macos 15, Xcode 16

@ali-fareed can help you me please?

moonagic commented 2 months ago

I suspect that this issue originates from the external compilation system, and it will require the TG team to switch to the new version of Xcode to make some necessary modifications before it can run correctly.

hhfssg commented 1 month ago

same error on macos 15, Xcode 16

alirezarabiei7239 commented 1 month ago

3. telegram-bazel-cache

Worked for me after 10 days, just opening in the Xcode and changing Project Format to 14.0 for Pods and 15.0 to my app folder. Plus signing. So weird...but yeah, worked.

Hi, how should I do this ?