전에 친구가 물어봐서 한번 봤는데요,
시스템콜의 프로토타입이 조금씩 다르더군요.
헤더파일의 위치도 체크해봐야 하고요.
헤더파일을 찾아서 거기서 쓰이는 시스템콜들의 이름을 검사해보시고 바꿔주세요.
특히, 대소문자가 조금씩 다른 것들이 많습니다.
아마도 BSD 계열이랑 SVR 계열의 차이때문인 것 같습니다.
(Linux 자체가 유닉스에 100% 호환되는 것도 아닙니다)
하지만, 솔라리스에서 컴파일한다고 모두 컴파일될지도 의문입니다.
-bash-2.05b$ ./configure
creating cache ./config.cache
checking host system type... i386-unknown-freebsd5.3
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for ranlib... ranlib
checking for pthread_create in -lpthread... yes
checking for t_open in -lnsl... no
checking for socket in -lsocket... no
checking for /usr/local/bind/lib/libbind.a... no
checking for /home/alpha/libbind.a... no
checking for /home/alpha/libresolv.a... no
checking for res_init in -lresolv... no
checking for t_open in -lxti... no
checking for /home/alpha/libunp.a... no
checking for /home/alpha/libunpxti.a... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/socket.h... yes
checking for sys/time.h... yes
checking for time.h... yes
checking for netinet/in.h... yes
checking for arpa/inet.h... yes
checking for errno.h... yes
checking for fcntl.h... yes
checking for netdb.h... yes
checking for signal.h... yes
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for sys/stat.h... yes
checking for sys/uio.h... yes
checking for unistd.h... yes
checking for sys/wait.h... yes
checking for sys/un.h... yes
checking for sys/select.h... yes
checking for poll.h... yes
checking for strings.h... yes
checking for sys/ioctl.h... yes
checking for sys/filio.h... yes
checking for sys/sockio.h... yes
checking for pthread.h... yes
checking for sys/sysctl.h... yes
checking for poll.h... (cached) yes
checking for xti.h... no
checking for xti_inet.h... no
checking for netconfig.h... yes
checking for netdir.h... no
checking for stropts.h... no
checking whether time.h and sys/time.h may both be included... yes
checking if uint8_t defined... yes
checking if int16_t defined... yes
checking if uint16_t defined... yes
checking if int32_t defined... yes
checking if uint32_t defined... yes
checking if size_t defined... yes
checking if ssize_t defined... yes
checking if socklen_t defined... yes
checking if sa_family_t defined... yes
checking if t_scalar_t defined... no
checking if t_uscalar_t defined... no
checking if sockaddr{} has sa_len member... yes
checking if msghdr{} has msg_control member... yes
checking for getaddrinfo function prototype in netdb.h... yes
checking for getnameinfo function prototype in netdb.h... yes
checking for gethostname function prototype in unistd.h... yes
checking for getrusage function prototype in sys/resource.h... yes
checking for hstrerror function prototype in netdb.h... yes
checking for if_nametoindex function prototype in net/if.h... yes
checking for inet_aton function prototype in arpa/inet.h... yes
checking for inet_pton function prototype in arpa/inet.h... yes
checking for isfdtype function prototype in sys/stat.h... no
checking for pselect function prototype in sys/select.h... yes
checking for snprintf function prototype in stdio.h... yes
checking for sockatmark function prototype in sys/socket.h... yes
checking for addrinfo{}... yes
checking for if_nameindex{}... yes
checking for sockaddr_dl{}... yes
checking for timespec{}... yes
checking for /dev/tcp... no
checking for /dev/xti/tcp... no
checking for /dev/streams/xtiso/tcp... no
checking for bzero... yes
checking for getaddrinfo... yes
checking for gethostname... yes
checking for gethostbyname2... yes
checking for gethostbyname_r... no
checking for getnameinfo... yes
checking for hstrerror... yes
checking for if_nametoindex... yes
checking for inet_aton... yes
checking for inet_pton... yes
checking for isfdtype... no
checking for poll... yes
checking for pselect... yes
checking for snprintf... yes
checking for sockatmark... yes
checking for vsnprintf... yes
checking for IPv4 support... yes
checking for IPv6 support... yes
checking for Unix domain sockets... yes
checking for multicast support... yes
checking for -I/home/alpha/doc/unp2ev1/src/include... no
updating cache ./config.cache
creating ./config.status
creating Makefile
creating Make.defines
creating config.h
-bash-2.05b$ cd lib
-bash-2.05b$ make
gcc -g -O2 -D_REENTRANT -Wall -c connect_nonb.c
gcc -g -O2 -D_REENTRANT -Wall -c connect_timeo.c
gcc -g -O2 -D_REENTRANT -Wall -c daemon_inetd.c
gcc -g -O2 -D_REENTRANT -Wall -c daemon_init.c
gcc -g -O2 -D_REENTRANT -Wall -c dg_cli.c
gcc -g -O2 -D_REENTRANT -Wall -c dg_echo.c
gcc -g -O2 -D_REENTRANT -Wall -c error.c
gcc -g -O2 -D_REENTRANT -Wall -c get_ifi_info.c
gcc -g -O2 -D_REENTRANT -Wall -c gf_time.c
gf_time.c: In function `gf_time':
gf_time.c:14: warning: passing arg 1 of `ctime' from incompatible pointer type
gcc -g -O2 -D_REENTRANT -Wall -c host_serv.c
gcc -g -O2 -D_REENTRANT -Wall -c isfdtype.c
gcc -g -O2 -D_REENTRANT -Wall -c mcast_leave.c
mcast_leave.c: In function `mcast_leave':
mcast_leave.c:26: error: `IPV6_DROP_MEMBERSHIP' undeclared (first use in this function)
mcast_leave.c:26: error: (Each undeclared identifier is reported only once
mcast_leave.c:26: error: for each function it appears in.)
*** Error code 1
-bash-2.05b$ cd libgai/
-bash-2.05b$ make
gcc -g -O2 -D_REENTRANT -Wall -c getaddrinfo.c
getaddrinfo.c: In function `getaddrinfo':
getaddrinfo.c:58: error: `EAI_ADDRFAMILY' undeclared (first use in this function)
getaddrinfo.c:58: error: (Each undeclared identifier is reported only once
getaddrinfo.c:58: error: for each function it appears in.)
getaddrinfo.c:116: error: `EAI_NODATA' undeclared (first use in this function)
*** Error code 1
-bash-2.05b$ cd libxti/
-bash-2.05b$ make
gcc -g -O2 -D_REENTRANT -Wall -c wrapxti.c
In file included from wrapxti.c:5:
unpxti.h:7:17: xti.h: No such file or directory
unpxti.h:22:21: stropts.h: No such file or directory
In file included from wrapxti.c:5:
unpxti.h:93: warning: "struct strbuf" declared inside parameter list
unpxti.h:93: warning: its scope is only this definition or declaration, which is probably not what you want
unpxti.h:94: warning: "struct strbuf" declared inside parameter list
unpxti.h:102: warning: "struct t_call" declared inside parameter list
unpxti.h:103: warning: "struct t_bind" declared inside parameter list
unpxti.h:105: warning: "struct t_call" declared inside parameter list
unpxti.h:107: warning: "struct t_bind" declared inside parameter list
unpxti.h:109: warning: "struct t_call" declared inside parameter list
unpxti.h:111: warning: "struct t_info" declared inside parameter list
unpxti.h:112: warning: "struct t_optmgmt" declared inside parameter list
unpxti.h:114: warning: "struct t_discon" declared inside parameter list
unpxti.h:116: warning: "struct t_unitdata" declared inside parameter list
unpxti.h:117: warning: "struct t_uderr" declared inside parameter list
unpxti.h:120: warning: "struct t_unitdata" declared inside parameter list
unpxti.h:122: warning: "struct netbuf" declared inside parameter list
unpxti.h:126: warning: "struct netbuf" declared inside parameter list
unpxti.h:127: warning: "struct netbuf" declared inside parameter list
unpxti.h:131: warning: "struct netbuf" declared inside parameter list
unpxti.h:135: warning: "struct netbuf" declared inside parameter list
unpxti.h:136: warning: "struct netbuf" declared inside parameter list
unpxti.h:140: warning: "struct t_opthdr" declared inside parameter list
unpxti.h:141: warning: "struct t_opthdr" declared inside parameter list
unpxti.h:142: warning: "struct t_opthdr" declared inside parameter list
unpxti.h:143: warning: "struct t_opthdr" declared inside parameter list
unpxti.h:146: warning: "struct t_opthdr" declared inside parameter list
unpxti.h:147: warning: "struct t_opthdr" declared inside parameter list
unpxti.h:148: warning: "struct t_opthdr" declared inside parameter list
unpxti.h:149: warning: "struct t_opthdr" declared inside parameter list
wrapxti.c: In function `err_xti_doit':
wrapxti.c:55: warning: implicit declaration of function `t_strerror'
wrapxti.c:55: error: `t_errno' undeclared (first use in this function)
wrapxti.c:55: error: (Each undeclared identifier is reported only once
wrapxti.c:55: error: for each function it appears in.)
wrapxti.c:55: warning: format argument is not a pointer (arg 4)
wrapxti.c:55: warning: format argument is not a pointer (arg 4)
wrapxti.c:57: error: `TSYSERR' undeclared (first use in this function)
wrapxti.c: At top level:
wrapxti.c:73: warning: "struct strbuf" declared inside parameter list
wrapxti.c:74: error: conflicting types for 'Getmsg'
unpxti.h:93: error: previous declaration of 'Getmsg' was here
wrapxti.c:74: error: conflicting types for 'Getmsg'
unpxti.h:93: error: previous declaration of 'Getmsg' was here
wrapxti.c: In function `Getmsg':
wrapxti.c:77: warning: implicit declaration of function `getmsg'
wrapxti.c: At top level:
wrapxti.c:83: warning: "struct strbuf" declared inside parameter list
wrapxti.c:84: error: conflicting types for 'Putmsg'
unpxti.h:94: error: previous declaration of 'Putmsg' was here
wrapxti.c:84: error: conflicting types for 'Putmsg'
unpxti.h:94: error: previous declaration of 'Putmsg' was here
wrapxti.c: In function `Putmsg':
wrapxti.c:85: warning: implicit declaration of function `putmsg'
wrapxti.c: At top level:
wrapxti.c:114: warning: "struct t_call" declared inside parameter list
wrapxti.c:115: error: conflicting types for 'T_accept'
unpxti.h:102: error: previous declaration of 'T_accept' was here
wrapxti.c:115: error: conflicting types for 'T_accept'
unpxti.h:102: error: previous declaration of 'T_accept' was here
wrapxti.c: In function `T_accept':
wrapxti.c:118: warning: implicit declaration of function `t_accept'
wrapxti.c: In function `T_alloc':
wrapxti.c:129: warning: implicit declaration of function `t_alloc'
wrapxti.c:129: warning: assignment makes pointer from integer without a cast
wrapxti.c: At top level:
wrapxti.c:135: warning: "struct t_bind" declared inside parameter list
wrapxti.c:136: error: conflicting types for 'T_bind'
unpxti.h:103: error: previous declaration of 'T_bind' was here
wrapxti.c:136: error: conflicting types for 'T_bind'
unpxti.h:103: error: previous declaration of 'T_bind' was here
wrapxti.c: In function `T_bind':
wrapxti.c:137: warning: implicit declaration of function `t_bind'
wrapxti.c: In function `T_close':
wrapxti.c:144: warning: implicit declaration of function `t_close'
wrapxti.c: At top level:
wrapxti.c:149: warning: "struct t_call" declared inside parameter list
wrapxti.c:150: error: conflicting types for 'T_connect'
unpxti.h:105: error: previous declaration of 'T_connect' was here
wrapxti.c:150: error: conflicting types for 'T_connect'
unpxti.h:105: error: previous declaration of 'T_connect' was here
wrapxti.c: In function `T_connect':
wrapxti.c:151: warning: implicit declaration of function `t_connect'
wrapxti.c: In function `T_free':
wrapxti.c:158: warning: implicit declaration of function `t_free'
wrapxti.c: At top level:
wrapxti.c:163: warning: "struct t_bind" declared inside parameter list
wrapxti.c:164: error: conflicting types for 'T_getprotaddr'
unpxti.h:107: error: previous declaration of 'T_getprotaddr' was here
wrapxti.c:164: error: conflicting types for 'T_getprotaddr'
unpxti.h:107: error: previous declaration of 'T_getprotaddr' was here
wrapxti.c: In function `T_getprotaddr':
wrapxti.c:165: warning: implicit declaration of function `t_getprotaddr'
wrapxti.c: In function `T_getstate':
wrapxti.c:174: warning: implicit declaration of function `t_getstate'
wrapxti.c: At top level:
wrapxti.c:181: warning: "struct t_call" declared inside parameter list
wrapxti.c:182: error: conflicting types for 'T_listen'
unpxti.h:109: error: previous declaration of 'T_listen' was here
wrapxti.c:182: error: conflicting types for 'T_listen'
unpxti.h:109: error: previous declaration of 'T_listen' was here
wrapxti.c: In function `T_listen':
wrapxti.c:183: warning: implicit declaration of function `t_listen'
wrapxti.c: In function `T_look':
wrapxti.c:192: warning: implicit declaration of function `t_look'
wrapxti.c: At top level:
wrapxti.c:199: warning: "struct t_info" declared inside parameter list
wrapxti.c:200: error: conflicting types for 'T_open'
unpxti.h:111: error: previous declaration of 'T_open' was here
wrapxti.c:200: error: conflicting types for 'T_open'
unpxti.h:111: error: previous declaration of 'T_open' was here
wrapxti.c: In function `T_open':
wrapxti.c:203: warning: implicit declaration of function `t_open'
wrapxti.c: At top level:
wrapxti.c:210: warning: "struct t_optmgmt" declared inside parameter list
wrapxti.c:211: error: conflicting types for 'T_optmgmt'
unpxti.h:112: error: previous declaration of 'T_optmgmt' was here
wrapxti.c:211: error: conflicting types for 'T_optmgmt'
unpxti.h:112: error: previous declaration of 'T_optmgmt' was here
wrapxti.c: In function `T_optmgmt':
wrapxti.c:212: warning: implicit declaration of function `t_optmgmt'
wrapxti.c: In function `T_rcv':
wrapxti.c:221: warning: implicit declaration of function `t_rcv'
wrapxti.c: At top level:
wrapxti.c:228: warning: "struct t_discon" declared inside parameter list
wrapxti.c:229: error: conflicting types for 'T_rcvdis'
unpxti.h:114: error: previous declaration of 'T_rcvdis' was here
wrapxti.c:229: error: conflicting types for 'T_rcvdis'
unpxti.h:114: error: previous declaration of 'T_rcvdis' was here
wrapxti.c: In function `T_rcvdis':
wrapxti.c:230: warning: implicit declaration of function `t_rcvdis'
wrapxti.c: In function `T_rcvrel':
wrapxti.c:237: warning: implicit declaration of function `t_rcvrel'
wrapxti.c: At top level:
wrapxti.c:242: warning: "struct t_unitdata" declared inside parameter list
wrapxti.c:243: error: conflicting types for 'T_rcvudata'
unpxti.h:116: error: previous declaration of 'T_rcvudata' was here
wrapxti.c:243: error: conflicting types for 'T_rcvudata'
unpxti.h:116: error: previous declaration of 'T_rcvudata' was here
wrapxti.c: In function `T_rcvudata':
wrapxti.c:244: warning: implicit declaration of function `t_rcvudata'
wrapxti.c: At top level:
wrapxti.c:249: warning: "struct t_uderr" declared inside parameter list
wrapxti.c:250: error: conflicting types for 'T_rcvuderr'
unpxti.h:117: error: previous declaration of 'T_rcvuderr' was here
wrapxti.c:250: error: conflicting types for 'T_rcvuderr'
unpxti.h:117: error: previous declaration of 'T_rcvuderr' was here
wrapxti.c: In function `T_rcvuderr':
wrapxti.c:251: warning: implicit declaration of function `t_rcvuderr'
wrapxti.c: In function `T_snd':
wrapxti.c:260: warning: implicit declaration of function `t_snd'
wrapxti.c: In function `T_sndrel':
wrapxti.c:267: warning: implicit declaration of function `t_sndrel'
wrapxti.c: At top level:
wrapxti.c:272: warning: "struct t_unitdata" declared inside parameter list
wrapxti.c:273: error: conflicting types for 'T_sndudata'
unpxti.h:120: error: previous declaration of 'T_sndudata' was here
wrapxti.c:273: error: conflicting types for 'T_sndudata'
unpxti.h:120: error: previous declaration of 'T_sndudata' was here
wrapxti.c: In function `T_sndudata':
wrapxti.c:274: warning: implicit declaration of function `t_sndudata'
wrapxti.c: At top level:
wrapxti.c:280: warning: "struct netbuf" declared inside parameter list
wrapxti.c: In function `Taddr2uaddr':
wrapxti.c:284: warning: implicit declaration of function `taddr2uaddr'
wrapxti.c:284: warning: assignment makes pointer from integer without a cast
wrapxti.c: At top level:
wrapxti.c:310: warning: "struct netbuf" declared inside parameter list
wrapxti.c:311: error: conflicting types for 'Xti_ntop'
unpxti.h:135: error: previous declaration of 'Xti_ntop' was here
wrapxti.c:311: error: conflicting types for 'Xti_ntop'
unpxti.h:135: error: previous declaration of 'Xti_ntop' was here
wrapxti.c: In function `Xti_ntop':
wrapxti.c:314: warning: passing arg 1 of `xti_ntop' from incompatible pointer type
wrapxti.c: At top level:
wrapxti.c:320: warning: "struct netbuf" declared inside parameter list
wrapxti.c:321: error: conflicting types for 'Xti_ntop_host'
unpxti.h:136: error: previous declaration of 'Xti_ntop_host' was here
wrapxti.c:321: error: conflicting types for 'Xti_ntop_host'
unpxti.h:136: error: previous declaration of 'Xti_ntop_host' was here
wrapxti.c: In function `Xti_ntop_host':
wrapxti.c:324: warning: passing arg 1 of `xti_ntop_host' from incompatible pointer type
*** Error code 1
-bash-2.05b$ cd intro
-bash-2.05b$ make
gcc -g -O2 -D_REENTRANT -Wall -c daytimetcpcli.c
gcc -g -O2 -D_REENTRANT -Wall -o daytimetcpcli daytimetcpcli.o ../libunp.a -lpthread
daytimetcpcli.o(.text+0x24): In function `main':
/home/alpha/UNP/unpv12e/intro/daytimetcpcli.c:11: undefined reference to `err_quit'
daytimetcpcli.o(.text+0xde):/home/alpha/UNP/unpv12e/intro/daytimetcpcli.c:28: undefined reference to `err_sys'
daytimetcpcli.o(.text+0x10e):/home/alpha/UNP/unpv12e/intro/daytimetcpcli.c:31: undefined reference to `err_sys'
daytimetcpcli.o(.text+0x120):/home/alpha/UNP/unpv12e/intro/daytimetcpcli.c:14: undefined reference to `err_sys'
daytimetcpcli.o(.text+0x138):/home/alpha/UNP/unpv12e/intro/daytimetcpcli.c:20: undefined reference to `err_quit'
daytimetcpcli.o(.text+0x15d):/home/alpha/UNP/unpv12e/intro/daytimetcpcli.c:23: undefined reference to `err_sys'
*** Error code 1
음?전 UNP1 만 해봤습니다만.. UNP2 가 안되나요?에러 메
음?
전 UNP1 만 해봤습니다만.. UNP2 가 안되나요?
에러 메세지라도 올려봐주시겠습니까?
"unp.h" 헤더화일만 제대로 있어도 잘되었던걸로 기억납니다만~
삽질의 대마왕...
그거 아마..
전에 친구가 물어봐서 한번 봤는데요,
시스템콜의 프로토타입이 조금씩 다르더군요.
헤더파일의 위치도 체크해봐야 하고요.
헤더파일을 찾아서 거기서 쓰이는 시스템콜들의 이름을 검사해보시고 바꿔주세요.
특히, 대소문자가 조금씩 다른 것들이 많습니다.
아마도 BSD 계열이랑 SVR 계열의 차이때문인 것 같습니다.
(Linux 자체가 유닉스에 100% 호환되는 것도 아닙니다)
하지만, 솔라리스에서 컴파일한다고 모두 컴파일될지도 의문입니다.
에러 메시지 입니다.
-bash-2.05b$ ./configure creating cache ./config.cache checking host system type... i386-unknown-freebsd5.3 checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking for ranlib... ranlib checking for pthread_create in -lpthread... yes checking for t_open in -lnsl... no checking for socket in -lsocket... no checking for /usr/local/bind/lib/libbind.a... no checking for /home/alpha/libbind.a... no checking for /home/alpha/libresolv.a... no checking for res_init in -lresolv... no checking for t_open in -lxti... no checking for /home/alpha/libunp.a... no checking for /home/alpha/libunpxti.a... no checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/socket.h... yes checking for sys/time.h... yes checking for time.h... yes checking for netinet/in.h... yes checking for arpa/inet.h... yes checking for errno.h... yes checking for fcntl.h... yes checking for netdb.h... yes checking for signal.h... yes checking for stdio.h... yes checking for stdlib.h... yes checking for string.h... yes checking for sys/stat.h... yes checking for sys/uio.h... yes checking for unistd.h... yes checking for sys/wait.h... yes checking for sys/un.h... yes checking for sys/select.h... yes checking for poll.h... yes checking for strings.h... yes checking for sys/ioctl.h... yes checking for sys/filio.h... yes checking for sys/sockio.h... yes checking for pthread.h... yes checking for sys/sysctl.h... yes checking for poll.h... (cached) yes checking for xti.h... no checking for xti_inet.h... no checking for netconfig.h... yes checking for netdir.h... no checking for stropts.h... no checking whether time.h and sys/time.h may both be included... yes checking if uint8_t defined... yes checking if int16_t defined... yes checking if uint16_t defined... yes checking if int32_t defined... yes checking if uint32_t defined... yes checking if size_t defined... yes checking if ssize_t defined... yes checking if socklen_t defined... yes checking if sa_family_t defined... yes checking if t_scalar_t defined... no checking if t_uscalar_t defined... no checking if sockaddr{} has sa_len member... yes checking if msghdr{} has msg_control member... yes checking for getaddrinfo function prototype in netdb.h... yes checking for getnameinfo function prototype in netdb.h... yes checking for gethostname function prototype in unistd.h... yes checking for getrusage function prototype in sys/resource.h... yes checking for hstrerror function prototype in netdb.h... yes checking for if_nametoindex function prototype in net/if.h... yes checking for inet_aton function prototype in arpa/inet.h... yes checking for inet_pton function prototype in arpa/inet.h... yes checking for isfdtype function prototype in sys/stat.h... no checking for pselect function prototype in sys/select.h... yes checking for snprintf function prototype in stdio.h... yes checking for sockatmark function prototype in sys/socket.h... yes checking for addrinfo{}... yes checking for if_nameindex{}... yes checking for sockaddr_dl{}... yes checking for timespec{}... yes checking for /dev/tcp... no checking for /dev/xti/tcp... no checking for /dev/streams/xtiso/tcp... no checking for bzero... yes checking for getaddrinfo... yes checking for gethostname... yes checking for gethostbyname2... yes checking for gethostbyname_r... no checking for getnameinfo... yes checking for hstrerror... yes checking for if_nametoindex... yes checking for inet_aton... yes checking for inet_pton... yes checking for isfdtype... no checking for poll... yes checking for pselect... yes checking for snprintf... yes checking for sockatmark... yes checking for vsnprintf... yes checking for IPv4 support... yes checking for IPv6 support... yes checking for Unix domain sockets... yes checking for multicast support... yes checking for -I/home/alpha/doc/unp2ev1/src/include... no updating cache ./config.cache creating ./config.status creating Makefile creating Make.defines creating config.h -bash-2.05b$ cd lib -bash-2.05b$ make gcc -g -O2 -D_REENTRANT -Wall -c connect_nonb.c gcc -g -O2 -D_REENTRANT -Wall -c connect_timeo.c gcc -g -O2 -D_REENTRANT -Wall -c daemon_inetd.c gcc -g -O2 -D_REENTRANT -Wall -c daemon_init.c gcc -g -O2 -D_REENTRANT -Wall -c dg_cli.c gcc -g -O2 -D_REENTRANT -Wall -c dg_echo.c gcc -g -O2 -D_REENTRANT -Wall -c error.c gcc -g -O2 -D_REENTRANT -Wall -c get_ifi_info.c gcc -g -O2 -D_REENTRANT -Wall -c gf_time.c gf_time.c: In function `gf_time': gf_time.c:14: warning: passing arg 1 of `ctime' from incompatible pointer type gcc -g -O2 -D_REENTRANT -Wall -c host_serv.c gcc -g -O2 -D_REENTRANT -Wall -c isfdtype.c gcc -g -O2 -D_REENTRANT -Wall -c mcast_leave.c mcast_leave.c: In function `mcast_leave': mcast_leave.c:26: error: `IPV6_DROP_MEMBERSHIP' undeclared (first use in this function) mcast_leave.c:26: error: (Each undeclared identifier is reported only once mcast_leave.c:26: error: for each function it appears in.) *** Error code 1 -bash-2.05b$ cd libgai/ -bash-2.05b$ make gcc -g -O2 -D_REENTRANT -Wall -c getaddrinfo.c getaddrinfo.c: In function `getaddrinfo': getaddrinfo.c:58: error: `EAI_ADDRFAMILY' undeclared (first use in this function) getaddrinfo.c:58: error: (Each undeclared identifier is reported only once getaddrinfo.c:58: error: for each function it appears in.) getaddrinfo.c:116: error: `EAI_NODATA' undeclared (first use in this function) *** Error code 1 -bash-2.05b$ cd libxti/ -bash-2.05b$ make gcc -g -O2 -D_REENTRANT -Wall -c wrapxti.c In file included from wrapxti.c:5: unpxti.h:7:17: xti.h: No such file or directory unpxti.h:22:21: stropts.h: No such file or directory In file included from wrapxti.c:5: unpxti.h:93: warning: "struct strbuf" declared inside parameter list unpxti.h:93: warning: its scope is only this definition or declaration, which is probably not what you want unpxti.h:94: warning: "struct strbuf" declared inside parameter list unpxti.h:102: warning: "struct t_call" declared inside parameter list unpxti.h:103: warning: "struct t_bind" declared inside parameter list unpxti.h:105: warning: "struct t_call" declared inside parameter list unpxti.h:107: warning: "struct t_bind" declared inside parameter list unpxti.h:109: warning: "struct t_call" declared inside parameter list unpxti.h:111: warning: "struct t_info" declared inside parameter list unpxti.h:112: warning: "struct t_optmgmt" declared inside parameter list unpxti.h:114: warning: "struct t_discon" declared inside parameter list unpxti.h:116: warning: "struct t_unitdata" declared inside parameter list unpxti.h:117: warning: "struct t_uderr" declared inside parameter list unpxti.h:120: warning: "struct t_unitdata" declared inside parameter list unpxti.h:122: warning: "struct netbuf" declared inside parameter list unpxti.h:126: warning: "struct netbuf" declared inside parameter list unpxti.h:127: warning: "struct netbuf" declared inside parameter list unpxti.h:131: warning: "struct netbuf" declared inside parameter list unpxti.h:135: warning: "struct netbuf" declared inside parameter list unpxti.h:136: warning: "struct netbuf" declared inside parameter list unpxti.h:140: warning: "struct t_opthdr" declared inside parameter list unpxti.h:141: warning: "struct t_opthdr" declared inside parameter list unpxti.h:142: warning: "struct t_opthdr" declared inside parameter list unpxti.h:143: warning: "struct t_opthdr" declared inside parameter list unpxti.h:146: warning: "struct t_opthdr" declared inside parameter list unpxti.h:147: warning: "struct t_opthdr" declared inside parameter list unpxti.h:148: warning: "struct t_opthdr" declared inside parameter list unpxti.h:149: warning: "struct t_opthdr" declared inside parameter list wrapxti.c: In function `err_xti_doit': wrapxti.c:55: warning: implicit declaration of function `t_strerror' wrapxti.c:55: error: `t_errno' undeclared (first use in this function) wrapxti.c:55: error: (Each undeclared identifier is reported only once wrapxti.c:55: error: for each function it appears in.) wrapxti.c:55: warning: format argument is not a pointer (arg 4) wrapxti.c:55: warning: format argument is not a pointer (arg 4) wrapxti.c:57: error: `TSYSERR' undeclared (first use in this function) wrapxti.c: At top level: wrapxti.c:73: warning: "struct strbuf" declared inside parameter list wrapxti.c:74: error: conflicting types for 'Getmsg' unpxti.h:93: error: previous declaration of 'Getmsg' was here wrapxti.c:74: error: conflicting types for 'Getmsg' unpxti.h:93: error: previous declaration of 'Getmsg' was here wrapxti.c: In function `Getmsg': wrapxti.c:77: warning: implicit declaration of function `getmsg' wrapxti.c: At top level: wrapxti.c:83: warning: "struct strbuf" declared inside parameter list wrapxti.c:84: error: conflicting types for 'Putmsg' unpxti.h:94: error: previous declaration of 'Putmsg' was here wrapxti.c:84: error: conflicting types for 'Putmsg' unpxti.h:94: error: previous declaration of 'Putmsg' was here wrapxti.c: In function `Putmsg': wrapxti.c:85: warning: implicit declaration of function `putmsg' wrapxti.c: At top level: wrapxti.c:114: warning: "struct t_call" declared inside parameter list wrapxti.c:115: error: conflicting types for 'T_accept' unpxti.h:102: error: previous declaration of 'T_accept' was here wrapxti.c:115: error: conflicting types for 'T_accept' unpxti.h:102: error: previous declaration of 'T_accept' was here wrapxti.c: In function `T_accept': wrapxti.c:118: warning: implicit declaration of function `t_accept' wrapxti.c: In function `T_alloc': wrapxti.c:129: warning: implicit declaration of function `t_alloc' wrapxti.c:129: warning: assignment makes pointer from integer without a cast wrapxti.c: At top level: wrapxti.c:135: warning: "struct t_bind" declared inside parameter list wrapxti.c:136: error: conflicting types for 'T_bind' unpxti.h:103: error: previous declaration of 'T_bind' was here wrapxti.c:136: error: conflicting types for 'T_bind' unpxti.h:103: error: previous declaration of 'T_bind' was here wrapxti.c: In function `T_bind': wrapxti.c:137: warning: implicit declaration of function `t_bind' wrapxti.c: In function `T_close': wrapxti.c:144: warning: implicit declaration of function `t_close' wrapxti.c: At top level: wrapxti.c:149: warning: "struct t_call" declared inside parameter list wrapxti.c:150: error: conflicting types for 'T_connect' unpxti.h:105: error: previous declaration of 'T_connect' was here wrapxti.c:150: error: conflicting types for 'T_connect' unpxti.h:105: error: previous declaration of 'T_connect' was here wrapxti.c: In function `T_connect': wrapxti.c:151: warning: implicit declaration of function `t_connect' wrapxti.c: In function `T_free': wrapxti.c:158: warning: implicit declaration of function `t_free' wrapxti.c: At top level: wrapxti.c:163: warning: "struct t_bind" declared inside parameter list wrapxti.c:164: error: conflicting types for 'T_getprotaddr' unpxti.h:107: error: previous declaration of 'T_getprotaddr' was here wrapxti.c:164: error: conflicting types for 'T_getprotaddr' unpxti.h:107: error: previous declaration of 'T_getprotaddr' was here wrapxti.c: In function `T_getprotaddr': wrapxti.c:165: warning: implicit declaration of function `t_getprotaddr' wrapxti.c: In function `T_getstate': wrapxti.c:174: warning: implicit declaration of function `t_getstate' wrapxti.c: At top level: wrapxti.c:181: warning: "struct t_call" declared inside parameter list wrapxti.c:182: error: conflicting types for 'T_listen' unpxti.h:109: error: previous declaration of 'T_listen' was here wrapxti.c:182: error: conflicting types for 'T_listen' unpxti.h:109: error: previous declaration of 'T_listen' was here wrapxti.c: In function `T_listen': wrapxti.c:183: warning: implicit declaration of function `t_listen' wrapxti.c: In function `T_look': wrapxti.c:192: warning: implicit declaration of function `t_look' wrapxti.c: At top level: wrapxti.c:199: warning: "struct t_info" declared inside parameter list wrapxti.c:200: error: conflicting types for 'T_open' unpxti.h:111: error: previous declaration of 'T_open' was here wrapxti.c:200: error: conflicting types for 'T_open' unpxti.h:111: error: previous declaration of 'T_open' was here wrapxti.c: In function `T_open': wrapxti.c:203: warning: implicit declaration of function `t_open' wrapxti.c: At top level: wrapxti.c:210: warning: "struct t_optmgmt" declared inside parameter list wrapxti.c:211: error: conflicting types for 'T_optmgmt' unpxti.h:112: error: previous declaration of 'T_optmgmt' was here wrapxti.c:211: error: conflicting types for 'T_optmgmt' unpxti.h:112: error: previous declaration of 'T_optmgmt' was here wrapxti.c: In function `T_optmgmt': wrapxti.c:212: warning: implicit declaration of function `t_optmgmt' wrapxti.c: In function `T_rcv': wrapxti.c:221: warning: implicit declaration of function `t_rcv' wrapxti.c: At top level: wrapxti.c:228: warning: "struct t_discon" declared inside parameter list wrapxti.c:229: error: conflicting types for 'T_rcvdis' unpxti.h:114: error: previous declaration of 'T_rcvdis' was here wrapxti.c:229: error: conflicting types for 'T_rcvdis' unpxti.h:114: error: previous declaration of 'T_rcvdis' was here wrapxti.c: In function `T_rcvdis': wrapxti.c:230: warning: implicit declaration of function `t_rcvdis' wrapxti.c: In function `T_rcvrel': wrapxti.c:237: warning: implicit declaration of function `t_rcvrel' wrapxti.c: At top level: wrapxti.c:242: warning: "struct t_unitdata" declared inside parameter list wrapxti.c:243: error: conflicting types for 'T_rcvudata' unpxti.h:116: error: previous declaration of 'T_rcvudata' was here wrapxti.c:243: error: conflicting types for 'T_rcvudata' unpxti.h:116: error: previous declaration of 'T_rcvudata' was here wrapxti.c: In function `T_rcvudata': wrapxti.c:244: warning: implicit declaration of function `t_rcvudata' wrapxti.c: At top level: wrapxti.c:249: warning: "struct t_uderr" declared inside parameter list wrapxti.c:250: error: conflicting types for 'T_rcvuderr' unpxti.h:117: error: previous declaration of 'T_rcvuderr' was here wrapxti.c:250: error: conflicting types for 'T_rcvuderr' unpxti.h:117: error: previous declaration of 'T_rcvuderr' was here wrapxti.c: In function `T_rcvuderr': wrapxti.c:251: warning: implicit declaration of function `t_rcvuderr' wrapxti.c: In function `T_snd': wrapxti.c:260: warning: implicit declaration of function `t_snd' wrapxti.c: In function `T_sndrel': wrapxti.c:267: warning: implicit declaration of function `t_sndrel' wrapxti.c: At top level: wrapxti.c:272: warning: "struct t_unitdata" declared inside parameter list wrapxti.c:273: error: conflicting types for 'T_sndudata' unpxti.h:120: error: previous declaration of 'T_sndudata' was here wrapxti.c:273: error: conflicting types for 'T_sndudata' unpxti.h:120: error: previous declaration of 'T_sndudata' was here wrapxti.c: In function `T_sndudata': wrapxti.c:274: warning: implicit declaration of function `t_sndudata' wrapxti.c: At top level: wrapxti.c:280: warning: "struct netbuf" declared inside parameter list wrapxti.c: In function `Taddr2uaddr': wrapxti.c:284: warning: implicit declaration of function `taddr2uaddr' wrapxti.c:284: warning: assignment makes pointer from integer without a cast wrapxti.c: At top level: wrapxti.c:310: warning: "struct netbuf" declared inside parameter list wrapxti.c:311: error: conflicting types for 'Xti_ntop' unpxti.h:135: error: previous declaration of 'Xti_ntop' was here wrapxti.c:311: error: conflicting types for 'Xti_ntop' unpxti.h:135: error: previous declaration of 'Xti_ntop' was here wrapxti.c: In function `Xti_ntop': wrapxti.c:314: warning: passing arg 1 of `xti_ntop' from incompatible pointer type wrapxti.c: At top level: wrapxti.c:320: warning: "struct netbuf" declared inside parameter list wrapxti.c:321: error: conflicting types for 'Xti_ntop_host' unpxti.h:136: error: previous declaration of 'Xti_ntop_host' was here wrapxti.c:321: error: conflicting types for 'Xti_ntop_host' unpxti.h:136: error: previous declaration of 'Xti_ntop_host' was here wrapxti.c: In function `Xti_ntop_host': wrapxti.c:324: warning: passing arg 1 of `xti_ntop_host' from incompatible pointer type *** Error code 1 -bash-2.05b$ cd intro -bash-2.05b$ make gcc -g -O2 -D_REENTRANT -Wall -c daytimetcpcli.c gcc -g -O2 -D_REENTRANT -Wall -o daytimetcpcli daytimetcpcli.o ../libunp.a -lpthread daytimetcpcli.o(.text+0x24): In function `main': /home/alpha/UNP/unpv12e/intro/daytimetcpcli.c:11: undefined reference to `err_quit' daytimetcpcli.o(.text+0xde):/home/alpha/UNP/unpv12e/intro/daytimetcpcli.c:28: undefined reference to `err_sys' daytimetcpcli.o(.text+0x10e):/home/alpha/UNP/unpv12e/intro/daytimetcpcli.c:31: undefined reference to `err_sys' daytimetcpcli.o(.text+0x120):/home/alpha/UNP/unpv12e/intro/daytimetcpcli.c:14: undefined reference to `err_sys' daytimetcpcli.o(.text+0x138):/home/alpha/UNP/unpv12e/intro/daytimetcpcli.c:20: undefined reference to `err_quit' daytimetcpcli.o(.text+0x15d):/home/alpha/UNP/unpv12e/intro/daytimetcpcli.c:23: undefined reference to `err_sys' *** Error code 1일단 첫번째 lib 에 관한것은 다음을 참조하십시오.http://
일단 첫번째 lib 에 관한것은 다음을 참조하십시오.
http://www.kr.freebsd.org/ml/questions/2001/01/msg00082.shtml
삽질의 대마왕...
컴파일이 되네요
위 링크에서 설명한 것처럼
/usr/prots/distfiles 에
make-3.80.tar.bz2
unpv12e.tar.gz
unpv22e.tar.gz
집어 넣고
/usr/prots/net/libunp
/usr/prots/net/libunpipc
에서 make 한방 때려주니까 다 잘돌아가네요.
전에 웹 뒤적거리면서 프비사이트에서도 찾아 봤지만 못 찾겠던에 ...
검색능력이 대단하시네요.
litdream의 노고에 감사드립니다. ^^
댓글 달기