Hi,

On Mon, Aug 3, 2015 at 4:39 PM, Cyril Hrubis <chru...@suse.cz> wrote:

> Hi!
> > # make
> > make -C ../lib -f
> "/mnt/tests/kernel/distribution/ltp/generic/ltp-full-20150420/testcases/kernel/syscalls/ipc/msgrcv/../lib/Makefile"
> all
> > make[1]: Entering directory
> `/mnt/tests/kernel/distribution/ltp/generic/ltp-full-20150420/testcases/kernel/syscalls/ipc/lib'
> > make[1]: Nothing to be done for `all'.
> > make[1]: Leaving directory
> `/mnt/tests/kernel/distribution/ltp/generic/ltp-full-20150420/testcases/kernel/syscalls/ipc/lib'
> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W -g -O2
> -Wold-style-definition -m32 -D_FORTIFY_SOURCE=2
> -I/mnt/tests/kernel/distribution/ltp/generic/ltp-full-20150420/testcases/kernel/include
> -I/mnt/tests/kernel/distribution/ltp/generic/ltp-full-20150420/testcases/kernel/syscalls/ipc/msgrcv/../lib
> -I../../../../../include -I../../../../../include
>  
> -L/mnt/tests/kernel/distribution/ltp/generic/ltp-full-20150420/testcases/kernel/syscalls/ipc/msgrcv/../lib
> -L../../../../../lib  msgrcv08.c   -lltp -lipc -o msgrcv08
> > /usr/bin/ld: skipping incompatible ../../../../../lib/libltp.a when
> searching for -lltp
> > /usr/bin/ld: cannot find -lltp
> > /usr/bin/ld: skipping incompatible
> /mnt/tests/kernel/distribution/ltp/generic/ltp-full-20150420/testcases/kernel/syscalls/ipc/msgrcv/../lib/libipc.a
> when searching for -lipc
> > /usr/bin/ld: cannot find -lipc
> > collect2: error: ld returned 1 exit status
> > make: *** [msgrcv08] Error 1
>
> That is because the rest of LTP has been compiled for 64 bit and the
> linker fails. You have to compile _whole_ LTP with -m32 (pass
> CFLAGS=-m32 to configure) so that the tests can be linked with the test
> library.
>

Yes, you are right.

But I hope to finish the  'msgrcv08' test by LTP automatically. To
recompile the whole LTP-Lib in 32-bit only for this one case is not my
expected.  I tend to give up the testcase if we don't have any other  way.
:(

though it works well on 64-bit system:
---------------------------------------------------
# ./configure CFLAGS=-m32
# cd testcases/kernel/syscalls/ipc/msgrcv/
# make
make -C ../lib -f
"/root/ltp-test/testcases/kernel/syscalls/ipc/msgrcv/../lib/Makefile" all
make[1]: Entering directory
`/root/ltp-test/testcases/kernel/syscalls/ipc/lib'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory
`/root/ltp-test/testcases/kernel/syscalls/ipc/lib'
gcc -m32 -g -O2 -fno-strict-aliasing -pipe -Wall -W -m32
-Wold-style-definition  -I/root/ltp-test/testcases/kernel/include
-I/root/ltp-test/testcases/kernel/syscalls/ipc/msgrcv/../lib
-I../../../../../include -I../../../../../include
-L/root/ltp-test/testcases/kernel/syscalls/ipc/msgrcv/../lib
-L../../../../../lib  msgrcv01.c   -lltp -lipc -o msgrcv01
gcc -m32 -g -O2 -fno-strict-aliasing -pipe -Wall -W -m32
-Wold-style-definition  -I/root/ltp-test/testcases/kernel/include
-I/root/ltp-test/testcases/kernel/syscalls/ipc/msgrcv/../lib
-I../../../../../include -I../../../../../include
-L/root/ltp-test/testcases/kernel/syscalls/ipc/msgrcv/../lib
-L../../../../../lib  msgrcv05.c   -lltp -lipc -o msgrcv05
gcc -m32 -g -O2 -fno-strict-aliasing -pipe -Wall -W -m32
-Wold-style-definition  -I/root/ltp-test/testcases/kernel/include
-I/root/ltp-test/testcases/kernel/syscalls/ipc/msgrcv/../lib
-I../../../../../include -I../../../../../include
-L/root/ltp-test/testcases/kernel/syscalls/ipc/msgrcv/../lib
-L../../../../../lib  msgrcv06.c   -lltp -lipc -o msgrcv06
gcc -m32 -g -O2 -fno-strict-aliasing -pipe -Wall -W -m32
-Wold-style-definition  -I/root/ltp-test/testcases/kernel/include
-I/root/ltp-test/testcases/kernel/syscalls/ipc/msgrcv/../lib
-I../../../../../include -I../../../../../include
-L/root/ltp-test/testcases/kernel/syscalls/ipc/msgrcv/../lib
-L../../../../../lib  msgrcv08.c   -lltp -lipc -o msgrcv08
gcc -m32 -g -O2 -fno-strict-aliasing -pipe -Wall -W -m32
-Wold-style-definition  -I/root/ltp-test/testcases/kernel/include
-I/root/ltp-test/testcases/kernel/syscalls/ipc/msgrcv/../lib
-I../../../../../include -I../../../../../include
-L/root/ltp-test/testcases/kernel/syscalls/ipc/msgrcv/../lib
-L../../../../../lib  msgrcv04.c   -lltp -lipc -o msgrcv04
gcc -m32 -g -O2 -fno-strict-aliasing -pipe -Wall -W -m32
-Wold-style-definition  -I/root/ltp-test/testcases/kernel/include
-I/root/ltp-test/testcases/kernel/syscalls/ipc/msgrcv/../lib
-I../../../../../include -I../../../../../include
-L/root/ltp-test/testcases/kernel/syscalls/ipc/msgrcv/../lib
-L../../../../../lib  msgrcv02.c   -lltp -lipc -o msgrcv02
gcc -m32 -g -O2 -fno-strict-aliasing -pipe -Wall -W -m32
-Wold-style-definition  -I/root/ltp-test/testcases/kernel/include
-I/root/ltp-test/testcases/kernel/syscalls/ipc/msgrcv/../lib
-I../../../../../include -I../../../../../include
-L/root/ltp-test/testcases/kernel/syscalls/ipc/msgrcv/../lib
-L../../../../../lib  msgrcv07.c   -lltp -lipc -o msgrcv07
gcc -m32 -g -O2 -fno-strict-aliasing -pipe -Wall -W -m32
-Wold-style-definition  -I/root/ltp-test/testcases/kernel/include
-I/root/ltp-test/testcases/kernel/syscalls/ipc/msgrcv/../lib
-I../../../../../include -I../../../../../include
-L/root/ltp-test/testcases/kernel/syscalls/ipc/msgrcv/../lib
-L../../../../../lib  msgrcv03.c   -lltp -lipc -o msgrcv03

[root@hp-dl388g8-23 msgrcv]# ./msgrcv08
msgrcv08    1  TFAIL  :  msgrcv08.c:45: Bug: No message of desired type.

[root@hp-dl388g8-23 msgrcv]# readelf -a msgrcv08 |head
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           Intel 80386
  Version:                           0x1



> --
> Cyril Hrubis
> chru...@suse.cz
>



-- 
Regards,
Li Wang
Email: liw...@redhat.com
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to