Error while building: `cp: cannot stat '~/project/zelda/zig-libressl/libressl/openbsd/src/lib/libssl/dtls_locl.h': No such file or directory`
theseyan opened this issue · 5 comments
Trying to build a project on Zig 0.11.0-dev.944+a193ec432
, on Debian x86_64, I get this error:
copying libssl source
cp: cannot stat '~/project/zelda/zig-libressl/libressl/openbsd/src/lib/libssl/dtls_locl.h': No such file or directory
The following command exited with error code 1 (expected 0):
cd ~/project/zelda/zig-libressl/libressl && sh autogen.sh
error: UnexpectedExitCode
To investigate, I ls
-ed the ~/project/zelda/zig-libressl/libressl
directory to find that there is a dtls_local.h
present, instead of dtls_locl.h
.
Maybe this is why it fails?
This is likely a problem with my libressl checkout in the dependencies or build.zig for libressl. I'll take a look at it this weekend. Thanks!
I just tested with my latest changes to libressl
, and zig-libressl
and have tests passing on the latter package for macOS. Linux isn't as easily available to me, so I haven't tested that platform yet. Can you do me a favor and see if cloning https://github.com/haze/zig-libressl and running zig build test
in the root succeeds for you? If so, could you also try building Zelda? Thanks~!
I just tried to build zelda's tests again, and it got past the original error!
However there is still an issue building zig-libressl:
configure.ac:29: installing './compile'
configure.ac:20: installing './config.guess'
configure.ac:20: installing './config.sub'
configure.ac:21: installing './install-sh'
configure.ac:21: installing './missing'
apps/nc/Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
LLD Link... warning(link): unexpected LLD stderr:
ld.lld: warning: /home/theseyan/repos/zelda/zig-libressl/libressl/zig-cache/o/eed8d6cf50d4dcfb233eac0bd596178d/libtls.a: archive member '/home/theseyan/repos/zelda/zig-libressl/libressl/zig-cache/o/9a28d1e683cb77fa8215f336615f71b4/libcrypto.a' is neither ET_REL nor LLVM bitcode
ld.lld: warning: /home/theseyan/repos/zelda/zig-libressl/libressl/zig-cache/o/eed8d6cf50d4dcfb233eac0bd596178d/libtls.a: archive member '/home/theseyan/repos/zelda/zig-libressl/libressl/zig-cache/o/5806d22f016c8651adef7e1097423e14/libssl.a' is neither ET_REL nor LLVM bitcode
Test [1/3] test.fetch status code of ziglang.org... FAIL (TlsConnectSocket)
/home/theseyan/repos/zelda/zig-libressl/src/SslStream.zig:28:9: 0x2acfec in wrapClientStream (test)
return error.TlsConnectSocket;
^
/home/theseyan/repos/zelda/src/client.zig:321:30: 0x2a7004 in perform (test)
var tunnel = try libressl.SslStream.wrapClientStream(tls_configuration, tcp_connection, tunnel_host);
^
/home/theseyan/repos/zelda/src/oneshot.zig:17:12: 0x2aeb7e in get (test)
return try client.perform(request);
^
/home/theseyan/repos/zelda/src/tests.zig:7:20: 0x2aef61 in test.fetch status code of ziglang.org (test)
var response = try zelda.get(std.testing.allocator, "https://ziglang.org");
^
Test [2/3] test.post some data and get it back... FAIL (TlsConnectSocket)
/home/theseyan/repos/zelda/zig-libressl/src/SslStream.zig:28:9: 0x2acfec in wrapClientStream (test)
return error.TlsConnectSocket;
^
/home/theseyan/repos/zelda/src/client.zig:321:30: 0x2a7004 in perform (test)
var tunnel = try libressl.SslStream.wrapClientStream(tls_configuration, tcp_connection, tunnel_host);
^
/home/theseyan/repos/zelda/src/oneshot.zig:31:12: 0x2af53f in post (test)
return try client.perform(request);
^
/home/theseyan/repos/zelda/src/oneshot.zig:42:20: 0x2af6f0 in postAndParseResponse__anon_6515 (test)
var response = try post(allocator, url, body);
^
/home/theseyan/repos/zelda/src/tests.zig:22:20: 0x2b11f2 in test.post some data and get it back (test)
var response = try zelda.postAndParseResponse(HTTPBinResponse, .{
^
Test [3/3] test.post some json data and get it back... FAIL (TlsConnectSocket)
/home/theseyan/repos/zelda/zig-libressl/src/SslStream.zig:28:9: 0x2acfec in wrapClientStream (test)
return error.TlsConnectSocket;
^
/home/theseyan/repos/zelda/src/client.zig:321:30: 0x2a7004 in perform (test)
var tunnel = try libressl.SslStream.wrapClientStream(tls_configuration, tcp_connection, tunnel_host);
^
/home/theseyan/repos/zelda/src/oneshot.zig:31:12: 0x2af53f in post (test)
return try client.perform(request);
^
/home/theseyan/repos/zelda/src/oneshot.zig:56:5: 0x2b152b in postJson__anon_6636 (test)
return post(allocator, url, req.Body{ .kind = .JSON, .bytes = buffer.items });
^
/home/theseyan/repos/zelda/src/oneshot.zig:72:20: 0x2b2320 in postJsonAndParseResponse__anon_6635 (test)
var response = try postJson(options.allocator, url, json_value, options.stringify_options);
^
/home/theseyan/repos/zelda/src/tests.zig:48:29: 0x2b2a08 in test.post some json data and get it back (test)
var http_bin_response = try zelda.postJsonAndParseResponse(HTTPBinResponse, "https://httpbin.org/post", source, .{
^
0 passed; 0 skipped; 3 failed.
error: the following test command failed with exit code 1:
/home/theseyan/repos/zelda/zig-cache/o/56485c4093c754cd288bf049fe7c5db6/test
error: test...
error: The following command exited with error code 1:
/home/theseyan/zig/zig test /home/theseyan/repos/zelda/src/tests.zig -lc /home/theseyan/repos/zelda/zig-libressl/libressl/zig-cache/o/9a28d1e683cb77fa8215f336615f71b4/libcrypto.a /home/theseyan/repos/zelda/zig-libressl/libressl/zig-cache/o/5806d22f016c8651adef7e1097423e14/libssl.a /home/theseyan/repos/zelda/zig-libressl/libressl/zig-cache/o/eed8d6cf50d4dcfb233eac0bd596178d/libtls.a -lc -lc -lc -lc -lc --cache-dir /home/theseyan/repos/zelda/zig-cache --global-cache-dir /home/theseyan/.cache/zig --name test --pkg-begin zelda /home/theseyan/repos/zelda/src/main.zig --pkg-begin hzzp /home/theseyan/repos/zelda/hzzp/src/main.zig --pkg-end --pkg-begin zuri /home/theseyan/repos/zelda/zuri/src/zuri.zig --pkg-end --pkg-begin zig-libressl /home/theseyan/repos/zelda/zig-libressl/src/main.zig --pkg-end --pkg-end -I /home/theseyan/repos/zelda/zig-libressl/libressl/include --enable-cache
error: the following build command failed with exit code 1:
/home/theseyan/repos/zelda/zig-cache/o/e4cad438664223b2b6b5501c709abba0/build /home/theseyan/zig/zig /home/theseyan/repos/zelda /home/theseyan/repos/zelda/zig-cache /home/theseyan/.cache/zig test
That looks like you've built everything successfully and are currently facing some errors creating a TLS connection.
For the record, I've contacted Sayan privately via discord and we further debugged that their test failures were due to a missing symlink at /etc/ssl/certs
; I will create a follow up issue on next steps for finding bistro-dependent certificate roots.