[CRIU] [PATCH] test/others/rpc: fix build error

Venkateswara Rao Mandela venkat.mandela at ti.com
Fri Nov 25 06:31:24 PST 2016


Build in tests/others/rpc folder was failing due to the use of LDFLAGS
variable instead of LDLIBS variable to link libprotobuf-c. The makefile
uses implicit build rules.

$(CC) $(LDFLAGS) n.o $(LOADLIBES) $(LDLIBS)

Using LDFLAGS places -llibprotobuf-c before the object files, preventing
the library from being searched for required functions.  This commit
changes the variable to LDLIBS instead to fix the issue.

Signed-off-by: Venkateswara Rao Mandela <venkat.mandela at ti.com>
---
 test/others/rpc/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/others/rpc/Makefile b/test/others/rpc/Makefile
index 8bd663e..bf2a2d2 100644
--- a/test/others/rpc/Makefile
+++ b/test/others/rpc/Makefile
@@ -2,7 +2,7 @@ all: test-c rpc_pb2.py criu
 .PHONY: all
 
 CFLAGS += -g -Werror -Wall -I.
-LDFLAGS += -lprotobuf-c
+LDLIBS +=  -lprotobuf-c
 
 run: all
 	mkdir -p build
-- 
2.10.2



More information about the CRIU mailing list