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

Add missing macOS framework in echo_server.c #27

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mastermakrela
Copy link

Currently (at least on macOS Sequoia 15.2) the example/echo_server.c doesn't build with the following error:

cc -framework CoreFoundation -framework Security echo_server.c ../libtailscale.a
Undefined symbols for architecture arm64:
  "_IOObjectRelease", referenced from:
      _getSerialNumber in libtailscale.a[17](000014.o)
  "_IORegistryEntryCreateCFProperty", referenced from:
      _getSerialNumber in libtailscale.a[17](000014.o)
  "_IOServiceGetMatchingService", referenced from:
      _getSerialNumber in libtailscale.a[17](000014.o)
  "_IOServiceMatching", referenced from:
      _getSerialNumber in libtailscale.a[17](000014.o)
  "_kIOMainPortDefault", referenced from:
      _getSerialNumber in libtailscale.a[17](000014.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I could trace this problem to missing -framework IOKit in the hint about building on macOS.
So to save time for others who might also be trying this example, it would be nice to add it.


I couldn't find any contributing guide in this repository, so sorry in advance if I made any mistakes — just let me know, and I'll fix them. :)

Add the missing framework that macOS needs to the comment
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

Successfully merging this pull request may close these issues.

1 participant