Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined symbols ___cxa_guard_acquire and ___cxa_guard_release #4

Open
CRKatri opened this issue Feb 12, 2021 · 1 comment
Open

Undefined symbols ___cxa_guard_acquire and ___cxa_guard_release #4

CRKatri opened this issue Feb 12, 2021 · 1 comment

Comments

@CRKatri
Copy link
Contributor

CRKatri commented Feb 12, 2021

➜ make CC=aarch64-apple-darwin-clang STRIP=aarch64-apple-darwin-strip mkdir -p buildaarch64-apple-darwin-clang -arch arm64 -isysroot /home/cameron/Documents/SDK/iPhoneOS14.3.sdk -miphoneos-version-min=11.0 -fobjc-arc -DMAINTAINER='@"Zebra Team"' -DPREFIX='@""' -DEXECPREFIX='@"usr"' src/*.m -o build/firmware -Ibuild -framework Foundation -O3
Undefined symbols for architecture arm64:
  "___cxa_guard_acquire", referenced from:
      +[DeviceInfo sharedDevice] in DeviceInfo-0cbf38.o
      -[Firmware generatePackageListFile:] in Firmware-9fa4e8.o
      -[Firmware generatePackage:forVersion:withDescription:] in Firmware-9fa4e8.o
      -[Firmware generatePackage:forVersion:withDescription:andName:] in Firmware-9fa4e8.o
  "___cxa_guard_release", referenced from:
      +[DeviceInfo sharedDevice] in DeviceInfo-0cbf38.o
      -[Firmware generatePackageListFile:] in Firmware-9fa4e8.o
      -[Firmware generatePackage:forVersion:withDescription:] in Firmware-9fa4e8.o
      -[Firmware generatePackage:forVersion:withDescription:andName:] in Firmware-9fa4e8.o
ld: symbol(s) not found for architecture arm64
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:33: all] Error 1

This is only happening when compiling with arc, and can be fixed by disabling arc or adding -lc++ to the CFLAGS, because ___cxa_guard_release and ___cxa_guard_acquire are defined in libc++abi according to my 14.3 sdk. I am opening this issue because I believe there to be a better solution than those work arounds.

@ankurshinde1
Copy link

Have you solved this issue?

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

No branches or pull requests

2 participants