在AIX上编译VIM的一个问题
Oct 11, 2014有一个项目需要使用AIX的机器 自然要装一些常用的东西
在 AIX 6.1 上自己编译 VIM 7.4 时 报了这么个错
In file included from os_unix.h:56, from vim.h:265, from gui_motif.c:36: /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/unistd.h:178: error: conflicting types for `lseek64' /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/unistd.h:176: error: previous declaration of `lseek64' In file included from /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/unistd.h:739, from os_unix.h:56, from vim.h:265, from gui_motif.c:36: /usr/include/sys/lockf.h:64: error: conflicting types for `lockf64' /usr/include/sys/lockf.h:62: error: previous declaration of `lockf64' In file included from os_unix.h:56, from vim.h:265, from gui_motif.c:36: /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/unistd.h:802: error: conflicting types for `ftruncate64' /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/unistd.h:800: error: previous declaration of `ftruncate64' /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/unistd.h:838: error: conflicting types for `truncate64' /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/unistd.h:836: error: previous declaration of `truncate64' /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/unistd.h:855: error: conflicting types for `pread64' /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/unistd.h:852: error: previous declaration of `pread64' /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/unistd.h:856: error: conflicting types for `pwrite64' /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/unistd.h:853: error: previous declaration of `pwrite64' /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/unistd.h:923: error: conflicting types for `fclear64' /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/unistd.h:920: error: previous declaration of `fclear64' /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/unistd.h:924: error: conflicting types for `fsync_range64' /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/unistd.h:921: error: previous declaration of `fsync_range64' In file included from vim.h:302, from gui_motif.c:36: auto/osdef.h:120: error: conflicting types for `lseek64' /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/unistd.h:178: error: previous declaration of `lseek64' make: The error code from the last command is 1. Stop. make: The error code from the last command is 2.
查了半天 这是因为AIX6的一个变化引起的
Since AIX 6.1, mkdtemp() is declared upon _XOPEN_SOURCE >= 700, and
thus the symbol is available in libc.
The difference is: Upon _ALL_SOURCE (defined in config.h),
AIX 6.1 defines (overrides!) _XOPEN_SOURCE=600, while
AIX 7.1 defines (overrides!) _XOPEN_SOURCE=700,
This particularly isn’t a problem on AIX 7.1, but still the check for mkdtemp()
should be extended to if the declaration is available too.
不管那么多啦 看了一下是编译可视化模块时出的问题
反正在AIX上一般只是用终端登录嘛 GUI根本用不掉的
编译的时候禁掉就轻松通过了
./configure --prefix=/somewhere --without-x --without-gnome --disable-gnome-check --disable-motif-check --disable-athena-check --disable-gui