vim 7.3 on aix 6.1

16 Aug    porn for geeks

Seems when you do an upgrade of to AIX 1.6 and you don’t upgrade your gcc and you don’t have root on that box to do that said upgrade, you will end up getting weird errors with vim .. like:

0|selven@abox ~ $ /home/selven/usr/src/vim64/src/vim
exec(): 0509-036 Cannot load program /home/selven/bin/vim because of the following errors:
0509-150 Dependent module libXt.a(shr4.o) could not be loaded.
0509-022 Cannot load module libXt.a(shr4.o).
0509-026 System error: A file or directory in the path name does not exist.

So you would want to recompile vim, but….

0|selven@abox src $ make && make install
mkdir objects
CC="gcc -Iproto -DHAVE_CONFIG_H " srcdir=. sh ./osdef.sh
gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -D_FORTIFY_SOURCE=1 -o objects/buffer.o buffer.c
gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -D_FORTIFY_SOURCE=1 -o objects/blowfish.o blowfish.c
gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -D_FORTIFY_SOURCE=1 -o objects/charset.o charset.c
gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -D_FORTIFY_SOURCE=1 -o objects/diff.o diff.c
gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -D_FORTIFY_SOURCE=1 -o objects/digraph.o digraph.c
gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -D_FORTIFY_SOURCE=1 -o objects/edit.o edit.c
gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -D_FORTIFY_SOURCE=1 -o objects/eval.o eval.c
eval.c: In function 'f_filereadable':
eval.c:10072: error: 'O_RDONLY' undeclared (first use in this function)
eval.c:10072: error: (Each undeclared identifier is reported only once
eval.c:10072: error: for each function it appears in.)
make: 1254-004 The error code from the last command is 1.

Stop.

2|selven@abox src $ uname -a
AIX xxxxxxxx 1 6 0123456789

seems gcc is guilty…

0|selven@abox brokngcc $ cat test.c
#include
#include

int main() {
printf(“bl9 bl9 bl9\n”);
return 0;
}
0|selven@abox brokngcc $ gcc test.c -o test
In file included from test.c:2:
/usr/include/unistd.h:924: error: expected ‘)’ before ‘[‘ token
/usr/include/unistd.h:925: error: expected declaration specifiers or ‘…’ before ‘rid_t’

SOLUTION:

  • Either recompile gcc to add the proper and latest compatible version of gcc for AIX 6.1
  • Or do the following (using aix’s own compiler, xlc):


make distclean
export CC=xlc
./configure
make
make install

Ofcourse you would add whatever configure options you were supposed to add as you were supposed to add.

 

 

 

 

 

 

Cheers,
+selven

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.