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

find: -printf: unknown primary or operator on macOS #86

Closed
Strum355 opened this issue May 4, 2023 · 3 comments
Closed

find: -printf: unknown primary or operator on macOS #86

Strum355 opened this issue May 4, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@Strum355
Copy link

Strum355 commented May 4, 2023

Describe the bug
Skyscope uses flags for find that are non-existant on the BSD version of find, only on GNU version

To Reproduce

Append to WORKSPACE:

http_archive(
    name = "skyscope",
    sha256 = "2acf7b7f5bf3e66b83e1fac3aa6bcf71d173433ca6786f83d62fb5e9241fe7dc",
    urls = ["https://github.com/tweag/skyscope/releases/download/v0.2.6/skyscope.zip"],
)

load("@skyscope//:repository.bzl", "configure_skyscope")

configure_skyscope()

Run bazel shutdown && bazel build //cmd/gitserver && bazel run -- @skyscope//:import

Expected behavior
Works on both macOS and linux

Environment

  • OS name + version: macOS 13.3 with bazel 6.1.1
  • Version of the code: 0.2.6

Additional context

$ bazel run -- @skyscope//:import
INFO: Analyzed target @skyscope//:import (5 packages loaded, 307 targets configured).
INFO: Found 1 target...
Target @skyscope_macos//skyscope:import up-to-date:
  bazel-bin/external/skyscope_macos/skyscope/import
INFO: Elapsed time: 0.601s, Critical Path: 0.01s
INFO: 1 process: 1 internal.
INFO: Running command line: bazel-bin/external/skyscope_macos/skyscope/import
INFO: Build completed successfully, 1 total action
find: -printf: unknown primary or operator
/private/var/tmp/_bazel_tech/0812c8e6e121162f0d18a505d289a8d2/execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/external/skyscope_macos/skyscope/import: line 4: /bin/skyscope: No such file or directory
@Strum355 Strum355 changed the title find: -printf: unknown primary or operator on macOS find: -printf: unknown primary or operator on macOS May 4, 2023
@benradf
Copy link
Member

benradf commented May 4, 2023

Looks like the MacOS system I tested on has GNU findutils installed, so I missed this issue 🤦‍♂️. Thanks for reporting it @Strum355, I'll report back when I have a fix ready.

@benradf
Copy link
Member

benradf commented May 5, 2023

This should be fixed in the latest v0.2.7 release:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "skyscope",
    sha256 = "5544313ec77adbc96856c4cdfb3dfc6b5409e05790860ae19c7d321fb585490b",
    urls = ["https://github.com/tweag/skyscope/releases/download/v0.2.7/skyscope.zip"]
)
load("@skyscope//:repository.bzl", "configure_skyscope")
configure_skyscope()

I'll leave this issue open for the moment. Let me know if you encounter further problems.

@benradf
Copy link
Member

benradf commented Dec 4, 2023

Since the change to distribute Skyscope on Linux as a single statically linked binary, there is no longer a wrapper script that calls find, so this issue is resolved (though to use Skyscope on MacOS now, you'll have to build it from source).

@benradf benradf closed this as completed Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants