All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rishikesh K Rajak <risrajak@linux.vnet.ibm.com>
To: Mitani <mitani@ryobi.co.jp>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] "check_for_unshare.c" build failed
Date: Wed, 10 Mar 2010 16:19:19 +0530	[thread overview]
Message-ID: <20100310104919.GA11404@linux.vnet.ibm.com> (raw)
In-Reply-To: <000a01cac032$c4126c80$4c374580$@co.jp>

Hi Mitani,

I am able to compile with changing LDLIBS as done by commit
: 1a5506c97dcfda0bd16f83ca855bb633c47eea4c

on RHEL5.4 .

Can you try configuring once again ?

Let me know when you face again some prob.

-Rishi

On Wed, Mar 10, 2010 at 06:19:20PM +0900, Mitani wrote:
> Hi,
> 
> 
> I tried to build LTP modules from following git:
> 
>    "Fix make filed,, reported by Shi Weihua <shiwh@cn.fujitsu.com>"
>    (ltp-dev-c962f51674b971496e14ac4be0cc75da98b75fca.tar.gz)
> 
> But I failed to build "check_for_unshare.c" in RHEL5.4 system 
> (2.6.18-164.el5).
> 
> ------------
> <...>
> gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall  -I../../../include
> -I../../../include   -L../../../lib  check_for_unshare.c   -o
> check_for_unshare
> /tmp/ccWzyOQO.o: In function `main':
> /home/mitani/LTP/ltp-dev-20100310/testcases/kernel/containers/check_for_unsh
> are.c:40: undefined reference to `dlopen'
> /home/mitani/LTP/ltp-dev-20100310/testcases/kernel/containers/check_for_unsh
> are.c:46: undefined reference to `dlerror'
> /home/mitani/LTP/ltp-dev-20100310/testcases/kernel/containers/check_for_unsh
> are.c:47: undefined reference to `dlsym'
> /home/mitani/LTP/ltp-dev-20100310/testcases/kernel/containers/check_for_unsh
> are.c:48: undefined reference to `dlerror'
> /home/mitani/LTP/ltp-dev-20100310/testcases/kernel/containers/check_for_unsh
> are.c:53: undefined reference to `dlclose'
> /home/mitani/LTP/ltp-dev-20100310/testcases/kernel/containers/check_for_unsh
> are.c:42: undefined reference to `dlerror'
> collect2: ld returned 1 exit status
> make[3]: *** [check_for_unshare] Error 1
> <...>
> ------------
> 
> 
> I think that "-ldl" is needed in options.
> I tried to build using "-ldl" option and succeeded.
> 
> ------------
> [root@RHEL54-INTEL64-GUIDE-APDB2-AP containers]# gcc -g -O2 -g -O2 -ldl
> -fno-strict-aliasi
> ng -pipe -Wall  -I../../../include -I../../../include   -L../../../lib
> check_for_unshare.
> c   -o check_for_unshare
> [root@RHEL54-INTEL64-GUIDE-APDB2-AP containers]# echo $?
> 0
> [root@RHEL54-INTEL64-GUIDE-APDB2-AP containers]# ll
> total 60
> -rw-rw-r-- 1 root root  1396 Mar 10 01:23 Makefile
> -rw-rw-r-- 1 root root  1386 Mar 10 01:23 Makefile.inc
> -rw-rw-r-- 1 root root  3286 Mar 10 01:23 README
> -rw-rw-r-- 1 root root  1451 Mar 10 01:23 TEST_PLAN.txt
> -rwxr-xr-x 1 root root 10805 Mar 10 15:18 check_for_unshare
> -rw-rw-r-- 1 root root  1634 Mar 10 01:23 check_for_unshare.c
> -rwxrwxr-x 1 root root  1712 Mar 10 01:23 container_test.sh
> drwxrwxr-x 2 root root  4096 Mar 10 10:42 libclone
> drwxrwxr-x 2 root root  4096 Mar 10 01:23 mqns
> drwxrwxr-x 2 root root  4096 Mar 10 01:23 netns
> drwxrwxr-x 2 root root  4096 Mar 10 01:23 pidns
> drwxrwxr-x 2 root root  4096 Mar 10 01:23 sysvipc
> drwxrwxr-x 2 root root  4096 Mar 10 01:23 utsname
> [root@RHEL54-INTEL64-GUIDE-APDB2-AP containers]#
> ------------
> 
> 
> How about changing Makefile as follows?
> 
> ============
> --- ./testcases/kernel/containers/Makefile      2010-03-10
> 01:23:25.000000000 +0900
> +++ ./testcases/kernel/containers/Makefile.new  2010-03-10
> 15:27:20.000000000 +0900
> @@ -28,6 +28,8 @@
> 
>  LIB                    := -ld
> 
> +CFLAGS                  += -ldl
> +
>  INSTALL_TARGETS                := *.sh
> 
>  $(LIBDIR):
> ============
> 
> 
> Regards--
> 
> 
> -Tomonori Mitani
> 
> 
> 
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list

-- 
Thanks & Regards
Rishi
LTP Maintainer
IBM, LTC, Bangalore
Please join IRC #ltp @ irc.freenode.net

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2010-03-10 10:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-10  9:19 [LTP] "check_for_unshare.c" build failed Mitani
2010-03-10 10:49 ` Rishikesh K Rajak [this message]
2010-03-11  0:40   ` Mitani
2010-03-11  4:13 ` Garrett Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100310104919.GA11404@linux.vnet.ibm.com \
    --to=risrajak@linux.vnet.ibm.com \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=mitani@ryobi.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.