在cygwin中安装tree-1.6.0。我缺少什么? [英] Installing tree-1.6.0 in cygwin. What am I missing?
本文介绍了在cygwin中安装tree-1.6.0。我缺少什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试安装树1.6.0 我的cygwin控制台。
$ b这是文件的内容
code> ===> ls -lh
共269K
-rw-r - r-- 1个用户无8.8K 2011年6月24日更改
-rw-r - r-- 1个用户无16K 6月22日2011 color.c
-rw-r - r-- 1个用户无17K Apr 14 11:35 color.o
drwxr-xr-x + 1个用户无0 Apr 14 11:35 doc
-rw-r - r-- 1 user无3.1K 2011年6月24日hash.c
-rw-r - r-- 1用户无2.4K 4月14日11:35 hash.o
-rw-r - r-- 1个用户无15K 2011年6月24日html.c
-rw-r - r-- 1个用户无21K Apr 14 11:35 html.o
-rw-r - r-- 1个用户无596年6月24日INSTALL
-rw-r - r-- 1个用户无18K Aug 12 2004许可
-rw-r - r- - 1 user无2.6K 2011年6月24日Makefile
-rw-r - r-- 1个用户无4.6K 2011年6月24日README
-rw-r - r-- 1用户无5.2K 2008年8月27日strverscmp.c
-rw-r - r-- 1用户无2.2K 2011年6月24日TODO
-rw-r - r-- 1用户无31K 2011年6月24日树。 c
-rw-r - r-- 1用户无5.0K 2011年6月24日tree.h
-rw-r - r-- 1用户无37K 4月14日11:35 tree.o
-rw-r - r-- 1 user无7.4K 2011年6月22日unix.c
-rw-r - r-- 1个用户无11K Apr 14 11:35 unix.o
-rw-r - r-- 1个用户无8.7K 2011年6月24日xml.c
-rw-r - r-- 1个用户无13K 4月14日11:35 xml.o
当我运行make时,下面是我得到的:
===> make
gcc -O4 -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS = 64 -c -o tree.o tree.c
tree.c:在函数'main'中:
tree.c: 481:7:warning:format'%lld'期望类型为'long long int'的参数,但是参数3具有类型'off_t'[-Wformat =]
if(duflag)fprintf(outfile,< size> ;%lld< / size> \\\
,size);
^
tree.c:481:7:warning:format'%lld'期望类型为long long int的参数,但是参数3的类型为'off_t'[-Wformat =]
tree.c:在函数'versort':
tree.c:782:5:warning:隐式声明函数'strverscmp'[-Wimplicit-function-declaration]
if((* a) - > isdir ==(* b) - > isdir)return strverscmp((* a) - > name,(* b) - > name);
^
tree.c:在函数'psize'中:
tree.c:1107:3:warning:format'%lld'期望类型为'long long int'的参数, 3的类型为'off_t'[-Wformat =]
} else return sprintf(buf,sizeof(off_t)== sizeof(long long)?%11lld:%9ld,size);
^
tree.c:1107:3:warning:format'%lld'期望类型为long long int的参数,但是参数3的类型为'off_t'[-Wformat =]
gcc -O4 -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS = 64 -c -o unix.o unix.c
gcc -O4 -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS = 64 -c -o html.o html。 c
gcc -O4 -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS = 64 -c -o xml.o xml.c
xml.c:在函数'xml_fillinfo'中:
xml.c: 301:3:warning:format'%lld'期望类型为'long long int'的参数,但是参数3的类型为'off_t'[-Wformat =]
if(sflag)fprintf(outfile, \\%lld\,ent-> size);
^
xml.c:301:3:warning:format'%lld'期望类型为long long int的参数,但是参数3的类型为'off_t'[-Wformat =]
gcc -O4 -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS = 64 -c -o hash.o hash.c
gcc -O4 -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS = 64 -c -o color.o color。 c
gcc -s -o tree tree.o unix.o html.o xml.o hash.o color.o
tree.o:tree.c :(。text + 0x1ba):undefined reference到`strverscmp'
tree.o:tree.c :(。text + 0x1ba):relocation截断以适合未定义的符号`strve rscmp'R_X86_64_PC32
/ usr / bin / ld:tree.o :坏的重定位地址0x0在`.data'节
/ usr / bin / ld:最终链接失败:操作无效
collect2:错误:ld返回1退出状态
Makefile:86:recipe目标'tree'失败
make:*** [tree]错误1
您应该按照文档 INSTALL
1。编辑操作系统的Makefile。
I am trying to install tree 1.6.0 in my cygwin console. To do that, I downloaded the source.
Here is the content of the file
===> ls -lh
total 269K
-rw-r--r-- 1 user None 8.8K Jun 24 2011 CHANGES
-rw-r--r-- 1 user None 16K Jun 22 2011 color.c
-rw-r--r-- 1 user None 17K Apr 14 11:35 color.o
drwxr-xr-x+ 1 user None 0 Apr 14 11:35 doc
-rw-r--r-- 1 user None 3.1K Jun 24 2011 hash.c
-rw-r--r-- 1 user None 2.4K Apr 14 11:35 hash.o
-rw-r--r-- 1 user None 15K Jun 24 2011 html.c
-rw-r--r-- 1 user None 21K Apr 14 11:35 html.o
-rw-r--r-- 1 user None 596 Jun 24 2011 INSTALL
-rw-r--r-- 1 user None 18K Aug 12 2004 LICENSE
-rw-r--r-- 1 user None 2.6K Jun 24 2011 Makefile
-rw-r--r-- 1 user None 4.6K Jun 24 2011 README
-rw-r--r-- 1 user None 5.2K Aug 27 2008 strverscmp.c
-rw-r--r-- 1 user None 2.2K Jun 24 2011 TODO
-rw-r--r-- 1 user None 31K Jun 24 2011 tree.c
-rw-r--r-- 1 user None 5.0K Jun 24 2011 tree.h
-rw-r--r-- 1 user None 37K Apr 14 11:35 tree.o
-rw-r--r-- 1 user None 7.4K Jun 22 2011 unix.c
-rw-r--r-- 1 user None 11K Apr 14 11:35 unix.o
-rw-r--r-- 1 user None 8.7K Jun 24 2011 xml.c
-rw-r--r-- 1 user None 13K Apr 14 11:35 xml.o
When I run make, the following is what I get:
===> make
gcc -O4 -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -o tree.o tree.c
tree.c: In function ‘main’:
tree.c:481:7: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘off_t’ [-Wformat=]
if (duflag) fprintf(outfile," <size>%lld</size>\n", size);
^
tree.c:481:7: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘off_t’ [-Wformat=]
tree.c: In function ‘versort’:
tree.c:782:5: warning: implicit declaration of function ‘strverscmp’ [-Wimplicit-function-declaration]
if ((*a)->isdir == (*b)->isdir) return strverscmp((*a)->name,(*b)->name);
^
tree.c: In function ‘psize’:
tree.c:1107:3: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘off_t’ [-Wformat=]
} else return sprintf(buf, sizeof(off_t) == sizeof(long long)? " %11lld" : " %9ld", size);
^
tree.c:1107:3: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘off_t’ [-Wformat=]
gcc -O4 -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -o unix.o unix.c
gcc -O4 -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -o html.o html.c
gcc -O4 -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -o xml.o xml.c
xml.c: In function ‘xml_fillinfo’:
xml.c:301:3: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘ off_t’ [-Wformat=]
if (sflag) fprintf(outfile, " size=\"%lld\"", ent->size);
^
xml.c:301:3: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘ off_t’ [-Wformat=]
gcc -O4 -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -o hash.o hash.c
gcc -O4 -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -o color.o color.c
gcc -s -o tree tree.o unix.o html.o xml.o hash.o color.o
tree.o:tree.c:(.text+0x1ba): undefined reference to `strverscmp'
tree.o:tree.c:(.text+0x1ba): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `strve rscmp'
/usr/bin/ld: tree.o: bad reloc address 0x0 in section `.data'
/usr/bin/ld: final link failed: Invalid operation
collect2: error: ld returned 1 exit status
Makefile:86: recipe for target 'tree' failed
make: *** [tree] Error 1
What is wrong and how can I fix this?
解决方案
You should follow the instructions in the document INSTALL
, in the top level of the distribution directory. In particular the first step:
1. Edit the Makefile for your OS.
这篇关于在cygwin中安装tree-1.6.0。我缺少什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文