Skip to content

Commit 2278dfd

Browse files
Fix build error for unit test (valkey-io#473)
Fix the compile error with the following command: `make all-with-unit-tests SERVER_CFLAGS='-Werror -DSERVER_TEST' ` ``` /usr/bin/ld: /home/ubuntu/valkey-shiv-repo/valkey/src/eval.c:1172: undefined reference to `lua_next' /usr/bin/ld: /home/ubuntu/valkey-shiv-repo/valkey/src/eval.c:1154: undefined reference to `lua_toboolean' /usr/bin/ld: /home/ubuntu/valkey-shiv-repo/valkey/src/eval.c:1175: undefined reference to `lua_type' /usr/bin/ld: /home/ubuntu/valkey-shiv-repo/valkey/src/eval.c:1176: undefined reference to `lua_tonumber' collect2: error: ld returned 1 exit status make[1]: *** [Makefile:469: valkey-unit-tests] Error 1 make[1]: Leaving directory '/home/ubuntu/valkey-shiv-repo/valkey/src' make: *** [Makefile:6: all-with-unit-tests] Error 2 ``` Issue is happened as all deps libraries not linked for valkey-unit-tests, so linked all libraries to the binary. Signed-off-by: Shivshankar-Reddy <[email protected]>
1 parent 315b757 commit 2278dfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ $(ENGINE_LIB_NAME): $(ENGINE_SERVER_OBJ)
466466

467467
# valkey-unit-tests
468468
$(ENGINE_UNIT_TESTS): $(ENGINE_TEST_OBJ) $(ENGINE_LIB_NAME)
469-
$(SERVER_LD) $(ALLOW_DUPLICATE_FLAG) -o $@ $^ ../deps/fpconv/libfpconv.a $(FINAL_LIBS)
469+
$(SERVER_LD) $(ALLOW_DUPLICATE_FLAG) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a ../deps/hdr_histogram/libhdrhistogram.a ../deps/fpconv/libfpconv.a $(FINAL_LIBS)
470470

471471
# valkey-sentinel
472472
$(ENGINE_SENTINEL_NAME): $(SERVER_NAME)

0 commit comments

Comments
 (0)