arm 보드에 snmp를 올리고 있는데요..문제가 발생합니다.
ez-x5보드에(XScale PXA-255) snmp agent를 올리고자 합니다.
./configure --target=armv5l-linux --with-cc=armv5l-linux-gcc --with-ar=armv5l-linux-ar --prefix=/usr/local/armv5l-linux-snmp --with-endianness=big --enable-mini-agent 하고 올리면 성공합니다.
간단한 정보들과 내가 올린 private MIB에 대한 정보는 가지고 오는데 mini로 해서 그런지 정말 간단한 정보만받아 오더군요..
그래서 --enable-mini-agent를 빼고 다시 올려보았습니다.
./configure --target=armv5l-linux --with-cc=armv5l-linux-gcc --with-ar=armv5l-linux-ar --prefix=/usr/local/armv5l-linux-snmp --with-endianness=big
그런데 ./configure에서는 넘어가는데 make에서 에러가 납니다. 다음처럼(제화면에서 캡쳐한건 아니고 같은 현상의 에러가 발생합니다.)
-Imibgroup -c mibgroup/mibII/var_route.c -o
mibgroup/mibII/var_route.o
mibgroup/mibII/var_route.c: In function
`var_ipRouteEntry":
mibgroup/mibII/var_route.c:601: dereferencing pointer
to incomplete type
mibgroup/mibII/var_route.c:639: dereferencing pointer
to incomplete type
mibgroup/mibII/var_route.c:642: dereferencing pointer
to incomplete type
mibgroup/mibII/var_route.c:645: dereferencing pointer
to incomplete type
mibgroup/mibII/var_route.c:645: `RTF_GATEWAY"
undeclared (first use in this function)
mibgroup/mibII/var_route.c:645: (Each undeclared
identifier is reported only once
대충 이런 에러..항상 저 파일에서 걸립니다.
net-snmp.org에서 메일링 리스트를 확인해본 결과
2002년 정도까지는 arm 쪽은 ip routing 쪽 snmp를 지원하지 않는다고만 나왔는데..지금은 한층 업데이트 되었을텐데...해결 책이 없을까여?
arm 용 보드에 snmp 올려보신분 있으시면 답변 부탁드립니다..
옵션 --enable-mini-agent를 했을때는 됩니다. 보드에 올려서 테스트를 해봤구요.하지만 아주 간단한 것들만 되더군요..그 옵션을 빼고 하니까 저런 에러가 뜨구요...net-snmp-5.2.1에서도 마찬가지입니다.
--enable-mini-agent가 있으면 성공하고 그 옵션을 빼면
-I../../snmplib -g -O2 -Dlinux -c mibII/at.c -o mibII/at.o
In file included from /usr/local/arm/3.0/arm-linux/sys-include/net/route.h:27,
from mibII/at.c:85:
/usr/local/arm/3.0/arm-linux/sys-include/net/dst.h:30: parse error
before "atomic_t"
/usr/local/arm/3.0/arm-linux/sys-include/net/dst.h:67: parse error
before "}" token
/usr/local/arm/3.0/arm-linux/sys-include/net/dst.h:85: parse error
before "atomic_t"
/usr/local/arm/3.0/arm-linux/sys-include/net/dst.h:87: parse error
before "}" token
In file included from /usr/local/arm/3.0/arm-linux/sys-include/linux/sched.h:18,
from
/usr/local/arm/3.0/arm-linux/sys-include/net/inetpeer.h:14,
from /usr/local/arm/3.0/arm-linux/sys-include/net/route.h:28,
from mibII/at.c:85:
/usr/local/arm/3.0/arm-linux/sys-include/asm/semaphore.h:18: parse
error before "wait_queue_head_t"
/usr/local/arm/3.0/arm-linux/sys-include/asm/semaphore.h: In function
`sema_init":
/usr/local/arm/3.0/arm-linux/sys-include/asm/semaphore.h:47:
dereferencing pointer to incomplete type
/usr/local/arm/3.0/arm-linux/sys-include/asm/semaphore.h:48:
dereferencing pointer to incomplete type
/usr/local/arm/3.0/arm-linux/sys-include/asm/semaphore.h:49:
dereferencing pointer to incomplete type
In file included from /usr/local/arm/3.0/arm-linux/sys-include/linux/signal.h:4,
from /usr/local/arm/3.0/arm-linux/sys-include/linux/sched.h:26,
from
/usr/local/arm/3.0/arm-linux/sys-include/net/inetpeer.h:14,
from /usr/local/arm/3.0/arm-linux/sys-include/net/route.h:28,
from mibII/at.c:85:
/usr/local/arm/3.0/arm-linux/sys-include/asm/signal.h: At top level:
/usr/local/arm/3.0/arm-linux/sys-include/asm/signal.h:27: conflicting
types for `sigset_t"
/usr/local/arm/3.0/arm-linux/include/sys/select.h:38: previous
declaration of `sigset_t"
In file included from /usr/local/arm/3.0/arm-linux/sys-include/linux/sched.h:77,
from
/usr/local/arm/3.0/arm-linux/sys-include/net/inetpeer.h:14,
from /usr/local/arm/3.0/arm-linux/sys-include/net/route.h:28,
from mibII/at.c:85:
/usr/local/arm/3.0/arm-linux/sys-include/linux/time.h:9: redefinition
of `struct timespec"
/usr/local/arm/3.0/arm-linux/sys-include/linux/time.h:88: redefinition
of `struct timeval"
/usr/local/arm/3.0/arm-linux/sys-include/linux/time.h:93: redefinition
of `struct timezone"
/usr/local/arm/3.0/arm-linux/sys-include/linux/time.h:121:
redefinition of `struct itimerspec"
/usr/local/arm/3.0/arm-linux/sys-include/linux/time.h:126:
redefinition of `struct itimerval"
In file included from /usr/local/arm/3.0/arm-linux/sys-include/linux/sched.h:80,
from
/usr/local/arm/3.0/arm-linux/sys-include/net/inetpeer.h:14,
from /usr/local/arm/3.0/arm-linux/sys-include/net/route.h:28,
from mibII/at.c:85:
/usr/local/arm/3.0/arm-linux/sys-include/linux/timer.h:17: field
`list" has incomplete type
/usr/local/arm/3.0/arm-linux/sys-include/linux/timer.h:21: confused by
earlier errors, bailing out
make[2]: *** [mibII/at.lo] Erreur 1
make[2]: Leaving directory `/home/stage/dev/net-snmp-5.2.1/agent/mibgroup"
make[1]: *** [subdirs] Erreur 1
make[1]: Leaving directory `/home/stage/dev/net-snmp-5.2.1/agent"
make: *** [subdirs] Erreur 1
이런한 에러가 발생합니다...
아시는 분 부탁 드릴게요.
아직도 해결하시지 못하셨다면
아직 해결을 못하셨다면..
저도 이문제로 여기 저기 둘러보다 해결을 했습니다.
쉽게 보이진 않더군요 ㅜㅜ
결론은 Cross compiler의 해더 연결이 문제 입니다.
저의 경우는 아래와 같이 해결했습니다.
CFLAGS="-isystem /usr/local/arm-linux/include"
CPPFLAGS="-isystem /usr/local/arm-linux/include"
경로는 환경에 따라 틀리겠지만 대략 위와 비슷할겁니다.
수고 하세요.
댓글 달기