Skip to contentSkip to conversation

Fixed static build which needs to link the pthread library in pidns and pipeio.

PATCH In review nobuhiro 3 participants 5 messages Jul 22, 2009 – Aug 3, 2009

lore
Share & tools
lore

nobuhiro

author
#0 lore raw

PATCH 1/1 Fixed static build which needs to link the pthread library in pidns and pipeio.

---
 testcases/kernel/containers/pidns/Makefile |    2 +-
 testcases/kernel/ipc/pipeio/Makefile       |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
testcases/kernel/containers/pidns/Makefile +1 -1
index 4886d58..14f49da 100644
@@ -20,7 +20,7 @@
 
 CFLAGS += -Wall
 CPPFLAGS += -I../../../../include -I../libclone
-LDLIBS += -L../../../../lib -L../libclone ../libclone/libclone.a -lltp -lrt
+LDLIBS += -L../../../../lib -L../libclone ../libclone/libclone.a -lltp -lrt -lpthread
 
 SRCS    := $(wildcard *.c)
 TARGETS := $(SRCS:%.c=%)
testcases/kernel/ipc/pipeio/Makefile +1 -1
index afd3e8d..d2a1d5f 100644
@@ -22,7 +22,7 @@
 ###########################################################################
 CFLAGS   += -Wall
 CPPFLAGS += -I../../../../include
-LDLIBS   += -L../../../../lib -lltp -lrt
+LDLIBS   += -L../../../../lib -lltp -lrt -lpthread
 
 SRCS=$(wildcard *.c)
 TARGETS=$(patsubst %.c,%,$(SRCS))
Signature · 8 lines
1.6.3.1


------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#1 lore raw
Quoted 12 lines · nobuhiro
---
 testcases/kernel/containers/pidns/Makefile |    2 +-
 testcases/kernel/ipc/pipeio/Makefile       |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
testcases/kernel/containers/pidns/Makefile +0 -0
index 4886d58..14f49da 100644

testcases/kernel/containers/pidns/Makefile line 23

Quoted 5 lines
testcases/kernel/containers/pidns/Makefile +1 -1
@@ -20,7 +20,7 @@
 
 CFLAGS += -Wall
 CPPFLAGS += -I../../../../include -I../libclone
-LDLIBS += -L../../../../lib -L../libclone ../libclone/libclone.a -lltp -lrt
+LDLIBS += -L../../../../lib -L../libclone ../libclone/libclone.a -lltp -lrt -lpthread

I'm not sure this is correct. I just did a CVS update and grepped for "pthread". I don't see a single use of pthreads in there. What output suggested all of these tests need to link to pthreads? Could you at least stick that in the changelog?

testcases/kernel/ipc/pipeio/Makefile line 25

Quoted 13 lines
testcases/kernel/containers/pidns/Makefile +0 -0
 SRCS    := $(wildcard *.c)
 TARGETS := $(SRCS:%.c=%)
testcases/kernel/ipc/pipeio/Makefile +1 -1
index afd3e8d..d2a1d5f 100644
@@ -22,7 +22,7 @@
 ###########################################################################
 CFLAGS   += -Wall
 CPPFLAGS += -I../../../../include
-LDLIBS   += -L../../../../lib -lltp -lrt
+LDLIBS   += -L../../../../lib -lltp -lrt -lpthread

Same here.

Cheers,
-Matt Helsley

------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#2 lore raw
Quoted 14 lines · Matt Helsley
Quoted 13 lines · nobuhiro
---
 testcases/kernel/containers/pidns/Makefile |    2 +-
 testcases/kernel/ipc/pipeio/Makefile       |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
testcases/kernel/containers/pidns/Makefile +0 -0
index 4886d58..14f49da 100644
@@ -20,7 +20,7 @@
 
Quoted 10 lines

testcases/kernel/containers/pidns/Makefile line 23

Quoted 4 lines
testcases/kernel/containers/pidns/Makefile +1 -1
 CFLAGS += -Wall
 CPPFLAGS += -I../../../../include -I../libclone
-LDLIBS += -L../../../../lib -L../libclone ../libclone/libclone.a -lltp -lrt
+LDLIBS += -L../../../../lib -L../libclone ../libclone/libclone.a -lltp -lrt -lpthread

I'm not sure this is correct. I just did a CVS update and grepped for "pthread". I don't see a single use of pthreads in there. What output suggested all of these tests need to link to pthreads? Could you at least stick that in the changelog?

Did you reply to Mattś mail on this ?

Regards--
Subrata

Quoted 16 lines

testcases/kernel/ipc/pipeio/Makefile line 25

Quoted 13 lines
testcases/kernel/containers/pidns/Makefile +0 -0
 SRCS    := $(wildcard *.c)
 TARGETS := $(SRCS:%.c=%)
testcases/kernel/ipc/pipeio/Makefile +1 -1
index afd3e8d..d2a1d5f 100644
@@ -22,7 +22,7 @@
 ###########################################################################
 CFLAGS   += -Wall
 CPPFLAGS += -I../../../../include
-LDLIBS   += -L../../../../lib -lltp -lrt
+LDLIBS   += -L../../../../lib -lltp -lrt -lpthread

Same here.

Quoted 8 lines

Cheers,
-Matt Helsley

------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#3 lore raw
Quoted 26 lines · Subrata Modak
Quoted 14 lines · Matt Helsley
Quoted 13 lines · nobuhiro
---
 testcases/kernel/containers/pidns/Makefile |    2 +-
 testcases/kernel/ipc/pipeio/Makefile       |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
testcases/kernel/containers/pidns/Makefile +0 -0
index 4886d58..14f49da 100644
@@ -20,7 +20,7 @@
 
Quoted 10 lines

testcases/kernel/containers/pidns/Makefile line 23

Quoted 4 lines
testcases/kernel/containers/pidns/Makefile +1 -1
 CFLAGS += -Wall
 CPPFLAGS += -I../../../../include -I../libclone
-LDLIBS += -L../../../../lib -L../libclone ../libclone/libclone.a -lltp -lrt
+LDLIBS += -L../../../../lib -L../libclone ../libclone/libclone.a -lltp -lrt -lpthread

I'm not sure this is correct. I just did a CVS update and grepped for "pthread". I don't see a single use of pthreads in there. What output suggested all of these tests need to link to pthreads? Could you at least stick that in the changelog?

Quoted 1 line

Did you reply to Mattś mail on this ?

Yes, I got a reply. Maybe it wasn't cc'd to the LTP mailing list?

Regardless, I'm satisfied with the patch itself. As I said before the changelog would be nicer if it included a snippet of the output that justifies it (included here for convenience):

When static linking, the pthread stuff is due to the undefined pthread symbols in librt.a and libgcc_eh.a.
make[4]: Entering directory `/home/nobuhiro/git_repo/os/ltp/testcases/kernel/ipc/pipeio'
cc -Wall -static -Wall -I../../../../include pipeio.c -L../../../../lib
-lltp -lrt -o pipeio /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/../../../../lib64/librt.a(aio_suspend.o):
In function `cleanup':
(.text+0xa): undefined reference to `pthread_mutex_lock'

Thanks to Nobuhiro.

Cheers,
-Matt Helsley

Quoted 29 lines

Regards--
Subrata

Quoted 24 lines

testcases/kernel/ipc/pipeio/Makefile line 25

Quoted 13 lines
testcases/kernel/containers/pidns/Makefile +0 -0
 SRCS    := $(wildcard *.c)
 TARGETS := $(SRCS:%.c=%)
testcases/kernel/ipc/pipeio/Makefile +1 -1
index afd3e8d..d2a1d5f 100644
@@ -22,7 +22,7 @@
 ###########################################################################
 CFLAGS   += -Wall
 CPPFLAGS += -I../../../../include
-LDLIBS   += -L../../../../lib -lltp -lrt
+LDLIBS   += -L../../../../lib -lltp -lrt -lpthread

Same here.

Cheers,
-Matt Helsley

------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#4 lore raw
Quoted 46 lines · Matt Helsley
Quoted 26 lines · Subrata Modak
Quoted 14 lines · Matt Helsley
Quoted 13 lines · nobuhiro
---
 testcases/kernel/containers/pidns/Makefile |    2 +-
 testcases/kernel/ipc/pipeio/Makefile       |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
testcases/kernel/containers/pidns/Makefile +0 -0
index 4886d58..14f49da 100644
@@ -20,7 +20,7 @@
 
Quoted 10 lines

testcases/kernel/containers/pidns/Makefile line 23

Quoted 4 lines
testcases/kernel/containers/pidns/Makefile +1 -1
 CFLAGS += -Wall
 CPPFLAGS += -I../../../../include -I../libclone
-LDLIBS += -L../../../../lib -L../libclone ../libclone/libclone.a -lltp -lrt
+LDLIBS += -L../../../../lib -L../libclone ../libclone/libclone.a -lltp -lrt -lpthread

I'm not sure this is correct. I just did a CVS update and grepped for "pthread". I don't see a single use of pthreads in there. What output suggested all of these tests need to link to pthreads? Could you at least stick that in the changelog?

Quoted 1 line

Did you reply to Mattś mail on this ?

Yes, I got a reply. Maybe it wasn't cc'd to the LTP mailing list?

Regardless, I'm satisfied with the patch itself. As I said before the changelog would be nicer if it included a snippet of the output that justifies it (included here for convenience):

When static linking, the pthread stuff is due to the undefined pthread symbols in librt.a and libgcc_eh.a.
make[4]: Entering directory `/home/nobuhiro/git_repo/os/ltp/testcases/kernel/ipc/pipeio'
cc -Wall -static -Wall -I../../../../include pipeio.c -L../../../../lib
-lltp -lrt -o pipeio /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/../../../../lib64/librt.a(aio_suspend.o):
In function `cleanup':
(.text+0xa): undefined reference to `pthread_mutex_lock'

Quoted 1 line

Thanks to Nobuhiro.

Thanks to both of you. And i included the above in the log message.

Regards--
Subrata

Quoted 33 lines

Cheers,
-Matt Helsley

Quoted 29 lines

Regards--
Subrata

Quoted 24 lines

testcases/kernel/ipc/pipeio/Makefile line 25

Quoted 13 lines
testcases/kernel/containers/pidns/Makefile +0 -0
 SRCS    := $(wildcard *.c)
 TARGETS := $(SRCS:%.c=%)
testcases/kernel/ipc/pipeio/Makefile +1 -1
index afd3e8d..d2a1d5f 100644
@@ -22,7 +22,7 @@
 ###########################################################################
 CFLAGS   += -Wall
 CPPFLAGS += -I../../../../include
-LDLIBS   += -L../../../../lib -lltp -lrt
+LDLIBS   += -L../../../../lib -lltp -lrt -lpthread

Same here.

Cheers,
-Matt Helsley

------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list