免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4294 | 回复: 2
打印 上一主题 下一主题

[故障求助] xlc -bstatic怎么不行啊? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-05-12 20:55 |只看该作者 |倒序浏览
xlc -DHAVE_CONFIG_H -I. -I. -g -q64 -bstatic -c snmptop.c
        xlc -DHAVE_CONFIG_H -I. -I. -g -q64 -bstatic -c snmptrap.c
        xlc -DHAVE_CONFIG_H -I. -I. -g -q64 -bstatic -c utils.c
        xlc -DHAVE_CONFIG_H -I. -I. -g -q64 -bstatic -c ./machine/m_aix5.c
        xlc -DHAVE_CONFIG_H -I. -I. -g -q64 -bstatic  -o snmptop snmptop.o snmptrap.o utils.o  m_aix5.o -lperfstat -lm
ld: 0711-317 ERROR: Undefined symbol: .___memmove64
ld: 0711-317 ERROR: Undefined symbol: errno
ld: 0711-317 ERROR: Undefined symbol: disclaim
ld: 0711-317 ERROR: Undefined symbol: kpwrite
ld: 0711-317 ERROR: Undefined symbol: kwritev
ld: 0711-317 ERROR: Undefined symbol: kwrite
ld: 0711-317 ERROR: Undefined symbol: _nsleep
ld: 0711-317 ERROR: Undefined symbol: _sigpending
ld: 0711-317 ERROR: Undefined symbol: _sigaction
ld: 0711-317 ERROR: Undefined symbol: _sigsuspend
ld: 0711-317 ERROR: Undefined symbol: _setsid
ld: 0711-317 ERROR: Undefined symbol: _setpgrp
ld: 0711-317 ERROR: Undefined symbol: _setpgid
ld: 0711-317 ERROR: Undefined symbol: _getpgrpx
ld: 0711-317 ERROR: Undefined symbol: _getpgrp
ld: 0711-317 ERROR: Undefined symbol: _getppid
ld: 0711-317 ERROR: Undefined symbol: _getpid
ld: 0711-317 ERROR: Undefined symbol: kgetsidx
ld: 0711-317 ERROR: Undefined symbol: kgetpgidx
ld: 0711-317 ERROR: Undefined symbol: kill
ld: 0711-317 ERROR: Undefined symbol: _pause
ld: 0711-317 ERROR: Undefined symbol: incinterval
ld: 0711-317 ERROR: Undefined symbol: gettimerid
ld: 0711-317 ERROR: Undefined symbol: .___memset64
ld: 0711-317 ERROR: Undefined symbol: open
ld: 0711-317 ERROR: Undefined symbol: klseek
ld: 0711-317 ERROR: Undefined symbol: fstatx
ld: 0711-317 ERROR: Undefined symbol: statx
ld: 0711-317 ERROR: Undefined symbol: mntctl
ld: 0711-317 ERROR: Undefined symbol: close
ld: 0711-317 ERROR: Undefined symbol: kfcntl
ld: 0711-317 ERROR: Undefined symbol: kpread
ld: 0711-317 ERROR: Undefined symbol: kreadv
ld: 0711-317 ERROR: Undefined symbol: kread
ld: 0711-317 ERROR: Undefined symbol: environ
ld: 0711-317 ERROR: Undefined symbol: .___memccpy64
ld: 0711-317 ERROR: Undefined symbol: .___bzero64
ld: 0711-317 ERROR: Undefined symbol: fstatfs64
ld: 0711-317 ERROR: Undefined symbol: statfs64
ld: 0711-317 ERROR: Undefined symbol: fstatfs
ld: 0711-317 ERROR: Undefined symbol: statfs
ld: 0711-317 ERROR: Undefined symbol: kioctl32
ld: 0711-317 ERROR: Undefined symbol: kioctl
ld: 0711-317 ERROR: Undefined symbol: lseek
ld: 0711-317 ERROR: Undefined symbol: _errno
ld: 0711-317 ERROR: Undefined symbol: sbrk
ld: 0711-317 ERROR: Undefined symbol: vmgetinfo
ld: 0711-317 ERROR: Undefined symbol: _ukey_enable
ld: 0711-317 ERROR: Undefined symbol: access
ld: 0711-317 ERROR: Undefined symbol: getuidx
ld: 0711-317 ERROR: Undefined symbol: getgidx
ld: 0711-317 ERROR: Undefined symbol: _exit
ld: 0711-317 ERROR: Undefined symbol: _system_configuration
ld: 0711-317 ERROR: Undefined symbol: _system_TB_config
ld: 0711-317 ERROR: Undefined symbol: .___strstr64
ld: 0711-317 ERROR: Undefined symbol: getprocs
ld: 0711-317 ERROR: Undefined symbol: creat
ld: 0711-317 ERROR: Undefined symbol: _fp_fpscrx64_
ld: 0711-317 ERROR: Undefined symbol: _fp_trapstate_ker
ld: 0711-317 ERROR: Undefined symbol: tprofil
ld: 0711-317 ERROR: Undefined symbol: profil
ld: 0711-317 ERROR: Undefined symbol: sigprocmask
ld: 0711-317 ERROR: Undefined symbol: sys_parm
ld: 0711-317 ERROR: Undefined symbol: skeytune
ld: 0711-317 ERROR: Undefined symbol: sysconfig
ld: 0711-317 ERROR: Undefined symbol: privcheck
ld: 0711-317 ERROR: Undefined symbol: kfork
ld: 0711-317 ERROR: Undefined symbol: .___memcmp64
ld: 0711-317 ERROR: Undefined symbol: mycpu
ld: 0711-317 ERROR: Undefined symbol: sdl2idx_page
ld: 0711-317 ERROR: Undefined symbol: ra_execve
ld: 0711-317 ERROR: Undefined symbol: kra_fork
ld: 0711-317 ERROR: Undefined symbol: _rs_op
ld: 0711-317 ERROR: Undefined symbol: rs_getpartition
ld: 0711-317 ERROR: Undefined symbol: rs_getsystem
ld: 0711-317 ERROR: Undefined symbol: __rs_pickmcm
ld: 0711-317 ERROR: Undefined symbol: ra_attachrset
ld: 0711-317 ERROR: Undefined symbol: yield
ld: 0711-317 ERROR: Undefined symbol: execve
ld: 0711-317 ERROR: Undefined symbol: kwaitpid64
ld: 0711-317 ERROR: Undefined symbol: kwaitpid
ld: 0711-317 ERROR: Undefined symbol: pipe
ld: 0711-317 ERROR: Undefined symbol: mprotect
ld: 0711-317 ERROR: Undefined symbol: appresabs
ld: 0711-317 ERROR: Undefined symbol: appresinc
ld: 0711-317 ERROR: Undefined symbol: apprestimer
ld: 0711-317 ERROR: Undefined symbol: appsettimer
ld: 0711-317 ERROR: Undefined symbol: appgettimer
ld: 0711-317 ERROR: Undefined symbol: appulimit
ld: 0711-317 ERROR: Undefined symbol: appgetrusage
ld: 0711-317 ERROR: Undefined symbol: appsetrlimit
ld: 0711-317 ERROR: Undefined symbol: appgetrlimit
ld: 0711-317 ERROR: Undefined symbol: Trconflag
ld: 0711-317 ERROR: Undefined symbol: utrchook64
ld: 0711-317 ERROR: Undefined symbol: accessx
ld: 0711-317 ERROR: Undefined symbol: __libc_sbrk
ld: 0711-317 ERROR: Undefined symbol: kloadquery
ld: 0711-317 ERROR: Undefined symbol: kunload64
ld: 0711-317 ERROR: Undefined symbol: kload
ld: 0711-317 ERROR: Undefined symbol: .uname
ld: 0711-317 ERROR: Undefined symbol: .knlist
ld: 0711-317 ERROR: Undefined symbol: socket
ld: 0711-317 ERROR: Undefined symbol: sendto
ld: 0711-317 ERROR: Undefined symbol: pthread_mutex_lock
ld: 0711-317 ERROR: Undefined symbol: pthread_mutex_unlock
ld: 0711-317 ERROR: Undefined symbol: CuAt_CLASS
ld: 0711-317 ERROR: Undefined symbol: odm_get_list
ld: 0711-317 ERROR: Undefined symbol: odm_free_list
ld: 0711-317 ERROR: Undefined symbol: odm_initialize
ld: 0711-317 ERROR: Undefined symbol: odm_set_path
ld: 0711-317 ERROR: Undefined symbol: odm_terminate
ld: 0711-317 ERROR: Undefined symbol: ptx_dkstat_reset
ld: 0711-317 ERROR: Undefined symbol: ptx_get_cpuinfo
ld: 0711-317 ERROR: Undefined symbol: ptx_get_sysinfo
ld: 0711-317 ERROR: Undefined symbol: ptx_get_sysstats
ld: 0711-317 ERROR: Undefined symbol: ptx_get_vmker
ld: 0711-317 ERROR: Undefined symbol: ftruncate
ld: 0711-317 ERROR: Undefined symbol: .mmap
ld: 0711-317 ERROR: Undefined symbol: .munmap
ld: 0711-317 ERROR: Undefined symbol: .getprocs64
ld: 0711-317 ERROR: Undefined symbol: _setpri
ld: 0711-317 ERROR: Undefined symbol: _getpri
ld: 0711-317 ERROR: Undefined symbol: _setpriority
ld: 0711-317 ERROR: Undefined symbol: _getpriority
ld: 0711-317 ERROR: Undefined symbol: _poll
ld: 0711-317 ERROR: Undefined symbol: _select
ld: 0711-317 ERROR: Undefined symbol: _pollset_poll
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
make: The error code from the last command is 8.

论坛徽章:
0
2 [报告]
发表于 2007-05-12 22:04 |只看该作者

回复 1楼 alpbrook 的帖子

在compiler.pdf中看到这么一段
Notes
The default option, -bdynamic, ensures that the C library (lib.c) links dynamically. To avoid possible problems with unresolved linker errors when linking the C library, you must add the -bdynamic option to the end of any compilation sections that use the -bstatic option.
改成如下
xlc -DHAVE_CONFIG_H -I. -I. -g -q64 -bstatic -c snmptop.c
xlc -DHAVE_CONFIG_H -I. -I. -g -q64 -bstatic -c snmptrap.c
xlc -DHAVE_CONFIG_H -I. -I. -g -q64 -bstatic -c utils.c
xlc -DHAVE_CONFIG_H -I. -I. -g -q64 -bstatic -c ./machine/m_aix5.c
xlc -DHAVE_CONFIG_H -I. -I. -g -q64 -bstatic  -bdynamic -o snmptop snmptop.o snmptrap.o utils.o  m_aix5.o -lperfstat -lm
编译是通过了,但没有验证运行情况

论坛徽章:
0
3 [报告]
发表于 2007-05-14 14:25 |只看该作者
编译能通过,运行应该没问题
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP