"/usr/bin/ld: cannot find -lutil" when install warden on centos 6.3

1,174 views
Skip to first unread message

王翔宇

unread,
Apr 18, 2013, 11:56:35 AM4/18/13
to vcap...@cloudfoundry.org
hi,
      I run into an error when install warden on centos 6.3
      when I run the command:
      bundle exec rake setup[config/linux.yml]
      an error occured:
   /usr/bin/ld: cannot find -lutil
   collect2: ld returned 1 exit status
   make[1]: *** [wshd] Error 1
   make[1]: Leaving directory `/home/work/warden/warden/src/wsh'
   make: *** [all] Error 2
   It seems that I didn't install libutil ,but I found the libutil.so in /usr/lib64/libutil.so
   And also It seems that the ld has founded the util
   # ldconfig -p|grep libutil
      libutil.so.1 (libc6,x86-64, OS ABI: Linux 2.6.18) => /lib64/libutil.so.1
      libutil.so (libc6,x86-64, OS ABI: Linux 2.6.18) => /usr/lib64/libutil.so
     /lib64/libutil.so.1 -> libutil-2.12.so
    Does anyone meet this problem before?
    Thank you very much.


James Bayer

unread,
Apr 20, 2013, 1:04:59 PM4/20/13
to vcap...@cloudfoundry.org
I've asked the team that worked getting CentOS working with Warden where the docs are, and hopefully we can respond here and update the README soon.

王翔宇

unread,
Apr 21, 2013, 1:58:41 AM4/21/13
to vcap...@cloudfoundry.org
Thanks very mush, James.
This problem has been solved by make changes to the Makefile of wsh,change "$(CC) -static -o $@ $^ -lutil" to " $(CC) -o $@ $^ -lutil"
But the warden still can not work .
It will be really appreciated if you provide the docs of "getting CentOS working with Warden".
Thanks again.

在 2013年4月21日星期日UTC+8上午1时04分59秒,James Bayer写道:

Jesse Zhang

unread,
Apr 22, 2013, 2:26:11 AM4/22/13
to vcap...@cloudfoundry.org
Hi Xiangyu,
  static linking for the executable is intentional, I don't think you change to Makefile is a general solution.

Jesse

王翔宇

unread,
Apr 22, 2013, 5:38:03 AM4/22/13
to vcap...@cloudfoundry.org
hi,Jesse
       I have noticed that my solution may be a mistake.So I specify the location of libutil.a in the Makefile by:
       $(CC)  -static -o $@ $^ -L/usr/lib/x86_64-redhat-linux5E/lib64/ -lutil
       And make again,but this time a new mistake happened:
       wshd.o: In function `child_fork':
       /home/work/warden/warden/src/wsh/wshd.c:329: undefined reference to `execvpe'
       wshd.o: In function `child_signalfd':
       /home/work/warden/warden/src/wsh/wshd.c:553: undefined reference to `signalfd'

       collect2: ld returned 1 exit status
       make: *** [wshd] Error 1
        It seems that it can not found execvpe and signalfd in the system,so I think the system is lack of some lib or sys api too.



在 2013年4月22日星期一UTC+8下午2时26分11秒,Jesse Zhang写道:

pcnoo...@gmail.com

unread,
Apr 22, 2013, 12:06:58 PM4/22/13
to vcap...@cloudfoundry.org
You can try installing glibc-static (yum install glibc-static). This should install the static libraries you need.

Cheers,
Pieter

王翔宇

unread,
Apr 22, 2013, 11:10:21 PM4/22/13
to vcap...@cloudfoundry.org, pcnoo...@gmail.com
thanks Pieter for your suggestion.
After "yum install glibc-static",the make run successfully.
But  warden still doesn't work,  we can not create a container correctly.
warden> create
command exited with failure

I looked into the log of wshd.err.log :
clone: Invalid argument
Any othersuggestions?
Thanks again!

在 2013年4月23日星期二UTC+8上午12时06分58秒,pcnoo...@gmail.com写道:
Reply all
Reply to author
Forward
0 new messages