LTP Build fail on System z 64 bit machine
Hi,
Quoted 25 lines · On Fri, 2009-05-22 at 09:02 -0400, Srinivasan Subramanian3 wrote:
Hi all,
When i tried to build ltp on a RHEL4.8 machine, the build failed with undefined reference on splice02.
Machine info
RHEL4.8 GA (64 bit)
Kernel version- 2.6.9-89.EL
Error Info
/root/ltp-intermediate-20090521/testcases/kernel/syscalls/splice/splice02.c:126: undefined reference to `splice'
collect2: ld returned 1 exit status
make[4]: *** [splice02] Error 1
make[4]: Leaving directory `/root/ltp-intermediate-20090521/testcases/kernel/syscalls/splice' make[3]: *** [all] Error 2
make[3]: Leaving directory `/root/ltp-intermediate-20090521/testcases/kernel/syscalls' make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/ltp-intermediate-20090521/testcases/kernel'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/ltp-intermediate-20090521/testcases'
make: *** [all] Error 2
Quoted 1 line
Kindly help me on this issue.
Hope the following patch solves your problem:
1) Avoids build problem on your very old kernel,
2) Will not run on on your old kernel but on kernel > 2.6.17,
---
testcases/kernel/syscalls/splice/splice02.c renamed from testcases/kernel/syscalls/splice/splice02.c.orig +19 -2
@@ -52,6 +52,15 @@ char *TCID = "splice02"; /* Test prograint testno;int TST_TOTAL =1 ;/* total number of tests in this file. */ +static inline long ltp_splice (int fd_in,loff_t *off_in, +int fd_out,loff_t *off_out, +size_t len,unsigned int flags) +{ +return syscall (__NR_splice, fd_in, off_in, fd_out, + off_out, len, flags); +} + +/* Extern Global Functions */ /******************************************************************************/ /* */
@@ -108,7 +117,15 @@ void setup() {int main (int ac,char **av) {int fd =0 ; - +int results =0 ; + +/* Disable test if the version of the kernel is less than 2.6.17 */ +if (((results =tst_kvercmp (2 ,6 ,17 )) <0 )) { +tst_resm (TINFO ,"This test can only run on kernels that are " ); +tst_resm (TINFO ,"2.6.17 and higher" ); +exit (0 ); + } +setup ();if (ac <2 ) {
@@ -123,7 +140,7 @@ int main(int ac, char **av) { } do { - TEST(splice(STDIN_FILENO, NULL, fd, NULL, SPLICE_SIZE, 0)); + TEST(ltp_splice(STDIN_FILENO, NULL, fd, NULL, SPLICE_SIZE, 0)); if (TEST_RETURN < 0) { tst_resm(TFAIL, "splice failed - errno = %d : %s", TEST_ERRNO, strerror(TEST_ERRNO)); cleanup();
---
Regards--
Subrata
Quoted 9 lines
Thanks &
---------------------------------
Best Regards,
Srinivasan S,
Linux on System z, LTC
[email protected]
[email protected]
----------------------------------
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.com
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
From: Subrata Modak <[email protected]>
Subject: Re: [LTP] [PATCH] LTP Build fail on System z 64 bit machine
Date: Fri, 22 May 2009 20:35:14 +0530
Quoted 41 lines
Hi,
Quoted 25 lines · On Fri, 2009-05-22 at 09:02 -0400, Srinivasan Subramanian3 wrote:
Hi all,
When i tried to build ltp on a RHEL4.8 machine, the build failed with undefined reference on splice02.
Machine info
RHEL4.8 GA (64 bit)
Kernel version- 2.6.9-89.EL
Error Info
/root/ltp-intermediate-20090521/testcases/kernel/syscalls/splice/splice02.c:126: undefined reference to `splice'
collect2: ld returned 1 exit status
make[4]: *** [splice02] Error 1
make[4]: Leaving directory `/root/ltp-intermediate-20090521/testcases/kernel/syscalls/splice' make[3]: *** [all] Error 2
make[3]: Leaving directory `/root/ltp-intermediate-20090521/testcases/kernel/syscalls' make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/ltp-intermediate-20090521/testcases/kernel'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/ltp-intermediate-20090521/testcases'
make: *** [all] Error 2Quoted 1 line
Kindly help me on this issue.
Hope the following patch solves your problem:
1) Avoids build problem on your very old kernel,
2) Will not run on on your old kernel but on kernel > 2.6.17,Signed-off-by Subrata Modak <[email protected]>---
testcases/kernel/syscalls/splice/splice02.c renamed from testcases/kernel/syscalls/splice/splice02.c.orig +0
-0@@ -52,6 +52,15 @@ char *TCID = "splice02"; /* Test prograint testno;
testcases/kernel/syscalls/splice/splice02.c char *TCID = "splice02"; /* Test progra · line 62
Quoted 10 lines
testcases/kernel/syscalls/splice/splice02.c renamed from testcases/kernel/syscalls/splice/splice02.c.orig +8
-0int TST_TOTAL =1 ;/* total number of tests in this file. */ +static inline long ltp_splice (int fd_in,loff_t *off_in, +int fd_out,loff_t *off_out, +size_t len,unsigned int flags) +{ +return syscall (__NR_splice, fd_in, off_in, fd_out, + off_out, len, flags); +} +
Well, we have so many those inconsistent situations when performing a syscall.
* use glibc version only.
* use glibc version if possible. Otherwise syscall().
* use syscall() directly.
Seiichi Ikarashi has posted a similar patch before,
http://article.gmane.org/gmane.linux.ltp/8359
but have been pushed back to use an autoconf version,
http://article.gmane.org/gmane.linux.ltp/8360
With an autoconf, we can probably easier to manage policy -- like glibc() version first, and then syscall() if we don't really have another choice. In addition, it will work out well with kernels contain backport patches.
Quoted 5 lines
testcases/kernel/syscalls/splice/splice02.c renamed from testcases/kernel/syscalls/splice/splice02.c.orig +1
-0+/* Extern Global Functions */ /******************************************************************************/ /* */
testcases/kernel/syscalls/splice/splice02.c void setup() { · line 125
Quoted 10 lines
testcases/kernel/syscalls/splice/splice02.c renamed from testcases/kernel/syscalls/splice/splice02.c.orig +6
-1@@ -108,7 +117,15 @@ void setup() {int main (int ac,char **av) {int fd =0 ; - +int results =0 ; + +/* Disable test if the version of the kernel is less than 2.6.17 */ +if (((results =tst_kvercmp (2 ,6 ,17 )) <0 )) { +tst_resm (TINFO ,"This test can only run on kernels that are " ); +tst_resm (TINFO ,"2.6.17 and higher" );
TCONF?
CAI Qian
Quoted 8 lines
testcases/kernel/syscalls/splice/splice02.c renamed from testcases/kernel/syscalls/splice/splice02.c.orig +3
-0+exit (0 ); + } +setup ();if (ac <2 ) {
testcases/kernel/syscalls/splice/splice02.c int main(int ac, char **av) { · line 146
Quoted 8 lines
testcases/kernel/syscalls/splice/splice02.c renamed from testcases/kernel/syscalls/splice/splice02.c.orig +1
-1@@ -123,7 +140,7 @@ int main(int ac, char **av) { } do { - TEST(splice(STDIN_FILENO, NULL, fd, NULL, SPLICE_SIZE, 0)); + TEST(ltp_splice(STDIN_FILENO, NULL, fd, NULL, SPLICE_SIZE, 0)); if (TEST_RETURN < 0) { tst_resm(TFAIL, "splice failed - errno = %d : %s", TEST_ERRNO, strerror(TEST_ERRNO)); cleanup();
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.com
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 66 lines · CAI Qian
From: Subrata Modak <[email protected]>
Subject: Re: [LTP] [PATCH] LTP Build fail on System z 64 bit machine
Date: Fri, 22 May 2009 20:35:14 +0530Quoted 41 lines
Hi,
Quoted 25 lines · On Fri, 2009-05-22 at 09:02 -0400, Srinivasan Subramanian3 wrote:
Hi all,
When i tried to build ltp on a RHEL4.8 machine, the build failed with undefined reference on splice02.
Machine info
RHEL4.8 GA (64 bit)
Kernel version- 2.6.9-89.EL
Error Info
/root/ltp-intermediate-20090521/testcases/kernel/syscalls/splice/splice02.c:126: undefined reference to `splice'
collect2: ld returned 1 exit status
make[4]: *** [splice02] Error 1
make[4]: Leaving directory `/root/ltp-intermediate-20090521/testcases/kernel/syscalls/splice' make[3]: *** [all] Error 2
make[3]: Leaving directory `/root/ltp-intermediate-20090521/testcases/kernel/syscalls' make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/ltp-intermediate-20090521/testcases/kernel'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/ltp-intermediate-20090521/testcases'
make: *** [all] Error 2Quoted 1 line
Kindly help me on this issue.
Hope the following patch solves your problem:
1) Avoids build problem on your very old kernel,
2) Will not run on on your old kernel but on kernel > 2.6.17,Signed-off-by Subrata Modak <[email protected]>---
testcases/kernel/syscalls/splice/splice02.c renamed from testcases/kernel/syscalls/splice/splice02.c.orig +0
-0@@ -52,6 +52,15 @@ char *TCID = "splice02"; /* Test prograint testno;testcases/kernel/syscalls/splice/splice02.c char *TCID = "splice02"; /* Test progra · line 62
Quoted 10 lines
testcases/kernel/syscalls/splice/splice02.c renamed from testcases/kernel/syscalls/splice/splice02.c.orig +8
-0int TST_TOTAL =1 ;/* total number of tests in this file. */ +static inline long ltp_splice (int fd_in,loff_t *off_in, +int fd_out,loff_t *off_out, +size_t len,unsigned int flags) +{ +return syscall (__NR_splice, fd_in, off_in, fd_out, + off_out, len, flags); +} +Well, we have so many those inconsistent situations when performing a syscall.
* use glibc version only.
* use glibc version if possible. Otherwisesyscall().
* usesyscall()directly.Seiichi Ikarashi has posted a similar patch before,
Quoted 9 lines
but have been pushed back to use an autoconf version,
http://article.gmane.org/gmane.linux.ltp/8360
With an autoconf, we can probably easier to manage policy -- like
glibc()version first, and thensyscall()if we don't really have another choice. In addition, it will work out well with kernels contain backport patches.
True. I would wait if somebody is submitting some autoconf related patch(s).
Regards--
Subrata
Quoted 29 lines
Quoted 5 lines
testcases/kernel/syscalls/splice/splice02.c renamed from testcases/kernel/syscalls/splice/splice02.c.orig +1
-0+/* Extern Global Functions */ /******************************************************************************/ /* */ testcases/kernel/syscalls/splice/splice02.c void setup() { · line 125
Quoted 10 lines
testcases/kernel/syscalls/splice/splice02.c renamed from testcases/kernel/syscalls/splice/splice02.c.orig +6
-1@@ -108,7 +117,15 @@ void setup() {int main (int ac,char **av) {int fd =0 ; - +int results =0 ; + +/* Disable test if the version of the kernel is less than 2.6.17 */ +if (((results =tst_kvercmp (2 ,6 ,17 )) <0 )) { +tst_resm (TINFO ,"This test can only run on kernels that are " ); +tst_resm (TINFO ,"2.6.17 and higher" );TCONF?
CAI Qian
Quoted 9 lines
testcases/kernel/syscalls/splice/splice02.c renamed from testcases/kernel/syscalls/splice/splice02.c.orig +3
-0+exit (0 ); + } +setup ();if (ac <2 ) {@@ -123,7 +140,7 @@ int main(int ac, char **av) { }
Quoted 9 lines
testcases/kernel/syscalls/splice/splice02.c int main(int ac, char **av) { · line 146
Quoted 7 lines
testcases/kernel/syscalls/splice/splice02.c renamed from testcases/kernel/syscalls/splice/splice02.c.orig +1
-1do { - TEST(splice(STDIN_FILENO, NULL, fd, NULL, SPLICE_SIZE, 0)); + TEST(ltp_splice(STDIN_FILENO, NULL, fd, NULL, SPLICE_SIZE, 0)); if (TEST_RETURN < 0) { tst_resm(TFAIL, "splice failed - errno = %d : %s", TEST_ERRNO, strerror(TEST_ERRNO)); cleanup();
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.com
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 71 lines · Subrata Modak
Quoted 70 lines · CAI Qian
From: Subrata Modak <[email protected]>
Subject: Re: [LTP] [PATCH] LTP Build fail on System z 64 bit machine
Date: Fri, 22 May 2009 20:35:14 +0530Quoted 41 lines
Hi,
Quoted 25 lines · On Fri, 2009-05-22 at 09:02 -0400, Srinivasan Subramanian3 wrote:
Hi all,
When i tried to build ltp on a RHEL4.8 machine, the build failed with undefined reference on splice02.
Machine info
RHEL4.8 GA (64 bit)
Kernel version- 2.6.9-89.EL
Error Info
/root/ltp-intermediate-20090521/testcases/kernel/syscalls/splice/splice02.c:126: undefined reference to `splice'
collect2: ld returned 1 exit status
make[4]: *** [splice02] Error 1
make[4]: Leaving directory `/root/ltp-intermediate-20090521/testcases/kernel/syscalls/splice' make[3]: *** [all] Error 2
make[3]: Leaving directory `/root/ltp-intermediate-20090521/testcases/kernel/syscalls' make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/ltp-intermediate-20090521/testcases/kernel'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/ltp-intermediate-20090521/testcases'
make: *** [all] Error 2Quoted 1 line
Kindly help me on this issue.
Hope the following patch solves your problem:
1) Avoids build problem on your very old kernel,
2) Will not run on on your old kernel but on kernel > 2.6.17,Signed-off-by Subrata Modak <[email protected]>---
testcases/kernel/syscalls/splice/splice02.c renamed from testcases/kernel/syscalls/splice/splice02.c.orig +0
-0@@ -52,6 +52,15 @@ char *TCID = "splice02"; /* Test prograint testno;testcases/kernel/syscalls/splice/splice02.c char *TCID = "splice02"; /* Test progra · line 62
Quoted 10 lines
testcases/kernel/syscalls/splice/splice02.c renamed from testcases/kernel/syscalls/splice/splice02.c.orig +8
-0int TST_TOTAL =1 ;/* total number of tests in this file. */ +static inline long ltp_splice (int fd_in,loff_t *off_in, +int fd_out,loff_t *off_out, +size_t len,unsigned int flags) +{ +return syscall (__NR_splice, fd_in, off_in, fd_out, + off_out, len, flags); +} +Well, we have so many those inconsistent situations when performing a syscall.
* use glibc version only.
* use glibc version if possible. Otherwisesyscall().
* usesyscall()directly.Seiichi Ikarashi has posted a similar patch before,
http://article.gmane.org/gmane.linux.ltp/8359
but have been pushed back to use an autoconf version,
Quoted 9 lines
Quoted 5 lines
With an autoconf, we can probably easier to manage policy -- like
glibc()version first, and thensyscall()if we don't really have another choice. In addition, it will work out well with kernels contain backport patches.True. I would wait if somebody is submitting some autoconf related patch(s).
However i needed to push this for an immediate fix. Need to work on the autoconf part later.
Regards--
Subrata
Quoted 43 lines
Regards--
SubrataQuoted 29 lines
Quoted 5 lines
testcases/kernel/syscalls/splice/splice02.c renamed from testcases/kernel/syscalls/splice/splice02.c.orig +1
-0+/* Extern Global Functions */ /******************************************************************************/ /* */ testcases/kernel/syscalls/splice/splice02.c void setup() { · line 125
Quoted 10 lines
testcases/kernel/syscalls/splice/splice02.c renamed from testcases/kernel/syscalls/splice/splice02.c.orig +6
-1@@ -108,7 +117,15 @@ void setup() {int main (int ac,char **av) {int fd =0 ; - +int results =0 ; + +/* Disable test if the version of the kernel is less than 2.6.17 */ +if (((results =tst_kvercmp (2 ,6 ,17 )) <0 )) { +tst_resm (TINFO ,"This test can only run on kernels that are " ); +tst_resm (TINFO ,"2.6.17 and higher" );TCONF?
CAI Qian
Quoted 9 lines
testcases/kernel/syscalls/splice/splice02.c renamed from testcases/kernel/syscalls/splice/splice02.c.orig +3
-0+exit (0 ); + } +setup ();if (ac <2 ) {@@ -123,7 +140,7 @@ int main(int ac, char **av) { }Quoted 9 lines
testcases/kernel/syscalls/splice/splice02.c int main(int ac, char **av) { · line 146
Quoted 7 lines
testcases/kernel/syscalls/splice/splice02.c renamed from testcases/kernel/syscalls/splice/splice02.c.orig +1
-1do { - TEST(splice(STDIN_FILENO, NULL, fd, NULL, SPLICE_SIZE, 0)); + TEST(ltp_splice(STDIN_FILENO, NULL, fd, NULL, SPLICE_SIZE, 0)); if (TEST_RETURN < 0) { tst_resm(TFAIL, "splice failed - errno = %d : %s", TEST_ERRNO, strerror(TEST_ERRNO)); cleanup();
Quoted 10 lines
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.com
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list