Skip to content

ld64.lld: error: relocation BRANCH26 is out of range: -165194492 is not in [-134217728, 134217727]; references _calloc #52767

Closed
@glandium

Description

@glandium

Building Firefox for arm64 macos with disabled optimizations and with lld fails with:

ld64.lld: error: relocation BRANCH26 is out of range: -165194492 is not in [-134217728, 134217727]; references _calloc
ld64.lld: error: relocation BRANCH26 is out of range: -165196704 is not in [-134217728, 134217727]; references _calloc
ld64.lld: error: relocation BRANCH26 is out of range: -165196676 is not in [-134217728, 134217727]; references _calloc
ld64.lld: error: relocation BRANCH26 is out of range: -165196144 is not in [-134217728, 134217727]; references _calloc
ld64.lld: error: relocation BRANCH26 is out of range: -165196116 is not in [-134217728, 134217727]; references _calloc
ld64.lld: error: relocation BRANCH26 is out of range: -165196088 is not in [-134217728, 134217727]; references _calloc
ld64.lld: error: relocation BRANCH26 is out of range: -165195984 is not in [-134217728, 134217727]; references _calloc
ld64.lld: error: relocation BRANCH26 is out of range: -165299108 is not in [-134217728, 134217727]; references _malloc
ld64.lld: error: relocation BRANCH26 is out of range: -165308144 is not in [-134217728, 134217727]; references _malloc
ld64.lld: error: relocation BRANCH26 is out of range: -165208212 is not in [-134217728, 134217727]; references _calloc
ld64.lld: error: relocation BRANCH26 is out of range: -165311620 is not in [-134217728, 134217727]; references _malloc

STR:

  • download https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/Fald_IyiRO-ljidFJwvZig/runs/0/artifacts/public/build/testcase.tar.zstd
  • tar --zstd -xf testcase.tar.zstd
  • cd testcase/toolkit/library/build
  • clang++ --sysroot /path/to/MacOSX11.0.sdk -F/path/to/MacOSX11.0.sdk/System/Library/PrivateFrameworks -mmacosx-version-min=11.0 -stdlib=libc++ --target=aarch64-apple-darwin -o XUL -Wl,-filelist,XUL.list -fuse-ld=lld -framework Cocoa -lobjc -framework AudioToolbox -lresolv ../../../security/nss/lib/crmf/crmf_crmf/libcrmf.a ../../../js/src/build/libjs_static.a ../../../aarch64-apple-darwin/debug/libgkrust.a ../../../security/libnss3.dylib ../../../config/external/lgpllibs/liblgpllibs.dylib ../../../mozglue/build/libmozglue.dylib -dynamiclib -lbsm -framework IOSurface -framework IOKit -framework AudioToolbox -framework CoreMedia -framework VideoToolbox -framework LocalAuthentication -framework Security -lm -framework OpenGL -framework SystemConfiguration -framework AVFoundation -framework CoreUI -framework CoreSymbolication -lcups -framework Foundation -framework CoreFoundation -framework CoreLocation -framework QuartzCore -framework Carbon -framework CoreAudio -framework CoreVideo -framework AudioToolbox -framework AudioUnit -framework AddressBook -framework OpenGL -framework Security -framework ServiceManagement -framework CoreServices -framework ApplicationServices -framework AppKit -weak_framework Metal -weak_framework MediaPlayer

Cc: @nico @int3 @keith

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions