Skip to content

Conversation

@kristoff-it
Copy link
Member

After merging the monster branch, Zig stopped working on my macOS machine. The problem was that I was invoking zig through a symlink which made the procedure for finding the stdlib fail.

@tadeokondrak
Copy link
Contributor

Related #1128

Signed-off-by: Loris Cro <kappaloris@gmail.com>
// the executable not a "real path" to the executable.
var symlink_path_buf: [MAX_PATH_BYTES]u8 = undefined;
var u32_len: u32 = MAX_PATH_BYTES;
const rc = std.c._NSGetExecutablePath(&symlink_path_buf, &u32_len);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since _NSGetExecutablePath first parameter is null-terminated and this is the only callsite can you change the signature in darwin.zig?
That'd also help to get rid of the ptrCast below

@kristoff-it
Copy link
Member Author

@LemonBoy is this what you meant?

Signed-off-by: Loris Cro <kappaloris@gmail.com>
Signed-off-by: Loris Cro <kappaloris@gmail.com>
@alexnask alexnask merged commit 4396373 into ziglang:master Oct 3, 2020
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

Successfully merging this pull request may close these issues.

5 participants