# Error Compiling Registers

**URL:** <https://forums.kodeco.com/t/error-compiling-registers/141283>\
**Category:** Advanced Apple Debugging\
**Created:** [June 1, 2021, 5:23am UTC](https://forums.kodeco.com/t/error-compiling-registers/141283 "2021-06-01T05:23:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lunaticdreamer](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/lunaticdreamer/32/102378_2.png) [@lunaticdreamer](https://forums.kodeco.com/u/lunaticdreamer)\
**Post date:** [June 1, 2021, 5:23am UTC](https://forums.kodeco.com/t/error-compiling-registers/141283/1 "2021-06-01T05:23:18Z")

</div>

Hello,

When trying to compile the registers utility I get the following error:

Assembly Register Calling Convention/projects/starter/Registers/Registers/StackWalkthrough.s:40:11: error: invalid operand  
pop %rbp  
^  
Command CompileC failed with a nonzero exit code

---

<div class="post-metadata">

**Author:** ![lunaticdreamer](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/lunaticdreamer/32/102378_2.png) [@lunaticdreamer](https://forums.kodeco.com/u/lunaticdreamer)\
**Post date:** [June 2, 2021, 2:47am UTC](https://forums.kodeco.com/t/error-compiling-registers/141283/2 "2021-06-02T02:47:26Z")

</div>

Figured it out. On M1 Macs in order for it to compile you need to change the build target to My Mac (Rosetta).

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [November 14, 2021, 9:23pm UTC](https://forums.kodeco.com/t/error-compiling-registers/141283/3 "2021-11-14T21:23:31Z")

</div>

Closed on November 14, 2021, 9:23pm UTC

This topic was automatically closed after 166 days. New replies are no longer allowed.
