Odin icon indicating copy to clipboard operation
Odin copied to clipboard

odinfmt won't build on MacOS

Open weshardee opened this issue 3 years ago • 8 comments

Context

Odin: dev-2022-01:965b962b
OS:   macOS 11.6 Big Sur
CPU:  Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
RAM:  32768 MiB

Expected Behavior

odin build tools/odinfmt/main.odin should build.

Current Behavior

Several core library procedures appear to be undefined for MacOS :

tools/odinfmt/main.odin(93:5) 'is_file' is not declared by 'os' tools/odinfmt/main.odin(99:5) 'rename' is not declared by 'os' tools/odinfmt/main.odin(102:6) 'remove' is not declared by 'os' tools/odinfmt/main.odin(113:12) 'is_dir' is not declared by 'os'

weshardee avatar Jan 31 '22 00:01 weshardee

There are a couple issues with odinfmt in this repo. I have been advised to use odinfmt from ols (https://github.com/DanielGavin/ols/tree/master/tools/odinfmt). We should clarify the status of odinfmt in this repository

kim366 avatar Feb 05 '22 19:02 kim366

Seems like os is missing some calls there let me fix that shouldn't take long..

Platin21 avatar Feb 05 '22 19:02 Platin21

Already in the makings => #1471

Platin21 avatar Feb 05 '22 19:02 Platin21

@kim366 and @weshardee please check if it works now with this change.

Platin21 avatar Feb 05 '22 20:02 Platin21

Ok checked it out on arm seems like this also needs to be fixed:

Undefined symbols for architecture arm64: "_fdopendir$INODE64", referenced from: _os._fdopendir-943 in main.o "_readdir_r$INODE64", referenced from: _os._readdir-946 in main.o ld: symbol(s) not found for architecture arm64 clang-13: error: linker command failed with exit code 1 (use -v to see invocation)

Platin21 avatar Feb 05 '22 20:02 Platin21

This is a arm only problem doesn't happen at x64 normally. I tried to add the calls for arm but it seems like it doesn't allow when inside foreign..?

Platin21 avatar Feb 05 '22 20:02 Platin21

Should be done now tested it on arm64 macOS

Platin21 avatar Feb 05 '22 22:02 Platin21

Hello!

I am marking this issue as stale as it has not received any engagement from the community or maintainers 120 days. That does not imply that the issue has no merit! If you feel strongly about this issue

  • open a PR referencing and resolving the issue;
  • leave a comment on it and discuss ideas how you could contribute towards resolving it;
  • leave a comment and describe in detail why this issue is critical for your use case;
  • open a new issue with updated details and a plan on resolving the issue.

The motivation for this automation is to help prioritize issues in the backlog and not ignore, reject, or belittle anyone..

github-actions[bot] avatar Jul 24 '22 22:07 github-actions[bot]