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

Fails to compile on GitHub Mac runners (incompatible architecture) #50

Open
ndmitchell opened this issue May 11, 2024 · 8 comments
Open

Comments

@ndmitchell
Copy link
Contributor

On a GitHub Mac runner I do:

git clone https://github.com/jacereda/fsatrace.git .fsatrace
(cd .fsatrace && make)
fsatrace v - -- echo fsatrace works

But that fails with:

dyld[79178]: terminating because inserted dylib '/Users/runner/work/neil/neil/.fsatrace/fsatrace.so' could not be loaded: tried: '/Users/runner/work/neil/neil/.fsatrace/fsatrace.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')), '/System/Volumes/Preboot/Cryptexes/OS/Users/runner/work/neil/neil/.fsatrace/fsatrace.so' (no such file), '/Users/runner/work/neil/neil/.fsatrace/fsatrace.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e'))

See https://github.com/ndmitchell/neil/actions/runs/9043421759/job/24851038411 for a complete trace.

@jacereda
Copy link
Owner

I don't have any box running macOS anymore. Maybe compiling with -arch arm64e does the trick?

@ndmitchell
Copy link
Contributor Author

How do you mean? As FLAGS or something? The simplistic version failed https://github.com/ndmitchell/neil/actions/runs/9044841141/job/24853934290 (I don't have a Mac either, but the github runners seem to have upgraded themselves)

@jacereda
Copy link
Owner

Something like make CFLAGS="-arch arm64e".

@ndmitchell
Copy link
Contributor Author

@jacereda
Copy link
Owner

Maybe the same flags must be passed to the linker? make CFLAGS="-arch arm64e" LDFLAGS="-arch arm64e"

@jacereda
Copy link
Owner

I've pushed a change to acknowledge the passed LDFLAGS.

@ndmitchell
Copy link
Contributor Author

I fixed this with #51. But now it segfaults, see https://github.com/ndmitchell/neil/actions/runs/10549668929/job/29224963531:

+ fsatrace v - -- echo fsatrace works
/Users/runner/work/_actions/ndmitchell/neil/master/github.sh: line 59: 87934 Killed: 9               fsatrace v - -- echo fsatrace works
Error: Process completed with exit code 137.

I suspect solving this without access to a real machine is probably infeasible.

@jacereda
Copy link
Owner

Yes, unfortunately I no longer have machines running macOS.

I wonder if something like https://github.com/e-dant/watcher or the alternatives listed there could be a better replacement for fsatrace. Have you evaluated those?

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

2 participants