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

fptrace fails to build on darwin #31

Open
patryk-kozak opened this issue Jun 22, 2022 · 1 comment
Open

fptrace fails to build on darwin #31

patryk-kozak opened this issue Jun 22, 2022 · 1 comment
Assignees

Comments

@patryk-kozak
Copy link

Describe the bug
nix_gazelle_extension is not runnable on darwin, the fptrace is not able to build

error: builder for '/nix/store/9djxkbvhldinlnwd8h061pyn0933dsi7-fptrace.drv' failed with exit code 2;
       last 10 log lines:
       > # command-line-arguments
       > ./seccomp.go:24:2: undefined: unix.SYS_DUP3
       > ./seccomp.go:26:2: undefined: unix.SYS_EXECVEAT
       > ./seccomp.go:34:2: undefined: unix.SYS_PREAD64
       > ./seccomp.go:35:2: undefined: unix.SYS_PREADV
       > ./seccomp.go:36:2: undefined: unix.SYS_PREADV2
       > ./seccomp.go:37:2: undefined: unix.SYS_PWRITE64
       > ./seccomp.go:38:2: undefined: unix.SYS_PWRITEV
       > ./seccomp.go:39:2: undefined: unix.SYS_PWRITEV2
       > ./seccomp.go:44:2: undefined: unix.SYS_RENAMEAT2
       For full logs, run 'nix log /nix/store/9djxkbvhldinlnwd8h061pyn0933dsi7-fptrace.drv'.

To Reproduce

  • git clone repository to macos machine
  • go to examples
  • run examples:generate
  • go to examples/vanilla
  • run gazelle-update-all
  • gazelle fails

Expected behavior
nix_gazelle_extension is able to run from macos.

Environment

  • OS name + version: MacOS 12.4 Monterey / kernel 21.5.0
  • Version of the code: master source code

Additional context

Notes:
https://opensource.apple.com/source/dtrace/dtrace-147/DTTk/dtruss.auto.html
Seems to be available to trace execution on macos, didn't tried it.
It is probably not option anymore, blocked by El Captation release.
There is ptrace (python strace port) that is runnable on unix, windows and darwin.
https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/ptrace.2.html
https://github.com/vstinner/python-ptrace

@patryk-kozak patryk-kozak changed the title fptrace fails to run on darwin fptrace fails to build on darwin Jun 22, 2022
@aherrmann
Copy link
Member

A potential cross-platform alternative may be fsatrace. It's also used by Rattle. However, wrt MacOS, it states

In order to use fsatrace on systems newer than OS X 10.10, System Integrity Protection must be disabled as detailed in https://developer.apple.com/library/content/documentation/Security/Conceptual/System_Integrity_Protection_Guide/ConfiguringSystemIntegrityProtection/ConfiguringSystemIntegrityProtection.html

@r2r-dev r2r-dev self-assigned this Jun 24, 2022
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

3 participants