ldd01: using 'ppc' to check powerpc arch
PATCH 1/1 ldd01: using 'ppc' to check powerpc arch
Hello,
The ldd01 always failed on some powerpc systems of ours. I have figured out a patch. Please take a look. Thanks in advance.
On some powerpc system, the 'uname -a' doesn't show 'powerpc' but will show 'ppc'. So we need using it to check the powerpc arch.
--- testcases/commands/ade/ldd/ldd01 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/commands/ade/ldd/ldd01 +1 -1
@@ -47,7 +47,7 @@ do_setup() mkdir $TCtmp # Check for ppc64 architecture or x86_64 architecture - if uname -a | grep -iq powerpc; then + if uname -a | grep -iq 'ppc\|powerpc'; then file lddfile1.obj | grep 64-bit >/dev/null 2>&1 if [ $? -eq 0 ]; then CFLAGS="-m64"
Signature · 13 lines
1.9.3 ------------------------------------------------------------------------------ Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Han Pingtian <[email protected]> wrote on 09/11/2014 07:57:09 AM:
Quoted 43 lines
Han Pingtian <[email protected]>
09/11/2014 07:57 AMTo
cc
Subject
[LTP] [PATCH] ldd01: using 'ppc' to check powerpc arch
Hello,
The ldd01 always failed on some powerpc systems of ours. I have figured out a patch. Please take a look. Thanks in advance.On some powerpc system, the 'uname -a' doesn't show 'powerpc' but will show 'ppc'. So we need using it to check the powerpc arch.
Signed-off-by Han Pingtian <[email protected]>--- testcases/commands/ade/ldd/ldd01 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)testcases/commands/ renamed from testcases/commands/ade/ldd/ldd01 +0
-0ade/ldd/ldd01
index c60d3ac..569902e 100755testcases/commands/ade/ldd/ldd01 +1
-1@@ -47,7 +47,7 @@ do_setup() mkdir $TCtmp # Check for ppc64 architecture or x86_64 architecture - if uname -a | grep -iq powerpc; then + if uname -a | grep -iq 'ppc\|powerpc'; then file lddfile1.obj | grep 64-bit >/dev/null 2>&1 if [ $? -eq 0 ]; then CFLAGS="-m64"Signature · 1 line
1.9.3
Verified on PPC machine this fix helps
Quoted 2 lines
------------------------------------------------------------------------------
Quoted 5 lines
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
Quoted 5 lines
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 18 lines · Han Pingtian
Hello,
The ldd01 always failed on some powerpc systems of ours. I have figured out a patch. Please take a look. Thanks in advance.On some powerpc system, the 'uname -a' doesn't show 'powerpc' but will show 'ppc'. So we need using it to check the powerpc arch.
Signed-off-by Han Pingtian <[email protected]>--- testcases/commands/ade/ldd/ldd01 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)testcases/commands/ade/ldd/ldd01 +0
-0
testcases/commands/ade/ldd/ldd01 do_setup() · line 53
Quoted 8 lines
testcases/commands/ade/ldd/ldd01 +1
-1@@ -47,7 +47,7 @@ do_setup() mkdir $TCtmp # Check for ppc64 architecture or x86_64 architecture - if uname -a | grep -iq powerpc; then + if uname -a | grep -iq 'ppc\|powerpc'; then file lddfile1.obj | grep 64-bit >/dev/null 2>&1 if [ $? -eq 0 ]; then CFLAGS="-m64"
Hi,
what is the purpose of those -m32/-m64 flags in this test? Can't we just compile it with LTP makefiles using whatever CFLAGS were passed to configure?
Would you be willing to try attached patch, which moves the build of .so and a.out into Makefile? I have tested it on x86 with and without -m32 and it worked fine. Or alternatively, can you describe the ppc system where this is failing, so I could try to reproduce it myself?
Regards,
Jan
From 1ea966268e7a55f21d9254b62462d4adb40c7a0a Mon Sep 17 00:00:00 2001
Message-Id: <1ea966268e7a55f21d9254b62462d4adb40c7a0a.1410445852.git.jstancek@redhat.com>
From: Jan Stancek <[email protected]>
Date: Thu, 11 Sep 2014 14:57:37 +0200
Subject: [PATCH] v1
--- testcases/commands/ade/ldd/Makefile | 13 +++++++++++-- testcases/commands/ade/ldd/ldd01 | 28 ++++------------------------ testcases/commands/ade/ldd/lddfile1.c | 2 +- testcases/commands/ade/ldd/lddfile2.c | 2 +- testcases/commands/ade/ldd/lddfile3.c | 2 +- testcases/commands/ade/ldd/lddfile4.c | 2 +- testcases/commands/ade/ldd/lddfile5.c | 2 +- 7 files changed, 20 insertions(+), 31 deletions(-)
testcases/commands/ade/ldd/Makefile +11 -2
@@ -28,9 +28,18 @@ CPPFLAGS += -fpic INSTALL_TARGETS := ldd01 -MAKE_TARGETS := $(patsubst $(abs_srcdir)/%.c,%.obj,$(wildcard $(abs_srcdir)/*.c)) +LDD_C_FILES := $(wildcard $(abs_srcdir)/lddfile*.c) +LDD_SO_FILES := $(patsubst $(abs_srcdir)/%.c,%.obj.so,$(LDD_C_FILES)) +MAKE_TARGETS := $(LDD_SO_FILES) lddfile.out +CLEAN_TARGETS += *.obj -$(MAKE_TARGETS): %.obj: %.o +%.obj: %.o mv $^ $@ +%.obj.so: %.obj + $(CC) $(CFLAGS) -shared -o $@ $^ + +lddfile.out: main.obj $(LDD_SO_FILES) + $(CC) $(CFLAGS) -O -o $@ $(LDD_SO_FILES) main.obj + include $(top_srcdir)/include/mk/generic_leaf_target.mk
testcases/commands/ade/ldd/ldd01 +4 -24
@@ -35,42 +35,22 @@ $trace_logic CC=${CC:=gcc} LDD=${LDD:=ldd} TCdat=${TCdat:-`pwd`} -TCtmp=${TCtmp:-/tmp/ldd01-$$} do_cleanup() { - rm -rf $TCtmp + : } do_setup() { - mkdir $TCtmp - - # Check for ppc64 architecture or x86_64 architecture - if uname -a | grep -iq powerpc; then - file lddfile1.obj | grep 64-bit >/dev/null 2>&1 - if [ $? -eq 0 ]; then - CFLAGS="-m64" - fi - elif uname -a | grep -iq x86_64; then - file lddfile1.obj | grep 32-bit >/dev/null 2>&1 - if [ $? -eq 0 ]; then - CFLAGS="-m32" - fi - fi - $CC $CFLAGS -shared -o $TCtmp/lddfile1.obj.so $TCdat/lddfile1.obj - $CC $CFLAGS -shared -o $TCtmp/lddfile2.obj.so $TCdat/lddfile2.obj - $CC $CFLAGS -shared -o $TCtmp/lddfile3.obj.so $TCdat/lddfile3.obj - $CC $CFLAGS -shared -o $TCtmp/lddfile4.obj.so $TCdat/lddfile4.obj - $CC $CFLAGS -shared -o $TCtmp/lddfile5.obj.so $TCdat/lddfile5.obj - $CC $CFLAGS -O -o $TCtmp/a.out $TCtmp/lddfile*.obj.so $TCdat/main.obj + : } do_test() { echo " ASSERTION 1 " - $LDD $TCtmp/a.out | grep -E "lddfile1.obj.so|lddfile2.obj.so|lddfile3.obj.so|lddfile4.obj.so|lddfile5.obj.so" + $LDD lddfile.out | grep -E "lddfile1.obj.so|lddfile2.obj.so|lddfile3.obj.so|lddfile4.obj.so|lddfile5.obj.so" if [ $? -eq 0 ]; then echo "ASSERTION #1 PASS" else
@@ -81,7 +61,7 @@ do_test() echo " ASSERTION 2 " - $LDD -v $TCtmp/a.out | grep -E "GLIBC|lddfile1.obj.so|lddfile2.obj.so|lddfile3.obj.so|lddfile4.obj.so|lddfile5.obj.so" + $LDD -v lddfile.out | grep -E "GLIBC|lddfile1.obj.so|lddfile2.obj.so|lddfile3.obj.so|lddfile4.obj.so|lddfile5.obj.so" if [ $? -eq 0 ]; then echo "ASSERTION #2 PASS" else
testcases/commands/ade/ldd/lddfile1.c +1 -1
@@ -1,5 +1,5 @@#include <stdio.h> -void file1 () +void file1 (void ) {printf ("Control in function %s\n" , __func__); }
testcases/commands/ade/ldd/lddfile2.c +1 -1
@@ -1,5 +1,5 @@#include <stdio.h> -void file2 () +void file2 (void ) {printf ("Control in function %s\n" , __func__); }
testcases/commands/ade/ldd/lddfile3.c +1 -1
@@ -1,5 +1,5 @@#include <stdio.h> -void file3 () +void file3 (void ) {printf ("Control in function %s\n" , __func__); }
testcases/commands/ade/ldd/lddfile4.c +1 -1
@@ -1,5 +1,5 @@#include <stdio.h> -void file4 () +void file4 (void ) {printf ("Control in function %s\n" , __func__); }
testcases/commands/ade/ldd/lddfile5.c +1 -1
@@ -1,5 +1,5 @@#include <stdio.h> -void file5 () +void file5 (void ) {printf ("Control in function %s\n" , __func__); }
Signature · 1 line
1.7.1
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 2 lines · Jan Stancek
Would you be willing to try attached patch, which moves the build of .so and a.out into
Makefile?
I have tested your patch but ldd cannot find the lib files:
% sudo ./ldd01
ASSERTION 1
lddfile1.obj.so => not found lddfile2.obj.so => not found lddfile3.obj.so => not found lddfile4.obj.so => not found lddfile5.obj.so => not found
ASSERTION #1 PASS
ASSERTION 2
lddfile1.obj.so => not found lddfile2.obj.so => not found lddfile3.obj.so => not found lddfile4.obj.so => not found lddfile5.obj.so => not found
libc.so.6 (GLIBC_2.3) => /lib64/libc.so.6 libc.so.6 (GLIBC_2.4) => /lib64/libc.so.6 ld64.so.1 (GLIBC_PRIVATE) => /lib64/ld64.so.1 ld64.so.1 (GLIBC_2.3) => /lib64/ld64.so.1
ASSERTION #2 PASS
TEST PASSES
on the contray, with my patch lib files can be found:
% ./ldd01
ASSERTION 1
/tmp/ldd01-9497/lddfile1.obj.so (0x00000fffad800000)
/tmp/ldd01-9497/lddfile2.obj.so (0x00000fffad7e0000)
/tmp/ldd01-9497/lddfile3.obj.so (0x00000fffad7c0000)
/tmp/ldd01-9497/lddfile4.obj.so (0x00000fffad7a0000)
/tmp/ldd01-9497/lddfile5.obj.so (0x00000fffad780000)
ASSERTION #1 PASS
ASSERTION 2
/tmp/ldd01-9497/lddfile1.obj.so (0x00000fffb1d20000)
/tmp/ldd01-9497/lddfile2.obj.so (0x00000fffb1d00000)
/tmp/ldd01-9497/lddfile3.obj.so (0x00000fffb1ce0000)
/tmp/ldd01-9497/lddfile4.obj.so (0x00000fffb1cc0000)
/tmp/ldd01-9497/lddfile5.obj.so (0x00000fffb1ca0000)
libc.so.6 (GLIBC_2.3) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.4) => /lib64/libc.so.6
/tmp/ldd01-9497/lddfile1.obj.so:
libc.so.6 (GLIBC_2.3) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.4) => /lib64/libc.so.6
/tmp/ldd01-9497/lddfile2.obj.so:
libc.so.6 (GLIBC_2.3) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.4) => /lib64/libc.so.6
/tmp/ldd01-9497/lddfile3.obj.so:
libc.so.6 (GLIBC_2.3) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.4) => /lib64/libc.so.6
/tmp/ldd01-9497/lddfile4.obj.so:
libc.so.6 (GLIBC_2.3) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.4) => /lib64/libc.so.6
/tmp/ldd01-9497/lddfile5.obj.so:
libc.so.6 (GLIBC_2.3) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.4) => /lib64/libc.so.6
ld64.so.1 (GLIBC_PRIVATE) => /lib64/ld64.so.1
ld64.so.1 (GLIBC_2.3) => /lib64/ld64.so.1ASSERTION #2 PASS
TEST PASSES
Quoted 3 lines
Or alternatively, can you describe
the ppc system where this is failing, so I could try to reproduce it myself?
This is a power 6 system, which running a beta version rhel5.11. Without my patch, it failed with those messages:
% ./ldd01/usr/bin/ld: warning: powerpc:common64 architecture of input file /testcases/ltp/testcases/commands/ade/ldd/lddfile1.obj' is incompatible with powerpc:common output /usr/bin/ld: warning: powerpc:common64 architecture of input file /testcases/ltp/testcases/commands/ade/ldd/lddfile2.obj' is incompatible with powerpc:common output /usr/bin/ld: warning: powerpc:common64 architecture of input file /testcases/ltp/testcases/commands/ade/ldd/lddfile3.obj' is incompatible with powerpc:common output /usr/bin/ld: warning: powerpc:common64 architecture of input file /testcases/ltp/testcases/commands/ade/ldd/lddfile4.obj' is incompatible with powerpc:common output /usr/bin/ld: warning: powerpc:common64 architecture of input file /testcases/ltp/testcases/commands/ade/ldd/lddfile5.obj' is incompatible with powerpc:common output /usr/bin/ld: warning: powerpc:common64 architecture of input file /testcases/ltp/testcases/commands/ade/ldd/main.obj' is incompatible with powerpc:common output /testcases/ltp/testcases/commands/ade/ldd/main.obj: In function `main':/home/hpt/ltp-full-20130503.64b/testcases/commands/ade/ldd/main.c:11: relocation truncated to fit: R_PPC64_REL24 against file1' /home/hpt/ltp-full-20130503.64b/testcases/commands/ade/ldd/main.c:12: relocation truncated to fit: R_PPC64_REL24 against file2' /home/hpt/ltp-full-20130503.64b/testcases/commands/ade/ldd/main.c:13: relocation truncated to fit: R_PPC64_REL24 against file3' /home/hpt/ltp-full-20130503.64b/testcases/commands/ade/ldd/main.c:14: relocation truncated to fit: R_PPC64_REL24 against file4' /home/hpt/ltp-full-20130503.64b/testcases/commands/ade/ldd/main.c:15: relocation truncated to fit: R_PPC64_REL24 against file5' /home/hpt/ltp-full-20130503.64b/testcases/commands/ade/ldd/main.c:16: relocation truncated to fit: R_PPC64_REL24 against puts'
collect2: ld returned 1 exit status
ASSERTION 1
ldd: /tmp/ldd01-14133/a.out: No such file or directory
ASSERTION #1 FAIL
Quoted 158 lines
Quoted 1 line
From
1ea966268e7a55f21d9254b62462d4adb40c7a0aMon Sep 17 00:00:00 2001Message-Id: <1ea966268e7a55f21d9254b62462d4adb40c7a0a.1410445852.git.jstancek@redhat.com>
From: Jan Stancek <[email protected]>
Date: Thu, 11 Sep 2014 14:57:37 +0200
Subject: [PATCH] v1--- testcases/commands/ade/ldd/Makefile | 13 +++++++++++-- testcases/commands/ade/ldd/ldd01 | 28 ++++------------------------ testcases/commands/ade/ldd/lddfile1.c | 2 +- testcases/commands/ade/ldd/lddfile2.c | 2 +- testcases/commands/ade/ldd/lddfile3.c | 2 +- testcases/commands/ade/ldd/lddfile4.c | 2 +- testcases/commands/ade/ldd/lddfile5.c | 2 +- 7 files changed, 20 insertions(+), 31 deletions(-)testcases/commands/ade/ldd/Makefile +11
-2@@ -28,9 +28,18 @@ CPPFLAGS += -fpic INSTALL_TARGETS := ldd01 -MAKE_TARGETS := $(patsubst $(abs_srcdir)/%.c,%.obj,$(wildcard $(abs_srcdir)/*.c)) +LDD_C_FILES := $(wildcard $(abs_srcdir)/lddfile*.c) +LDD_SO_FILES := $(patsubst $(abs_srcdir)/%.c,%.obj.so,$(LDD_C_FILES)) +MAKE_TARGETS := $(LDD_SO_FILES) lddfile.out +CLEAN_TARGETS += *.obj -$(MAKE_TARGETS): %.obj: %.o +%.obj: %.o mv $^ $@ +%.obj.so: %.obj + $(CC) $(CFLAGS) -shared -o $@ $^ + +lddfile.out: main.obj $(LDD_SO_FILES) + $(CC) $(CFLAGS) -O -o $@ $(LDD_SO_FILES) main.obj + include $(top_srcdir)/include/mk/generic_leaf_target.mktestcases/commands/ade/ldd/ldd01 +4
-24@@ -35,42 +35,22 @@ $trace_logic CC=${CC:=gcc} LDD=${LDD:=ldd} TCdat=${TCdat:-`pwd`} -TCtmp=${TCtmp:-/tmp/ldd01-$$} do_cleanup() { - rm -rf $TCtmp + : } do_setup() { - mkdir $TCtmp - - # Check for ppc64 architecture or x86_64 architecture - if uname -a | grep -iq powerpc; then - file lddfile1.obj | grep 64-bit >/dev/null 2>&1 - if [ $? -eq 0 ]; then - CFLAGS="-m64" - fi - elif uname -a | grep -iq x86_64; then - file lddfile1.obj | grep 32-bit >/dev/null 2>&1 - if [ $? -eq 0 ]; then - CFLAGS="-m32" - fi - fi - $CC $CFLAGS -shared -o $TCtmp/lddfile1.obj.so $TCdat/lddfile1.obj - $CC $CFLAGS -shared -o $TCtmp/lddfile2.obj.so $TCdat/lddfile2.obj - $CC $CFLAGS -shared -o $TCtmp/lddfile3.obj.so $TCdat/lddfile3.obj - $CC $CFLAGS -shared -o $TCtmp/lddfile4.obj.so $TCdat/lddfile4.obj - $CC $CFLAGS -shared -o $TCtmp/lddfile5.obj.so $TCdat/lddfile5.obj - $CC $CFLAGS -O -o $TCtmp/a.out $TCtmp/lddfile*.obj.so $TCdat/main.obj + : } do_test() { echo " ASSERTION 1 " - $LDD $TCtmp/a.out | grep -E "lddfile1.obj.so|lddfile2.obj.so|lddfile3.obj.so|lddfile4.obj.so|lddfile5.obj.so" + $LDD lddfile.out | grep -E "lddfile1.obj.so|lddfile2.obj.so|lddfile3.obj.so|lddfile4.obj.so|lddfile5.obj.so" if [ $? -eq 0 ]; then echo "ASSERTION #1 PASS" else@@ -81,7 +61,7 @@ do_test() echo " ASSERTION 2 " - $LDD -v $TCtmp/a.out | grep -E "GLIBC|lddfile1.obj.so|lddfile2.obj.so|lddfile3.obj.so|lddfile4.obj.so|lddfile5.obj.so" + $LDD -v lddfile.out | grep -E "GLIBC|lddfile1.obj.so|lddfile2.obj.so|lddfile3.obj.so|lddfile4.obj.so|lddfile5.obj.so" if [ $? -eq 0 ]; then echo "ASSERTION #2 PASS" elsetestcases/commands/ade/ldd/lddfile1.c +1
-1@@ -1,5 +1,5 @@#include <stdio.h> -void file1 () +void file1 (void ) {printf ("Control in function %s\n" , __func__); }testcases/commands/ade/ldd/lddfile2.c +1
-1@@ -1,5 +1,5 @@#include <stdio.h> -void file2 () +void file2 (void ) {printf ("Control in function %s\n" , __func__); }testcases/commands/ade/ldd/lddfile3.c +1
-1@@ -1,5 +1,5 @@#include <stdio.h> -void file3 () +void file3 (void ) {printf ("Control in function %s\n" , __func__); }testcases/commands/ade/ldd/lddfile4.c +1
-1@@ -1,5 +1,5 @@#include <stdio.h> -void file4 () +void file4 (void ) {printf ("Control in function %s\n" , __func__); }testcases/commands/ade/ldd/lddfile5.c +1
-1@@ -1,5 +1,5 @@#include <stdio.h> -void file5 () +void file5 (void ) {printf ("Control in function %s\n" , __func__); }Signature · 1 line
1.7.1
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
----- Original Message -----
Quoted 10 lines
From: "Han Pingtian" <[email protected]>
To: [email protected]
Sent: Friday, 12 September, 2014 9:28:45 AM
Subject: Re: [LTP] [PATCH] ldd01: using 'ppc' to check powerpc archQuoted 2 lines · Jan Stancek
Would you be willing to try attached patch, which moves the build of .so and a.out into
Makefile?I have tested your patch but ldd cannot find the lib files:
That's only matter of setting correct LD_LIBRARY_PATH:
$ env LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH ./ldd01 ASSERTION 1 lddfile1.obj.so => ./lddfile1.obj.so (0x00007f06504db000) lddfile2.obj.so => ./lddfile2.obj.so (0x00007f06502d9000) lddfile3.obj.so => ./lddfile3.obj.so (0x00007f06500d8000) lddfile4.obj.so => ./lddfile4.obj.so (0x00007f064fed7000) lddfile5.obj.so => ./lddfile5.obj.so (0x00007f064fcd5000) ASSERTION #1 PASS ASSERTION 2 lddfile1.obj.so => ./lddfile1.obj.so (0x00007ffe913e9000) lddfile2.obj.so => ./lddfile2.obj.so (0x00007ffe911e7000) lddfile3.obj.so => ./lddfile3.obj.so (0x00007ffe90fe6000) lddfile4.obj.so => ./lddfile4.obj.so (0x00007ffe90de5000) lddfile5.obj.so => ./lddfile5.obj.so (0x00007ffe90be3000) libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6 libc.so.6 (GLIBC_2.3.4) => /lib64/libc.so.6 ./lddfile1.obj.so: libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6 libc.so.6 (GLIBC_2.3.4) => /lib64/libc.so.6 ./lddfile2.obj.so: libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6 libc.so.6 (GLIBC_2.3.4) => /lib64/libc.so.6 ./lddfile3.obj.so: libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6 libc.so.6 (GLIBC_2.3.4) => /lib64/libc.so.6 ./lddfile4.obj.so: libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6 libc.so.6 (GLIBC_2.3.4) => /lib64/libc.so.6 ./lddfile5.obj.so: libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6 libc.so.6 (GLIBC_2.3.4) => /lib64/libc.so.6 ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2 ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2 ASSERTION #2 PASS TEST PASSES
Quoted 6 lines
Quoted 4 lines
Or alternatively, can you describe
the ppc system where this is failing, so I could try to reproduce it myself?This is a power 6 system, which running a beta version rhel5.11. Without my patch, it failed with those messages:
It also fails (with or without your patch) when built as 32-bit on RHEL7 ppc64:
# ./ldd01 /usr/bin/ld: powerpc:common architecture of input file `/root/ltp/testcases/commands/ade/ldd/lddfile1.obj' is incompatible with powerpc:common64 output /root/ltp/testcases/commands/ade/ldd/lddfile1.obj: In function `file1': /root/ltp/testcases/commands/ade/ldd/lddfile1.c:3: undefined reference to `_GLOBAL_OFFSET_TABLE_' /root/ltp/testcases/commands/ade/ldd/lddfile1.c:3: undefined reference to `_GLOBAL_OFFSET_TABLE_' collect2: error: ld returned 1 exit status /usr/bin/ld: powerpc:common architecture of input file `/root/ltp/testcases/commands/ade/ldd/lddfile2.obj' is incompatible with powerpc:common64 output /root/ltp/testcases/commands/ade/ldd/lddfile2.obj: In function `file2': /root/ltp/testcases/commands/ade/ldd/lddfile2.c:3: undefined reference to `_GLOBAL_OFFSET_TABLE_' /root/ltp/testcases/commands/ade/ldd/lddfile2.c:3: undefined reference to `_GLOBAL_OFFSET_TABLE_' collect2: error: ld returned 1 exit status /usr/bin/ld: powerpc:common architecture of input file `/root/ltp/testcases/commands/ade/ldd/lddfile3.obj' is incompatible with powerpc:common64 output /root/ltp/testcases/commands/ade/ldd/lddfile3.obj: In function `file3': /root/ltp/testcases/commands/ade/ldd/lddfile3.c:3: undefined reference to `_GLOBAL_OFFSET_TABLE_' /root/ltp/testcases/commands/ade/ldd/lddfile3.c:3: undefined reference to `_GLOBAL_OFFSET_TABLE_' collect2: error: ld returned 1 exit status /usr/bin/ld: powerpc:common architecture of input file `/root/ltp/testcases/commands/ade/ldd/lddfile4.obj' is incompatible with powerpc:common64 output /root/ltp/testcases/commands/ade/ldd/lddfile4.obj: In function `file4': /root/ltp/testcases/commands/ade/ldd/lddfile4.c:3: undefined reference to `_GLOBAL_OFFSET_TABLE_' /root/ltp/testcases/commands/ade/ldd/lddfile4.c:3: undefined reference to `_GLOBAL_OFFSET_TABLE_' collect2: error: ld returned 1 exit status /usr/bin/ld: powerpc:common architecture of input file `/root/ltp/testcases/commands/ade/ldd/lddfile5.obj' is incompatible with powerpc:common64 output /root/ltp/testcases/commands/ade/ldd/lddfile5.obj: In function `file5': /root/ltp/testcases/commands/ade/ldd/lddfile5.c:3: undefined reference to `_GLOBAL_OFFSET_TABLE_' /root/ltp/testcases/commands/ade/ldd/lddfile5.c:3: undefined reference to `_GLOBAL_OFFSET_TABLE_' collect2: error: ld returned 1 exit status gcc: error: /tmp/ldd01-26565/lddfile*.obj.so: No such file or directory ASSERTION 1 ldd: /tmp/ldd01-26565/a.out: No such file or directory ASSERTION #1 FAIL
which is why I'd prefer to avoid all that -m32/-m64 logic in ldd01.
Regards,
Jan
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 10 lines · Jan Stancek
----- Original Message -----
Quoted 6 lines
From: "Han Pingtian" <[email protected]>
To: [email protected]
Sent: Friday, 12 September, 2014 9:28:45 AM
Subject: Re: [LTP] [PATCH] ldd01: using 'ppc' to check powerpc archOn Thu, Sep 11, 2014 at 04:41:29PM +0200, Jan Stancek wrote:
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Would you be willing to try attached patch, which moves the build of .so and a.out into
Makefile?I have tested your patch but ldd cannot find the lib files:
That's only matter of setting correct
LD_LIBRARY_PATH:$ env LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH ./ldd01
Yes, it works after setting LD_LIBRARY_PATH like this on our systems.
Quoted 9 lines
Quoted 6 lines
Quoted 4 lines
Or alternatively, can you describe
the ppc system where this is failing, so I could try to reproduce it myself?This is a power 6 system, which running a beta version rhel5.11. Without my patch, it failed with those messages:
It also fails (with or without your patch) when built as 32-bit on RHEL7 ppc64:
I have tested your patch with 32bit on the system, it works fine.
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list