Alex Kernel Unix guy

Uzitocne veci okolo AIXu atd.

26.01.2009

AIX 6.1 and Net-SNMP 5.4.2.1 compilation workaround

During my trials to compile Net-SNMP 5.4.2.1 for AIX 6.1 a came across an make error that i resolved by small workaround. I was getting this error:

 gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib -g -O2 -Uaix6 -Daix6=aix6 -c mibII/ip.c  -DPIC -o mibII/.libs/ip.o
In file included from /usr/include/sys/corral.h:25,
                 from /usr/include/libperfstat.h:28,
                 from mibII/ip.c:37:
/usr/include/netinet/in6_var.h:65: error: array type has incomplete element type
make: 1254-004 The error code from the last command is 1.

Stop.
make: 1254-004 The error code from the last command is 2.

Stop.
make: 1254-004 The error code from the last command is 2.

Stop.

I compared the mentioned in6_var.h and in_var.h files in /usr/include/netinet and this first one had different declaration of some struct. I'm no programmer but i found on google, that it must be called as a pointer and not as a static variable so i changed the definition from this:

extern  CONST struct protosw inet6sw[];

to this:

extern  CONST struct protosw *inet6sw[];

Now it works but we don't use any network statistics monitoring on AIX servers so i don't know if all will work as it should. The compilation however was successful. If anyone came across this problem and found proper solution, please leave your comments, it will be highly appreciated, thank you.

linkuj.cz vybrali.sme.sk

alexkernel, 26.01.2009, 14:13:35, trvalý odkaz,

Komentáře (0)

Tip:
Číslo ve hranatých závorkách vytvoří odkaz na jiný komentář
Přidání komentáře
bloguje.cz
Získejte Firefox!
Úvodní stránka
Reklama