ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
reductum has joined #zig
stratact has quit [Quit: Leaving]
jrcd83 has joined #zig
<jrcd83> anybody know why i run "zig build-exe" and the .exe isn't rebuilt but the .obj in zig-cache/ is updated? on windows
wilsonk has quit [Read error: Connection reset by peer]
wilsonk has joined #zig
karlguy has quit [Quit: Leaving]
<andrewrk> jrcd83: this sounds like https://github.com/ziglang/zig/issues/859
<jrcd83> @andrewrk: ty it seems similar but i can delete the .exe and it will not build so it is perhaps distinct from #859. i added a new function to the file and it does this. i can remove the func it and it builds again... zig returns error code 1. strange.
<jrcd83> andrewrk: i will keep at it. i like ur language alot ty. this is for a homework max subarray algorithm: https://gist.github.com/juster/d639d3e4a4975878e424092aff4435e3 (see comment at bottom). idk if it's only windows
jrcd83 has quit []
very-mediocre has joined #zig
reductum has quit [Quit: WeeChat 2.2]
Ichorio has joined #zig
reductum has joined #zig
geocar has joined #zig
reductum has quit [Quit: WeeChat 2.2]
jjido has joined #zig
davr0s has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jjido has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
bkleiner has joined #zig
bkleiner has quit [Quit: Page closed]
bkleiner- has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bkleiner- is now known as bkleiner
unique_id has joined #zig
very-mediocre has quit [Ping timeout: 256 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
porky11 has joined #zig
Hejsil has joined #zig
karlguy has joined #zig
Hejsil has quit [Quit: Page closed]
porky11 has quit [Quit: Leaving]
jjido has joined #zig
jjido has quit [Client Quit]
jjido has joined #zig
very-mediocre has joined #zig
juster has joined #zig
srgpqt has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
renatorabelo has joined #zig
karlguy has quit [Quit: Leaving]
<srgpqt> Hi. I'm getting compiler crashes when I try to compile a small app with an objective-c static library. Is this a known issue? Should i create an issue on github? Reduced repro case: https://github.com/srgpqt/zig-objc-static-lib-crash
<andrewrk> srgpqt, I'll have a look
<srgpqt> ty <3
<andrewrk> srgpqt, what objective c compiler are you using?
srgpqt has quit [Ping timeout: 252 seconds]
srgpqt has joined #zig
juster has quit [Ping timeout: 260 seconds]
<andrewrk> can I see the full output you're getting?
<srgpqt> ⚡ zig build
<srgpqt> The following command terminated unexpectedly:
<srgpqt> /usr/local/Cellar/zig/HEAD-57c4d38/bin/zig build-exe /Users/myself/p/zig-objc-static-lib-crash/src/main.zig --cache-dir /Users/myself/p/zig-objc-static-lib-crash/zig-cache --output /Users/myself/p/zig-objc-static-lib-crash/zig-cache/app --name app -isystem /Users/myself/p/zig-objc-static-lib-crash/zig-cache -isystem /Users/myself/p/zig-objc-static-lib-crash/src --library
<srgpqt> /Users/myself/p/zig-objc-static-lib-crash/zig-cache/libgoodies.a
<srgpqt> Build failed. The following command failed:
<srgpqt> /Users/myself/Library/Application Support/zig/stage1/artifact/RtOUWNghb4UDrBj98-Kv6XCyEGfbQf3yLwJL7QmeTM-Qyp4ckZu1OgTJz2_1r-n0/build /usr/local/Cellar/zig/HEAD-57c4d38/bin/zig /Users/myself/p/zig-objc-static-lib-crash /Users/myself/p/zig-objc-static-lib-crash/zig-cache
<srgpqt> i have the crash logs too
davr0s has joined #zig
<srgpqt> I'll try reinstalling llvm and see if it makes a difference
<andrewrk> that's not likely to change anything
<srgpqt> I was using llvm compiled from source, so who knows
<andrewrk> me :)
<srgpqt> well you were right, same crash ;-)
jjido has joined #zig
<andrewrk> srgpqt, I'm not able to reproduce your crash - I get "Undefined symbol: app.o: _oops"
<andrewrk> can you run `zig build --verbose` and link me to a paste of the output?
karlguy has joined #zig
<andrewrk> oh, your crash log has a stack trace
<andrewrk> damn, it's crashing in the macho linker
<srgpqt> Add the verbose output as comment to that gist
<srgpqt> Added*
<andrewrk> srgpqt, here's the situation. the MACH-O code in LLD is not mature because nobody in the LLVM community cares about it
<andrewrk> so you have found a bug in the mach-o code of LLD
<andrewrk> this is one of the motivating factors of https://github.com/ziglang/zig/issues/1535
<srgpqt> Doesn't Apple care about it? Since every last piece of software they make is built with it
<andrewrk> which is an issue for zig to have its own linker
<andrewrk> apple uses the native linker, not LLD
<srgpqt> I thought lld was the native linker nowadays
<andrewrk> yeah that seems like where things were going
<andrewrk> so, unfortunately you are blocked by a problem to which the solution is a large effort
<andrewrk> as a workaround, I think you could use zig to produce a .o file, and then link with the system linker
<srgpqt> Sigh. I guess this makes it impossible to build zig apps that need objective-c pieces? Probably could build zig libs and link them into objective-c apps..
<srgpqt> Yeah, your workaround is what i was basically thinking of. Ah well
<andrewrk> yeah. sorry about that. I should just start the zig linker project. linking isn't that hard
<tbodt> can zig be configured to use the system linker?
<srgpqt> Yeah, I was looking into the Mach-O spec myself, to understand how build toolchains all work.. i should revisit that
<andrewrk> tbodt, not anymore. in the pursuit of true out of the box cross compilation, we have to not rely on system dependencies
<andrewrk> tbodt, consider that on windows & linux you also need the ability to build the mach-o project
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jjido has joined #zig
redj has quit [Ping timeout: 268 seconds]
jrcd83 has joined #zig
karlguy has quit [Ping timeout: 272 seconds]
<jrcd83> andrewrk: i found out that accessing the c_allocator was exiting at compile time. maybe since libcrt is not linked in? i got it working with DirectAllocator
<andrewrk> jrcd83, can I see the output you're getting? you do have to link libc to use c_allocator. you should be getting a linker error if you don't
<andrewrk> oh. you know what I've seen, is hundreds of blank lines printed after the error message
<andrewrk> I haven't figured out what causes this yet
<andrewrk> LLD rears its ugly head again
<jrcd83> andrewrk: the command doesnt print anything it just stops and there is an error code (1)
<jrcd83> i.e. in old cmd prompt i see it with "echo %errorlevel%" and it prints 1
<andrewrk> the next step to solving this is either (1) get me to be able to reproduce it or (2) you run it in a debugger with a breakpoint on exit and get me a stack trace
<jrcd83> ill try to get a stack trace, I have a more isolated example btw: https://gist.github.com/juster/63b95c64ecc824fb55e7dba4d404a4d7 ... i'll maybe get back to this in a few days
<jrcd83> gotta switch tasks cya ty
return0xe has joined #zig
return0e has quit [Ping timeout: 245 seconds]
return0xe has quit [Remote host closed the connection]
return0e has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
srgpqt has quit [Ping timeout: 246 seconds]
very-mediocre has quit [Ping timeout: 256 seconds]
jrcd83 has quit []
karlguy has joined #zig
davr0s has quit [Read error: Connection reset by peer]
redj has joined #zig
yougane has joined #zig
yougane has quit [Client Quit]
sepisoad has joined #zig
sepisoad has quit [Read error: Connection reset by peer]
m4ge123 has quit [Read error: Connection reset by peer]
m4ge123 has joined #zig