launcher icon indicating copy to clipboard operation
launcher copied to clipboard

Issue building launcher related to Appkit dependency

Open mkonda opened this issue 4 years ago • 2 comments

Hi there. Thanks for all of your work on Fleet and Launcher. Experimentation has been very positive so far.

I'm seeing issues building Launcher. I don't do much with XCode or Swift other than install CLI tools but it looks like maybe there is a dependency on something in the front end based on this Appkit error?

I tried a few simple things like opening a project in XCode GUI but I'm not sure where to go next...

Detail below. LMK if I can help by providing more info.

Note: package-builder built fine and the launcher it built worked fine. So certainly not urgent.

mk@om launcher % make deps
go run cmd/make/make.go -targets=deps-go,install-tools
go generate ./pkg/packagekit ./pkg/packaging
go run cmd/make/make.go -targets=generate-tuf
WARN[0000] targets metadata is nearing expiry, you should re-sign the role metadata
WARN[0000] targets metadata is nearing expiry, you should re-sign the role metadata
mk@om launcher % make launcher
go run cmd/make/make.go -targets=launcher -linkstamp
# github.com/kolide/launcher/pkg/osquery/table
pkg/osquery/table/app_icons_darwin.go:6:9: fatal error: 'Appkit/AppKit.h' file not found
#import <Appkit/AppKit.h>
        ^~~~~~~~~~~~~~~~~
1 error generated.
ts=2020-03-31T14:28:03.432622Z caller=logutil.go:13 severity=info msg="Target Failed" err="exit status 2" target=launcher
exit status 1
make: *** [launcher] Error 1
mk@om launcher %
mk@om launcher % uname -a
Darwin om.local 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar  4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64
mk@om launcher % go version
go version go1.13.4 darwin/amd64
mk@om launcher % osqueryd --version
osqueryd version 4.2.0
mk@om launcher % gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.3 (clang-1103.0.32.29)
Target: x86_64-apple-darwin19.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

mkonda avatar Mar 31 '20 15:03 mkonda

If you're using package-builder it defaults to downloading the last stable build from Kolide, not building launcher from source.

But the appkit thing does look like there's some missing dependency. No part of this uses xcode. It's all pretty plain go (and cgo) with a make wrapper,

What OS are you running the build on? Anything weird?

directionless avatar Mar 31 '20 18:03 directionless

Mac OS X 10.15.4 (Catalina). Some other details in the second blurb (go, gcc, osquery, etc.)

I write some go and have been able to build in general just fine.

Happy to try things if it would be helpful.

mkonda avatar Mar 31 '20 19:03 mkonda

I suspect this is stale.

directionless avatar Dec 20 '22 12:12 directionless