Skip to content

clang error compiling for iOS #2617

@MartinZikmund

Description

@MartinZikmund

Describe the bug

Trying to build an iOS app using Microsoft.Graph library fails with the following:

clang exited with code 1:
/Users/mzikmund/Library/Caches/Xamarin/mtbs/builds/iOSTabbedApp3/c545e9e939b879654bbf76c0344987a782d645ee60de988037adf42061544d17/obj/Debug/net8.0-ios/iossimulator-arm64/nativelibraries/aot-output/arm64/Microsoft.Graph.dll.s:73678288:1: error: addend too big for relocation
adrp x16, mono_aot_Microsoft_Graph_got@PAGE+8388608
^
/Users/mzikmund/Library/Caches/Xamarin/mtbs/builds/iOSTabbedApp3/c545e9e939b879654bbf76c0344987a782d645ee60de988037adf42061544d17/obj/Debug/net8.0-ios/iossimulator-arm64/nativelibraries/aot-output/arm64/Microsoft.Graph.dll.s:73678293:1: error: addend too big for relocation
adrp x16, mono_aot_Microsoft_Graph_got@PAGE+8388608
^
/Users/mzikmund/Library/Caches/Xamarin/mtbs/builds/iOSTabbedApp3/c545e9e939b879654bbf76c0344987a782d645ee60de988037adf42061544d17/obj/Debug/net8.0-ios/iossimulator-arm64/nativelibraries/aot-output/arm64/Microsoft.Graph.dll.s:73678332:1: error: addend too big for relocation
adrp x16, mono_aot_Microsoft_Graph_got@PAGE+8388608
^

Expected behavior

Should not error out.

How to reproduce

Can be easily reproduced on a blank iOS app that references and uses Microsoft Graph - see this repro:

iOSTabbedApp3.zip

  1. Open the .sln in VS2022
  2. Connect to remote Mac (mine is a M2-based Mac)
  3. Try to run the on an iOS Simulator

SDK Version

5.56.0

Latest version known to work for scenario above?

N/A

Known Workarounds

None

Debug output

Click to expand log ```
</details>


### Configuration

Microsoft Visual Studio Enterprise 2022
Version 17.11.0
VisualStudio.17.Release/17.11.0+35208.52

Windows 11 26120
macOS Sonoma 14.5 9 (Apple M2)

### Other information

_No response_

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions