jacereda / fsatrace

Filesystem access tracer
ISC License
78 stars 12 forks source link

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

Open ndmitchell opened 3 months ago

ndmitchell commented 3 months ago

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 commented 3 months ago

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

ndmitchell commented 3 months ago

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 commented 3 months ago

Something like make CFLAGS="-arch arm64e".

ndmitchell commented 3 months ago

No luck - https://github.com/ndmitchell/neil/actions/runs/9049776301/job/24864280149#step:7:1

jacereda commented 3 months ago

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

jacereda commented 3 months ago

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