免费注册 查看新帖 |

Chinaunix

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

hp-ux 11i v1下zlib1.2.3编译通不过 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-01-03 12:59 |只看该作者 |倒序浏览
# uname -a
HP-UX test B.11.11 U 9000/800
# cd zlib-1.2.3

# ./configure
Checking for gcc...
Building static library libz.a version 1.2.3 with cc.
Checking for unistd.h... No.
Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()
Checking for snprintf() in stdio.h... No.
  WARNING: snprintf() not found, falling back to sprintf(). zlib
  can build but will be open to possible buffer-overflow security
  vulnerabilities.
Checking for return value of sprintf()... No.
  WARNING: apparently sprintf() does not return a value. zlib
  can build but will be open to possible string-format security
  vulnerabilities.
Checking for errno.h... No.
Checking for mmap support... No.


# make
        cc -O -DNO_snprintf -DHAS_sprintf_void -DNO_ERRNO_H -c example.c
(Bundled) cc: warning 480: The -O option is available only with the C/ANSI C pro
duct; ignored.
        cc -O -DNO_snprintf -DHAS_sprintf_void -DNO_ERRNO_H -c adler32.c
(Bundled) cc: warning 480: The -O option is available only with the C/ANSI C pro
duct; ignored.
(Bundled) cc: "adler32.c", line 72: error 1701: Unsigned suffix is an  ANSI feat
ure.
(Bundled) cc: "adler32.c", line 73: error 1701: Unsigned suffix is an  ANSI feat
ure.
(Bundled) cc: "adler32.c", line 75: error 1701: Unsigned suffix is an  ANSI feat
ure.
(Bundled) cc: "adler32.c", line 76: error 1701: Unsigned suffix is an  ANSI feat
ure.
(Bundled) cc: "adler32.c", line 90: error 1701: Unsigned suffix is an  ANSI feat
ure.
(Bundled) cc: "adler32.c", line 91: error 1701: Unsigned suffix is an  ANSI feat
ure.
(Bundled) cc: "adler32.c", line 92: error 1701: Unsigned suffix is an  ANSI feat
ure.
(Bundled) cc: "adler32.c", line 104: error 1701: Unsigned suffix is an  ANSI fea
ture.
(Bundled) cc: "adler32.c", line 105: error 1701: Unsigned suffix is an  ANSI fea
ture.
(Bundled) cc: "adler32.c", line 119: error 1701: Unsigned suffix is an  ANSI fea
ture.
(Bundled) cc: "adler32.c", line 120: error 1701: Unsigned suffix is an  ANSI fea
ture.
(Bundled) cc: "adler32.c", line 138: error 1701: Unsigned suffix is an  ANSI fea
ture.
(Bundled) cc: "adler32.c", line 141: error 1701: Unsigned suffix is an  ANSI fea
ture.
(Bundled) cc: "adler32.c", line 142: error 1701: Unsigned suffix is an  ANSI fea
ture.
(Bundled) cc: "adler32.c", line 143: error 1701: Unsigned suffix is an  ANSI fea
ture.
(Bundled) cc: "adler32.c", line 144: error 1701: Unsigned suffix is an  ANSI fea
ture.
(Bundled) cc: "adler32.c", line 144: error 1701: Unsigned suffix is an  ANSI fea
ture.
(Bundled) cc: "adler32.c", line 145: error 1701: Unsigned suffix is an  ANSI fea
ture.
(Bundled) cc: "adler32.c", line 145: error 1701: Unsigned suffix is an  ANSI fea
ture.
(Bundled) cc: "adler32.c", line 146: error 1701: Unsigned suffix is an  ANSI fea
ture.
(Bundled) cc: "adler32.c", line 146: error 1701: Unsigned suffix is an  ANSI fea
ture.
(Bundled) cc: "adler32.c", line 147: error 1701: Unsigned suffix is an  ANSI fea
ture.
(Bundled) cc: "adler32.c", line 147: error 1701: Unsigned suffix is an  ANSI fea
ture.
*** Error exit code 1

Stop.
#

检查了一下cc:
# ls -l /usr/bin/cc
lrwxr-xr-t   1 root       sys             15 Aug 11 11:49 /usr/bin/cc -> /usr/ccs/bin/cc
# ls -l /usr/ccs/bin/cc
lrwxr-xr-x   1 root       sys             12 Aug 11 11:27 /usr/ccs/bin/cc -> ./cc_bundled
# ls -l /usr/ccs/bin/cc_bundled
-r-xr-xr-x   1 bin        bin         258048 Nov 14  2000 /usr/ccs/bin/cc_bundled

将Makefile中的cc全改成aCC后:

# make
        aCC -O -DNO_snprintf -DHAS_sprintf_void -DNO_ERRNO_H -c adler32.c
Error 43: "adler32.c", line 57 # C++ does not allow Old-style (non-prototype)
    function definitions.
    uLong ZEXPORT adler32(adler, buf, len)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error 43: "adler32.c", line 128 # C++ does not allow Old-style (non-prototype)
    function definitions.
    uLong ZEXPORT adler32_combine(adler1, adler2, len2)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
*** Error exit code 2

Stop.
#
有谁能帮帮我?

[ 本帖最后由 wolf_of_north 于 2006-1-3 13:01 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2006-01-03 22:48 |只看该作者
you can install HP ANSI C(which need license),or you use the free gcc compiler to compile it.
otherwise,you can download the depot file.
http://hpux.connect.org.uk/hppd/hpux/Misc/zlib-1.2.3/

论坛徽章:
0
3 [报告]
发表于 2006-01-06 16:20 |只看该作者

回复 2楼 考拉熊 的帖子

ANSI C是aCC吗,我安装了.但用aCC编译同样有问题:
将Makefile中的cc全改成aCC后:

# make
        aCC -O -DNO_snprintf -DHAS_sprintf_void -DNO_ERRNO_H -c adler32.c
Error 43: "adler32.c", line 57 # C++ does not allow Old-style (non-prototype)
    function definitions.
    uLong ZEXPORT adler32(adler, buf, len)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error 43: "adler32.c", line 128 # C++ does not allow Old-style (non-prototype)
    function definitions.
    uLong ZEXPORT adler32_combine(adler1, adler2, len2)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
*** Error exit code 2

Stop.
#
是不是configure之前要加一些环境变量,让aCC能兼容Old-style的函数原型
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP