LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[lvs-users] ipvsadm-1.26 Makefile bug on RHEL6

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: [lvs-users] ipvsadm-1.26 Makefile bug on RHEL6
From: 刘航彬 <liuhangbin@xxxxxxxxx>
Date: Fri, 13 Jan 2012 17:22:49 +0800
HI,

There seems a Makefile bug for RHEL6,  I download
ipvsadm-1.26.tar.gz<http://www.linuxvirtualserver.org/software/kernel-2.6/ipvsadm-1.26.tar.gz>
and
unpack it on RHEL6, then run make.
The Compile failed for error like:

gcc -Wall -Wunused -Wstrict-prototypes -g -o ipvsadm ipvsadm.o
config_stream.o dynamic_array.o libipvs/libipvs.a  -lnl
ipvsadm.o: In function `parse_options':
/root/rpmbuild/BUILD/ipvsadm-1.26/ipvsadm.c:432: undefined reference to
`poptGetContext'
/root/rpmbuild/BUILD/ipvsadm-1.26/ipvsadm.c:435: undefined reference to
`poptGetNextOpt'
/root/rpmbuild/BUILD/ipvsadm-1.26/ipvsadm.c:660: undefined reference to
`poptBadOption'
/root/rpmbuild/BUILD/ipvsadm-1.26/ipvsadm.c:502: undefined reference to
`poptGetNextOpt'
/root/rpmbuild/BUILD/ipvsadm-1.26/ipvsadm.c:667: undefined reference to
`poptStrerror'
/root/rpmbuild/BUILD/ipvsadm-1.26/ipvsadm.c:667: undefined reference to
`poptBadOption'
/root/rpmbuild/BUILD/ipvsadm-1.26/ipvsadm.c:670: undefined reference to
`poptFreeContext'
/root/rpmbuild/BUILD/ipvsadm-1.26/ipvsadm.c:677: undefined reference to
`poptGetArg'
/root/rpmbuild/BUILD/ipvsadm-1.26/ipvsadm.c:678: undefined reference to
`poptGetArg'
/root/rpmbuild/BUILD/ipvsadm-1.26/ipvsadm.c:679: undefined reference to
`poptGetArg'
/root/rpmbuild/BUILD/ipvsadm-1.26/ipvsadm.c:690: undefined reference to
`poptGetArg'
/root/rpmbuild/BUILD/ipvsadm-1.26/ipvsadm.c:693: undefined reference to
`poptFreeContext'
collect2: ld returned 1 exit status
make: *** [ipvsadm] Error 1

Looked the Makefile,

LIB_SEARCH = /lib64 /usr/lib64 /usr/local/lib64 /lib /usr/lib /usr/local/lib
POPT_LIB = $(shell for i in $(LIB_SEARCH); do \
  if [ -f $$i/libpopt.a ]; then \
    if nm $$i/libpopt.a | fgrep -q poptGetContext; then \
echo "-lpopt"; \
break; \
    fi; \
  fi; \
done)

Using "yum install popt-devel" on RHEL6 only install
a /usr/lib64/libpopt.so , but not a libpopt.a , which cause we don't add
-lpopt when compile the files.
So I  think we should not decide whether to use -lpopt based on libpopt.a.


Thank
Hangbin Liu
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

<Prev in Thread] Current Thread [Next in Thread>
  • [lvs-users] ipvsadm-1.26 Makefile bug on RHEL6, 刘航彬 <=