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 for architecture arm64: "_host_hooks" – Apple Silicon #127

Open
aislynn-ortega opened this issue Dec 28, 2024 · 0 comments

Comments

@aislynn-ortega
Copy link

aislynn-ortega commented Dec 28, 2024

I'm trying to build the toolchain on a Macbook M3 Pro and I'm getting this error.

Undefined symbols for architecture arm64:
Undefined symbols for architecture arm64:
  "_host_hooks", referenced from:
      c_common_no_more_pch() in c-pch.o
      gt_pch_save(__sFILE*) in libbackend.a[94](ggc-common.o)
      gt_pch_restore(__sFILE*) in libbackend.a[94](ggc-common.o)
      toplev::main(int, char**) in libbackend.a[273](toplev.o)
ld: symbol(s) not found for architecture arm64
  "_host_hooks", referenced from:
      c_common_no_more_pch() in c-pch.o
      gt_pch_save(__sFILE*) in libbackend.a[94](ggc-common.o)
      gt_pch_restore(__sFILE*) in libbackend.a[94](ggc-common.o)
      toplev::main(int, char**) in libbackend.a[273](toplev.o)

It's related to this and the workaround is mentioned here

What I did was to, basically, comment these lines on `build/gcc-7.2.0/gcc/config.host

case ${host} in
  *-darwin*)
    # Generic darwin host support.
    #out_host_hook_obj=host-darwin.o
    #host_xmake_file="${host_xmake_file} x-darwin"
    ;;  
esac
aislynn-ortega added a commit to aislynn-ortega/ps3toolchain that referenced this issue Dec 28, 2024
aislynn-ortega added a commit to aislynn-ortega/ps3toolchain that referenced this issue Dec 28, 2024
Follow this workaround [1]

Patch was generated the same way as the previous commit

[1] riscv-software-src/homebrew-riscv#47 (comment)

Signed-off-by: Aislynn Ortega <[email protected]>
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

1 participant