Closed kimmolinna closed 1 year ago
Does it work fine in debug?
No. It's exactly the same thing if I use zig build
.
I have a sneaky suspicion that this due to a missing feature in the MachO linker to do with emitting compact unwind info. FWIW it's on my todo list. In the meantime, I'll play with this example a little more and see if I can reduce it further.
I tested this also with make CC="zig cc" CXX="zig c++"
after you merged #13991 and I will get the same error with that compiled application. For me this is really good thing. The error is consistent. :)
I tested this also with
make CC="zig cc" CXX="zig c++"
after you merged #13991 and I will get the same error with that compiled application. For me this is really good thing. The error is consistent. :)
If my hunch is correct, it will take a little longer for me to provide a fix as I need to do some research and reverse engineering but it will be done!
Timing is not a problem. I just comment a couple of lines and everything is working nicely but without color-coding and predictive code input.
Timing is not a problem. I just comment a couple of lines and everything is working nicely but without color-coding and predictive code input.
Oh, would you mind posting which lines need to be commented out?
shell.addCSourceFile(
"tools/shell/linenoise.cpp",&.{});
shell.defineCMacro("HAVE_LINENOISE", "1");
shell.addCSourceFile( "tools/shell/linenoise.cpp",&.{}); shell.defineCMacro("HAVE_LINENOISE", "1");
Nice, thank you so much! This will aid me in working out a fix for sure!
I made a test. Working compilation:
D select 42:;
Error: Parser Error: syntax error at or near ":"
LINE 1: select 42:;
And a buggy one:
D select 42:;
libc++abi: terminating due to uncaught exception of type std::runtime_error: parser error : syntax error at or near ":"
zsh: abort ./duckdb-zig-build/zig-out/bin/duckdb
Thank you very much @kubkon. Excellent work.
Zig Version
0.11.0-dev.829+68d2f68ed
Steps to Reproduce and Observed Behavior
git clone --branch basic https://github.com/kimmolinna/duckdb-zig-build
zig build -Drelease-fast
./zig-out/bin/duckdb
select '
Expected Behavior
Linenoise is working nicely if you compile with
make
so the problem is not M1/Ventura.zig build -Drelease-fast
is also working on Linux/Ubuntu 22.04.1