Reputation: 11
I am trying to install tree 1.8.0 in my cygwin console. To do that, I downloaded the source.
Here is the content of the file
$ ls -lh
итого 185K
-rwxrwx---+ 1 Администраторы place 12K сен 11 19:00 CHANGES
-rwxrwx---+ 1 Администраторы place 17K сен 11 19:00 color.c
drwxrwx---+ 1 Администраторы place 0 сен 11 19:01 doc
-rwxrwx---+ 1 Администраторы place 7,4K сен 11 19:00 file.c
-rwxrwx---+ 1 Администраторы place 3,1K сен 11 19:00 hash.c
-rwxrwx---+ 1 Администраторы place 15K сен 11 19:00 html.c
-rwxrwx---+ 1 Администраторы place 597 сен 11 18:59 INSTALL
-rwxrwx---+ 1 Администраторы place 9,6K сен 11 18:59 json.c
-rwxrwx---+ 1 Администраторы place 18K сен 11 18:58 LICENSE
-rwxrwx---+ 1 Администраторы place 3,0K сен 11 19:04 Makefile
-rwxrwx---+ 1 Администраторы place 5,7K сен 11 18:57 README
-rwxrwx---+ 1 Администраторы place 5,2K сен 11 18:57 strverscmp.c
-rwxrwx---+ 1 Администраторы place 2,4K сен 11 18:56 TODO
-rwxrwx---+ 1 Администраторы place 39K сен 11 18:56 tree.c
-rwxrwx---+ 1 Администраторы place 5,5K сен 11 18:56 tree.h
-rwxrwx---+ 1 Администраторы place 7,5K сен 11 18:56 unix.c
-rwxrwx---+ 1 Администраторы place 8,9K сен 11 18:55 xml.c
but when i run make, i get this:
$ make
makefile:104: target 'strverscmp.o' given more than once in the same rule
gcc -O2 -Wall -fomit-frame-pointer -DCYGWIN -c -o tree.o tree.c
In file included from tree.c:20:
tree.h:34:10: fatal error: pwd.h: No such file or directory
34 | #include <pwd.h>
| ^~~~~~~
compilation terminated.
make: *** [makefile:105: tree.o] Error 1
I have no idea how to fix it, help please
Upvotes: 1
Views: 224
Reputation: 8476
You need to install the cygwin-devel
package.
$ cygcheck -p usr/include/pwd.h
Found 10 matches for usr/include/pwd.h
...
cygwin-devel-3.1.7-1 - cygwin-devel: Core development files
...
PS: The tree package is already available in Cygwin
https://cygwin.com/packages/summary/tree.html
Upvotes: 2