Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4140901
  • 博文数量: 447
  • 博客积分: 1241
  • 博客等级: 中尉
  • 技术积分: 5786
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-27 06:48
个人简介

读好书,交益友

文章分类

全部博文(447)

文章存档

2023年(6)

2022年(29)

2021年(49)

2020年(16)

2019年(15)

2018年(23)

2017年(67)

2016年(42)

2015年(51)

2014年(57)

2013年(52)

2012年(35)

2011年(5)

分类: Android平台

2017-02-20 19:31:25

在openwrt上编译libpam出现
 ./../libpam/include -I../../libpamc/include -DCHKPWD_HELPER=\"/usr/sbin/unix_chkpwd\" -DUPDATE_HELPER=\"/usr/sbin/unix_update\"   -Os -pipe -g3 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -fpic  -no-undefined -avoid-version -module -Wl,--version-script=./../modules.map -L/vm/openwrt/openwrt/staging_dir/target-x86_64_glibc-2.19/usr/lib -L/vm/openwrt/openwrt/staging_dir/target-x86_64_glibc-2.19/lib -L/vm/openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-4.8-linaro_glibc-2.19/usr/lib -L/vm/openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-4.8-linaro_glibc-2.19/lib  -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -o pam_unix.la -rpath /lib/security bigcrypt.lo pam_unix_acct.lo pam_unix_auth.lo pam_unix_passwd.lo pam_unix_sess.lo support.lo passverify.lo yppasswd_xdr.lo md5_good.lo md5_broken.lo ../../libpam/libpam.la -lcrypt   
