Home » OS » AIX » Howto: Compile VIM 7.3 on AIX 6.x (error: conflicting types for `lseek64′)

Howto: Compile VIM 7.3 on AIX 6.x (error: conflicting types for `lseek64′)

If you’ve tried building VIM on AIX 6.x, you’ve probably run into:

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.

The problem is really an AIX specific change (see http://sourceware.org/bugzilla/show_bug.cgi?id=13558):

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.

For the case of VIM, the problem is triggered only when building with Motif support. Since most AIX users are on a server and not a desktop environment, let’s build without it and any other GUI support:

./configure --prefix=/somewhere --without-x --without-gnome --disable-gnome-check --disable-motif-check --disable-athena-check --disable-gui

It should now build and run 🙂

Share Button

Comments

  1. The problem is with any VIM 7.x version up to 7.3 so far.

Leave a Reply

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

*
*

Facebook login by WP-FB-AutoConnect