onepub-dev / dart_posix

MIT License
12 stars 4 forks source link

macOS: Failed to lookup symbol 'stat$INODE64' #13

Open cbenhagen opened 10 months ago

cbenhagen commented 10 months ago
import 'package:posix/posix.dart';

void main() {
  stat('/Users/ben/test');
}
Unhandled exception:
Invalid argument(s): Failed to lookup symbol 'stat$INODE64': dlsym(0x3dd75f480, stat$INODE64): symbol not found
#0      DynamicLibrary.lookup (dart:ffi-patch/ffi_dynamic_library_patch.dart:33:70)
#1      MacStatCall._call (package:posix/src/stat/mac.dart)
#2      MacStatCall._call (package:posix/src/stat/mac.dart)
#3      MacStatCall.sysCall (package:posix/src/stat/mac.dart:25:20)
#4      OsStatCall.call (package:posix/src/stat/os.dart:21:14)
#5      stat (package:posix/src/stat/stat.dart:30:38)
#6      main (file:///Users/ben/development/posix_playground/main.dart:4:3)
#7      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:296:19)
#8      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189:12)

Tested using version 5.0.0 on macOS 13.5 and 14.0

Dart SDK version: 3.0.6 (stable) (Tue Jul 11 18:49:07 2023 +0000) on "macos_arm64"

bsutton commented 10 months ago

I'm a little perplexed by this one and a little time poor as I'm dealing with a dcli issue.

Any additional research you can do would be appreciated.

cbenhagen commented 10 months ago

I am afraid I can't dig into this right now. I switched to using the stdlibc package which worked as expected for our use case.