OpenWrt-libtool: link: rm -fr  .libs/pam_unix.la.lnkscript
OpenWrt-libtool: link: x86_64-openwrt-linux-gnu-gcc -shared  -fPIC -DPIC .libs/pam_unix.la.lnkscript  -Wl,-rpath -Wl,/vm/openwrt/openwrt/build_dir/target-x86_64_glibc-2.19/Linux-PAM-1.1.8/libpam/.libs -L/vm/openwrt/openwrt/staging_dir/target-x86_64_glibc-2.19/usr/lib -L/vm/openwrt/openwrt/staging_dir/target-x86_64_glibc-2.19/lib -L/vm/openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-4.8-linaro_glibc-2.19/usr/lib -L/vm/openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-4.8-linaro_glibc-2.19/lib ../../libpam/.libs/libpam.so -ldl -lcrypt  -Os -Wl,--version-script=./../modules.map -Wl,--as-needed -Wl,--no-undefined -Wl,-O1   -Wl,-soname -Wl,pam_unix.so -o .libs/pam_unix.so
.libs/yppasswd_xdr.o: In function `xdr_xpasswd':
/vm/openwrt/openwrt/build_dir/target-x86_64_glibc-2.19/Linux-PAM-1.1.8/modules/pam_unix/yppasswd_xdr.c:289: undefined reference to `xdr_string'
/vm/openwrt/openwrt/build_dir/target-x86_64_glibc-2.19/Linux-PAM-1.1.8/modules/pam_unix/yppasswd_xdr.c:290: undefined reference to `xdr_string'
/vm/openwrt/openwrt/build_dir/target-x86_64_glibc-2.19/Linux-PAM-1.1.8/modules/pam_unix/yppasswd_xdr.c:291: undefined reference to `xdr_int'
/vm/openwrt/openwrt/build_dir/target-x86_64_glibc-2.19/Linux-PAM-1.1.8/modules/pam_unix/yppasswd_xdr.c:292: undefined reference to `xdr_int'
/vm/openwrt/openwrt/build_dir/target-x86_64_glibc-2.19/Linux-PAM-1.1.8/modules/pam_unix/yppasswd_xdr.c:293: undefined reference to `xdr_string'
/vm/openwrt/openwrt/build_dir/target-x86_64_glibc-2.19/Linux-PAM-1.1.8/modules/pam_unix/yppasswd_xdr.c:294: undefined reference to `xdr_string'
/vm/openwrt/openwrt/build_dir/target-x86_64_glibc-2.19/Linux-PAM-1.1.8/modules/pam_unix/yppasswd_xdr.c:295: undefined reference to `xdr_string'
.libs/yppasswd_xdr.o: In function `xdr_yppasswd':
/vm/openwrt/openwrt/build_dir/target-x86_64_glibc-2.19/Linux-PAM-1.1.8/modules/pam_unix/yppasswd_xdr.c:302: undefined reference to `xdr_string'
collect2: error: ld returned 1 exit status
make[7]: *** [pam_unix.la] Error 1
make[7]: Leaving directory `/vm/openwrt/openwrt/build_dir/target-x86_64_glibc-2.19/Linux-PAM-1.1.8/modules/pam_unix'
make[6]: *** [all-recursive] Error 1
make[6]: Leaving directory `/vm/openwrt/openwrt/build_dir/target-x86_64_glibc-2.19/Linux-PAM-1.1.8/modules'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/vm/openwrt/openwrt/build_dir/target-x86_64_glibc-2.19/Linux-PAM-1.1.8'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/vm/openwrt/openwrt/build_dir/target-x86_64_glibc-2.19/Linux-PAM-1.1.8'
make[3]: *** [/vm/openwrt/openwrt/build_dir/target-x86_64_glibc-2.19/Linux-PAM-1.1.8/.built] Error 2
make[3]: Leaving directory `/vm/openwrt/openwrt/feeds/packages/libs/libpam'
make[2]: *** [package/feeds/packages/libpam/compile] Error 2
make[2]: Leaving directory `/vm/openwrt/openwrt'
make[1]: *** [/vm/openwrt/openwrt/staging_dir/target-x86_64_glibc-2.19/stamp/.package_compile] Error 2
make[1]: Leaving directory `/vm/openwrt/openwrt'
make: *** [world] Error 2
记得以前使用uclibc编译的时候没有任何问题,看了一下openwrt的patch文件,/feeds/packages/libs/libpam/patches/006-fix_xdr.patch
有人提交了修改-+#ifdef UCLIBC
++#if defined UCLIBC
defined GLIBC
+
+static const char xdr_zero[BYTES_PER_XDR_UNIT] = {0, 0, 0, 0};
是基于glic的,看了一下openwrt的文档
config EGLIBC_OPTION_EGLIBC_INET 
 	219	   bool "Networking support" 
 	220	   default y 
 	221	   help 
 	222	       This option group includes networking-specific functions and 
 	223	       data.  With EGLIBC_INET disabled, the EGLIBC 
 	224	       installation and API changes as follows: 
 	225	 
 	226	       - The following libraries are not installed: 
 	227	 
 	228	         libanl 
 	229	         libnsl 
 	230	         libnss_compat 
 	231	         libnss_dns 
 	232	         libnss_hesiod 
 	233	         libnss_nis 
 	234	         libnss_nisplus 
 	235	         libresolv 
 	236	          
 	237	       - The following functions and variables are omitted from libc: 
 	238	 
 	239	         authdes_create           hstrerror              svc_fdset 
 	240	         authdes_getucred         htonl                  svc_getreq 
 	241	         authdes_pk_create        htons                  svc_getreq_common 
 	242	         authnone_create          if_freenameindex       svc_getreq_poll 
 	243	         authunix_create          if_indextoname         svc_getreqset 
 	244	         authunix_create_default  if_nameindex           svc_max_pollfd 
 	245	         bindresvport             if_nametoindex         svc_pollfd 
 	246	         callrpc                  in6addr_any            svcraw_create 
 	247	         cbc_crypt                in6addr_loopback       svc_register 
 	248	         clnt_broadcast           inet6_opt_append       svc_run 
 	249	         clnt_create              inet6_opt_find         svc_sendreply 
 	250	         clnt_pcreateerror        inet6_opt_finish       svctcp_create 
 	251	         clnt_perrno              inet6_opt_get_val      svcudp_bufcreate 
 	252	         clnt_perror              inet6_opt_init         svcudp_create 
 	253	         clntraw_create           inet6_alloc     svcudp_enablecache 
 	254	         clnt_spcreateerror       inet6_append    svcunix_create 
 	255	         clnt_sperrno             inet6_find      svcunixfd_create 
 	256	         clnt_sperror             inet6_init      svc_unregister 
 	257	         clnttcp_create           inet6_next      user2netname 
 	258	         clntudp_bufcreate        inet6_space     xdecrypt 
 	259	         clntudp_create           inet6_opt_next         xdr_accepted_reply 
 	260	         clntunix_create          inet6_opt_set_val      xdr_array 
 	261	         des_setparity            inet6_rth_add          xdr_authdes_cred 
 	262	         ecb_crypt                inet6_rth_getaddr      xdr_authdes_verf 
 	263	         endaliasent              inet6_rth_init         xdr_authunix_parms 
 	264	         endhostent               inet6_rth_reverse      xdr_bool 
 	265	         endnetent                inet6_rth_segments     xdr_bytes 
 	266	         endnetgrent              inet6_rth_space        xdr_callhdr 
 	267	         endprotoent              inet_addr              xdr_callmsg 
 	268	         endrpcent                inet_aton              xdr_char 
 	269	         endservent               inet_lnaof             xdr_cryptkeyarg 
 	270	         ether_aton               inet_makeaddr          xdr_cryptkeyarg2 
 	271	         ether_aton_r             inet_netof             xdr_cryptkeyres 
 	272	         ether_hostton            inet_network           xdr_des_block 
 	273	         ether_line               inet_nsap_addr         xdr_double 
 	274	         ether_ntoa               inet_nsap_ntoa         xdr_enum 
 	275	         ether_ntoa_r             inet_ntoa              xdr_float 
 	276	         ether_ntohost            inet_ntop              xdr_free 
 	277	         freeaddrinfo             inet_pton              xdr_getcredres 
 	278	         freeifaddrs              innetgr                xdr_hyper 
 	279	         gai_strerror             iruserok               xdr_int 
 	280	         getaddrinfo              iruserok_af            xdr_int16_t 
 	281	         getaliasbyname           key_decryptsession     xdr_int32_t 
 	282	         getaliasbyname_r         key_decryptsession_pk  xdr_int64_t 
 	283	         getaliasent              key_encryptsession     xdr_int8_t 
 	284	         getaliasent_r            key_encryptsession_pk  xdr_keybuf 
 	285	         gethostbyaddr            key_gendes             xdr_key_netstarg 
 	286	         gethostbyaddr_r          key_get_conv           xdr_key_netstres 
 	287	         gethostbyname            key_secretkey_is_set   xdr_keystatus 
 	288	         gethostbyname2           key_setnet             xdr_long 
 	289	         gethostbyname2_r         key_setsecret          xdr_longlong_t 
 	290	         gethostbyname_r          netname2host           xdrmem_create 
 	291	         gethostent               netname2user           xdr_netnamestr 
 	292	         gethostent_r             ntohl                  xdr_netobj 
 	293	         getifaddrs               ntohs                  xdr_opaque 
 	294	         getipv4sourcefilter      passwd2des             xdr_opaque_auth 
 	295	         get_myaddress            pmap_getmaps           xdr_pmap 
 	296	         getnameinfo              pmap_getport           xdr_pmaplist 
 	297	         getnetbyaddr             pmap_rmtcall           xdr_pointer 
 	298	         getnetbyaddr_r           pmap_set               xdr_quad_t 
 	299	         getnetbyname             pmap_unset             xdrrec_create 
 	300	         getnetbyname_r           rcmd                   xdrrec_endofrecord 
 	301	         getnetent                rcmd_af                xdrrec_eof 
 	302	         getnetent_r              registerrpc            xdrrec_skiprecord 
 	303	         getnetgrent              res_init               xdr_reference 
 	304	         getnetgrent_r            rexec                  xdr_rejected_reply 
 	305	         getnetname               rexec_af               xdr_replymsg 
 	306	         getprotobyname           rexecoptions           xdr_rmtcall_args 
 	307	         getprotobyname_r         rpc_createerr          xdr_rmtcallres 
 	308	         getprotobynumber         rresvport              xdr_short 
 	309	         getprotobynumber_r       rresvport_af           xdr_sizeof 
 	310	         getprotoent              rtime                  xdrstdio_create 
 	311	         getprotoent_r            ruserok                xdr_string 
 	312	         getpublickey             ruserok_af             xdr_u_char 
 	313	         getrpcbyname             ruserpass              xdr_u_hyper 
 	314	         getrpcbyname_r           setaliasent            xdr_u_int 
 	315	         getrpcbynumber           sethostent             xdr_uint16_t 
 	316	         getrpcbynumber_r         setipv4sourcefilter    xdr_uint32_t 
 	317	         getrpcent                setnetent              xdr_uint64_t 
 	318	         getrpcent_r              setnetgrent            xdr_uint8_t 
 	319	         getrpcport               setprotoent            xdr_u_long 
 	320	         getsecretkey             setrpcent              xdr_u_longlong_t 
 	321	         getservbyname            setservent             xdr_union 
 	322	         getservbyname_r          setsourcefilter        xdr_unixcred 
 	323	         getservbyport            svcauthdes_stats       xdr_u_quad_t 
 	324	         getservbyport_r          svcerr_auth            xdr_u_short 
 	325	         getservent               svcerr_decode          xdr_vector 
 	326	         getservent_r             svcerr_noproc          xdr_void 
 	327	         getsourcefilter          svcerr_noprog          xdr_wrapstring 
 	328	         h_errlist                svcerr_progvers        xencrypt 
 	329	         h_errno                  svcerr_systemerr       xprt_register 
 	330	         herror                   svcerr_weakauth        xprt_unregister 
 	331	         h_nerr                   svc_exit 
 	332	         host2netname             svcfd_create 

 很多函数没有添加,上eglibc的站点看了一下
EGLIBC is no longer developed and such goals are now being addressed directly in GLIBC.
果断使用glibc

阅读(4684) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~