YAPC::NA VIM as a Perl IDE‎ – Damian Conway (2016)

Watch it. You will be impressed

Video by YAPC::NA 2016

Share Button

FW: Quick and Dirty : Vimdiff Tutorial

From  :

I recently started using exclusively Vim (and gVim) for my coding needs. Vimdiff is a tool that comes bundled with Vim and its a wonderful tool for comparing code and merging changes. If you’d prefer to use a non-Vim based diff tool, checkout visual diff tools in linux for more variety.  read morevimdiff

Using VIM, even on Microsoft Windows, for comparing two text files is very very simple and easy to do.  Definitely go check out Amjith’s post for the keyboard short cuts!

Share Button

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