Compare commits

..

2 Commits

Author SHA1 Message Date
82c3cd8c6e fix strange compiler error 2026-02-09 15:05:34 +01:00
c762f94166 fix libc linking issues on linux 2026-02-09 15:05:15 +01:00

View File

@@ -96,6 +96,7 @@ pub fn build(b: *std.Build) void {
.name = "example-server", .name = "example-server",
.root_module = server_module, .root_module = server_module,
}); });
example_server.linkLibC();
b.installArtifact(example_server); b.installArtifact(example_server);
const run_server = b.addRunArtifact(example_server); const run_server = b.addRunArtifact(example_server);
@@ -117,6 +118,7 @@ pub fn build(b: *std.Build) void {
.name = "example-client", .name = "example-client",
.root_module = client_module, .root_module = client_module,
}); });
example_client.linkLibC();
b.installArtifact(example_client); b.installArtifact(example_client);
const run_client = b.addRunArtifact(example_client); const run_client = b.addRunArtifact(example_client);
@@ -138,6 +140,7 @@ pub fn build(b: *std.Build) void {
.name = "encrypted-server", .name = "encrypted-server",
.root_module = encrypted_server_module, .root_module = encrypted_server_module,
}); });
encrypted_server.linkLibC();
b.installArtifact(encrypted_server); b.installArtifact(encrypted_server);
const run_encrypted_server = b.addRunArtifact(encrypted_server); const run_encrypted_server = b.addRunArtifact(encrypted_server);
@@ -159,6 +162,7 @@ pub fn build(b: *std.Build) void {
.name = "encrypted-client", .name = "encrypted-client",
.root_module = encrypted_client_module, .root_module = encrypted_client_module,
}); });
encrypted_client.linkLibC();
b.installArtifact(encrypted_client); b.installArtifact(encrypted_client);
const run_encrypted_client = b.addRunArtifact(encrypted_client); const run_encrypted_client = b.addRunArtifact(encrypted_client);
@@ -182,6 +186,7 @@ pub fn build(b: *std.Build) void {
.name = "example-p2p", .name = "example-p2p",
.root_module = p2p_example_module, .root_module = p2p_example_module,
}); });
example_p2p.linkLibC();
b.installArtifact(example_p2p); b.installArtifact(example_p2p);
const run_p2p = b.addRunArtifact(example_p2p); const run_p2p = b.addRunArtifact(example_p2p);
@@ -201,6 +206,7 @@ pub fn build(b: *std.Build) void {
.name = "network-test", .name = "network-test",
.root_module = network_test_module, .root_module = network_test_module,
}); });
network_test.linkLibC();
b.installArtifact(network_test); b.installArtifact(network_test);
const run_network_test = b.addRunArtifact(network_test); const run_network_test = b.addRunArtifact(network_test);
@@ -224,6 +230,7 @@ pub fn build(b: *std.Build) void {
.name = "integration-test", .name = "integration-test",
.root_module = integration_test_module, .root_module = integration_test_module,
}); });
integration_test.linkLibC();
b.installArtifact(integration_test); b.installArtifact(integration_test);
const run_integration_test = b.addRunArtifact(integration_test); const run_integration_test = b.addRunArtifact(integration_test);
@@ -247,6 +254,7 @@ pub fn build(b: *std.Build) void {
.name = "real-test", .name = "real-test",
.root_module = real_test_module, .root_module = real_test_module,
}); });
real_test.linkLibC();
b.installArtifact(real_test); b.installArtifact(real_test);
const run_real_test = b.addRunArtifact(real_test); const run_real_test = b.addRunArtifact(real_test);
@@ -267,6 +275,7 @@ pub fn build(b: *std.Build) void {
.name = "protocol-example", .name = "protocol-example",
.root_module = protocol_example_module, .root_module = protocol_example_module,
}); });
protocol_example.linkLibC();
b.installArtifact(protocol_example); b.installArtifact(protocol_example);
const run_protocol_example = b.addRunArtifact(protocol_example); const run_protocol_example = b.addRunArtifact(protocol_example);
@@ -288,6 +297,7 @@ pub fn build(b: *std.Build) void {
.name = "file-server", .name = "file-server",
.root_module = file_server_module, .root_module = file_server_module,
}); });
file_server.linkLibC();
b.installArtifact(file_server); b.installArtifact(file_server);
const run_file_server = b.addRunArtifact(file_server); const run_file_server = b.addRunArtifact(file_server);
@@ -309,6 +319,7 @@ pub fn build(b: *std.Build) void {
.name = "file-transfer-test", .name = "file-transfer-test",
.root_module = file_transfer_test_module, .root_module = file_transfer_test_module,
}); });
file_transfer_test.linkLibC();
b.installArtifact(file_transfer_test); b.installArtifact(file_transfer_test);
const run_file_transfer_test = b.addRunArtifact(file_transfer_test); const run_file_transfer_test = b.addRunArtifact(file_transfer_test);
@@ -330,6 +341,7 @@ pub fn build(b: *std.Build) void {
.name = "multi-peer-test", .name = "multi-peer-test",
.root_module = multi_peer_test_module, .root_module = multi_peer_test_module,
}); });
multi_peer_test.linkLibC();
b.installArtifact(multi_peer_test); b.installArtifact(multi_peer_test);
const run_multi_peer_test = b.addRunArtifact(multi_peer_test); const run_multi_peer_test = b.addRunArtifact(multi_peer_test);
@@ -351,6 +363,7 @@ pub fn build(b: *std.Build) void {
.name = "multi-file-swarm-test", .name = "multi-file-swarm-test",
.root_module = multi_file_swarm_module, .root_module = multi_file_swarm_module,
}); });
multi_file_swarm_test.linkLibC();
b.installArtifact(multi_file_swarm_test); b.installArtifact(multi_file_swarm_test);
const run_multi_file_swarm = b.addRunArtifact(multi_file_swarm_test); const run_multi_file_swarm = b.addRunArtifact(multi_file_swarm_test);
@@ -372,6 +385,7 @@ pub fn build(b: *std.Build) void {
.name = "swarm-chaos-test", .name = "swarm-chaos-test",
.root_module = swarm_chaos_module, .root_module = swarm_chaos_module,
}); });
swarm_chaos_test.linkLibC();
b.installArtifact(swarm_chaos_test); b.installArtifact(swarm_chaos_test);
const run_swarm_chaos = b.addRunArtifact(swarm_chaos_test); const run_swarm_chaos = b.addRunArtifact(swarm_chaos_test);
@@ -392,6 +406,7 @@ pub fn build(b: *std.Build) void {
.name = "dht-test", .name = "dht-test",
.root_module = dht_test_module, .root_module = dht_test_module,
}); });
dht_test.linkLibC();
b.installArtifact(dht_test); b.installArtifact(dht_test);
const run_dht_test = b.addRunArtifact(dht_test); const run_dht_test = b.addRunArtifact(dht_test);
@@ -412,6 +427,7 @@ pub fn build(b: *std.Build) void {
.name = "basic-file-share", .name = "basic-file-share",
.root_module = basic_file_share_module, .root_module = basic_file_share_module,
}); });
basic_file_share.linkLibC();
b.installArtifact(basic_file_share); b.installArtifact(basic_file_share);
const run_basic_file_share = b.addRunArtifact(basic_file_share); const run_basic_file_share = b.addRunArtifact(basic_file_share);
@@ -433,6 +449,7 @@ pub fn build(b: *std.Build) void {
.name = "file-downloader", .name = "file-downloader",
.root_module = file_downloader_module, .root_module = file_downloader_module,
}); });
file_downloader.linkLibC();
b.installArtifact(file_downloader); b.installArtifact(file_downloader);
const run_file_downloader = b.addRunArtifact(file_downloader); const run_file_downloader = b.addRunArtifact(file_downloader);
@@ -455,6 +472,7 @@ pub fn build(b: *std.Build) void {
.name = "network-discovery", .name = "network-discovery",
.root_module = network_discovery_module, .root_module = network_discovery_module,
}); });
network_discovery.linkLibC();
b.installArtifact(network_discovery); b.installArtifact(network_discovery);
const run_network_discovery = b.addRunArtifact(network_discovery); const run_network_discovery = b.addRunArtifact(network_discovery);
@@ -478,6 +496,7 @@ pub fn build(b: *std.Build) void {
.name = "complete-app", .name = "complete-app",
.root_module = complete_app_module, .root_module = complete_app_module,
}); });
complete_app.linkLibC();
b.installArtifact(complete_app); b.installArtifact(complete_app);
const run_complete_app = b.addRunArtifact(complete_app); const run_complete_app = b.addRunArtifact(complete_app);
@@ -497,6 +516,7 @@ pub fn build(b: *std.Build) void {
.name = "benchmark", .name = "benchmark",
.root_module = benchmark_module, .root_module = benchmark_module,
}); });
benchmark.linkLibC();
b.installArtifact(benchmark); b.installArtifact(benchmark);
const run_benchmark = b.addRunArtifact(benchmark); const run_benchmark = b.addRunArtifact(benchmark);
@@ -529,6 +549,7 @@ pub fn build(b: *std.Build) void {
.name = "llm-agent", .name = "llm-agent",
.root_module = llm_agent_module, .root_module = llm_agent_module,
}); });
llm_agent.linkLibC();
b.installArtifact(llm_agent); b.installArtifact(llm_agent);
const run_llm_agent = b.addRunArtifact(llm_agent); const run_llm_agent = b.addRunArtifact(llm_agent);
@@ -551,6 +572,7 @@ pub fn build(b: *std.Build) void {
.name = "client-agent", .name = "client-agent",
.root_module = client_agent_module, .root_module = client_agent_module,
}); });
client_agent.linkLibC();
b.installArtifact(client_agent); b.installArtifact(client_agent);
const run_client_agent = b.addRunArtifact(client_agent); const run_client_agent = b.addRunArtifact(client_agent);
@@ -573,6 +595,7 @@ pub fn build(b: *std.Build) void {
.name = "a2a-agent", .name = "a2a-agent",
.root_module = a2a_agent_module, .root_module = a2a_agent_module,
}); });
a2a_agent.linkLibC();
b.installArtifact(a2a_agent); b.installArtifact(a2a_agent);
const run_a2a_agent = b.addRunArtifact(a2a_agent); const run_a2a_agent = b.addRunArtifact(a2a_agent);
@@ -595,6 +618,7 @@ pub fn build(b: *std.Build) void {
.name = "a2a-conversation", .name = "a2a-conversation",
.root_module = a2a_conversation_module, .root_module = a2a_conversation_module,
}); });
a2a_conversation.linkLibC();
b.installArtifact(a2a_conversation); b.installArtifact(a2a_conversation);
const run_a2a_conversation = b.addRunArtifact(a2a_conversation); const run_a2a_conversation = b.addRunArtifact(a2a_conversation);
@@ -616,6 +640,7 @@ pub fn build(b: *std.Build) void {
.name = "resume-test", .name = "resume-test",
.root_module = resume_test_module, .root_module = resume_test_module,
}); });
resume_test.linkLibC();
b.installArtifact(resume_test); b.installArtifact(resume_test);
const run_resume_test = b.addRunArtifact(resume_test); const run_resume_test = b.addRunArtifact(resume_test);
@@ -636,6 +661,7 @@ pub fn build(b: *std.Build) void {
.name = "interrupted-transfer-test", .name = "interrupted-transfer-test",
.root_module = interrupted_test_module, .root_module = interrupted_test_module,
}); });
interrupted_test.linkLibC();
b.installArtifact(interrupted_test); b.installArtifact(interrupted_test);
const run_interrupted_test = b.addRunArtifact(interrupted_test); const run_interrupted_test = b.addRunArtifact(interrupted_test);