On Mon, Jul 6, 2009 at 3:52 PM, Henry Yei<[email protected]> wrote: > Garrett, > > This is definitely true from cpuset_memory_pressure_test and > cpuset_memory_spread_test make files, but cpuset_memory_test needs the > -lpthread. > > > Using implicit rules, I get the following error: > > [15:48:27][h...@hyei2:/tmp/ltp-full-20090531/testcases/kernel/controllers/cpuset/cpuset_memory_test]$ > make > gcc cpuset_memory_test.o ../cpuset_lib/cpuinfo.o ../cpuset_lib/libbitmask.o > ../cpuset_lib/libcpuset.o ../cpuset_lib/meminfo.o -o cpuset_memory_test > cpuset_memory_test.o: In function `thread2_routine': > /tmp/ltp-full-20090531/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_test.c:333: > undefined reference to `pthread_sigmask' > cpuset_memory_test.o: In function `main': > /tmp/ltp-full-20090531/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_test.c:370: > undefined reference to `pthread_create' > /tmp/ltp-full-20090531/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_test.c:372: > undefined reference to `pthread_sigmask' > /tmp/ltp-full-20090531/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_test.c:380: > undefined reference to `pthread_cancel' > /tmp/ltp-full-20090531/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_test.c:381: > undefined reference to `pthread_join' > collect2: ld returned 1 exit status > make: *** [cpuset_memory_test] Error 1 > > If there is something I'm missing, let me know and I'll re-submit the prior > patches. > > -----Original Message----- > From: Garrett Cooper [mailto:[email protected]] > Sent: Monday, July 06, 2009 2:53 PM > To: Henry Yei > Cc: [email protected] > Subject: Re: [LTP] [PATCH] controllers/cpuset tests: use CC variable isntead > of hardcoded cc to fix cross compiling > > On Mon, Jul 6, 2009 at 2:34 PM, Henry Yei<[email protected]> wrote: >> I am submitting patches for the Makefiles of the following tests: >> cpuset_memory_pressure_test, cpuset_memory_spread_test , and >> cpuset_memory_test. Instead of using cc (host compiler), use $(CC) for >> provide for cross compiling. > > Just delete: > > + $(CC) cpuset_memory_test.o $(LIBOBJECTS) -o cpuset_memory_test > +-lpthread > > implicit rules will take care of the rest. > > -Garrett
Well, you kind of have to do: LDLIBS += -lpthread somewhere in the Makefile. Sorry for not explicitly mentioning that point ;\... Thanks, -Garrett ------------------------------------------------------------------------------ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
