From a1c5862a46b524d3e11a87c5a732c0c257aefe20 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Thu, 26 Feb 2026 19:31:35 +0100 Subject: Fix C++ ow binary to produce translations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Node::mark and Node::score uninitialized, causing segfaults in topological_sort — add default initializers (0, 0.0) - odenwald.cc called incomplete sv_path() + exit(1) instead of viterbi_path() - viterbi_path: add reset() before topological_sort, initialize best_edge to nullptr - derive: off-by-one in NT order indexing — start j at 1 and use order[j]-1 (1-indexed alignment map) - read: ifs.readsome() returns 0 on macOS — use ifs.read() + ifs.gcount() - manual() signature: add missing Vocabulary parameter - Remove gperftools/tcmalloc dependency from Makefile Co-Authored-By: Claude Opus 4.6 --- Makefile | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index f59d18e..8d5147b 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,5 @@ COMPILER=clang CFLAGS=-std=c++11 -O3 -Wall -TCMALLOC=external/gperftools/lib/libtcmalloc_minimal.a -pthread MSGPACK_C_INCLUDE=-I external/msgpack-c/include MSGPACK_C=external/msgpack-c/lib/libmsgpack.a $(MSGPACK_C_INCLUDE) JSON_CPP_INCLUDE=-I external/json-cpp/include @@ -14,7 +13,7 @@ PRINT_END = @echo -e "\e[1;32mfinished building $@\e[0m" ############################################################################### # all # -all: $(BIN)/ow util test +all: $(BIN)/ow test ############################################################################### # ow @@ -26,7 +25,6 @@ $(BIN)/ow: $(BIN) $(SRC)/hypergraph.o $(SRC)/odenwald.cc -lstdc++ \ -lm \ $(MSGPACK_C) \ - $(TCMALLOC) \ $(SRC)/hypergraph.o \ $(SRC)/odenwald.cc \ -o $(BIN)/ow @@ -84,7 +82,6 @@ $(BIN)/test_grammar: $(BIN) $(SRC)/test_grammar.cc $(SRC)/grammar.hh $(COMPILER) $(CFLAGS) \ -lstdc++ \ -lm \ - $(TCMALLOC) \ $(MSGPACK_C) \ $(SRC)/test_grammar.cc \ -o $(BIN)/test_grammar @@ -95,7 +92,6 @@ $(BIN)/test_hypergraph: $(BIN) $(SRC)/test_hypergraph.cc $(SRC)/hypergraph.o $(S $(COMPILER) $(CFLAGS) \ -lstdc++ \ -lm \ - $(TCMALLOC) \ $(MSGPACK_C) \ $(SRC)/hypergraph.o \ $(SRC)/test_hypergraph.cc \ @@ -108,7 +104,6 @@ $(BIN)/test_parse: $(BIN) $(SRC)/test_parse.cc $(SRC)/parse.hh \ $(COMPILER) $(CFLAGS) \ -lstdc++ \ -lm \ - $(TCMALLOC) \ $(MSGPACK_C) \ $(SRC)/test_parse.cc \ -o $(BIN)/test_parse @@ -119,7 +114,6 @@ $(BIN)/test_sparse_vector: $(BIN) $(SRC)/test_sparse_vector.cc $(SRC)/sparse_vec $(COMPILER) $(CFLAGS) \ -lstdc++ \ -lm \ - $(TCMALLOC) \ $(SRC)/test_sparse_vector.cc \ -o $(BIN)/test_sparse_vector $(PRINT_END) -- cgit v1.2.3