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

Linker errors and general understanding of build process #101

Open
g-mocken opened this issue Mar 2, 2021 · 2 comments
Open

Linker errors and general understanding of build process #101

g-mocken opened this issue Mar 2, 2021 · 2 comments

Comments

@g-mocken
Copy link

g-mocken commented Mar 2, 2021

I am trying to use HomeKit ADK on MacOS Catalina. I want to compile for MacOS (just to get startet) and cross-compile for RaspberryPi.

After building and reading the docs and installing the prerequisites using "brew", I understand that a simple "make all" should perform the macos build. But it fails with HAP related linker errors (such as "Undefined symbols for architecture x86_64: "_HAPAccessorySetupGetSetupHash", referenced from: _Test in HAPAccessorySetupGetSetupHashTest.o". Any suggestions?

Furthermore, I am totally lost as to how the docker-related cross-compilation for RaspberryPi is supposed to be carried out, and I would appreciate some more detailed instructions for the purpose.

@g-mocken
Copy link
Author

g-mocken commented Mar 3, 2021

Analyzing it in more detail, I am even more confused by the linker warning preceding the "undefined symbol" linker errors quoted above:

ld: warning: ignoring file Output/Darwin-x86_64-apple-darwin19.6.0/Test/hap.a, building for macOS-x86_64 but attempting to link with file built for macOS-x86_64

What architecture "mismatch" is it complaining about?

@g-mocken
Copy link
Author

Finally fixed the problem:
I had to remove /usr/local/bin from my $PATH, because it apparently caused tools from brew/binutils to be used in the build process instead of the ones by Apple.

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