view runtime/doc/os_unix.txt @ 33060:897f3ed27be2 v9.0.1818

patch 9.0.1818: dynamically linking perl is broken Commit: https://github.com/vim/vim/commit/55460da26c2756ec057c03c7d8641eda861bfcd2 Author: Christian Brabandt <cb@256bit.org> Date: Tue Aug 29 21:31:28 2023 +0200 patch 9.0.1818: dynamically linking perl is broken Problem: dynamically linking perl is broken Solution: Fix all issues This is a combination of several commits: 1) Fix if_perl.xs not being able to build on all versions of Perl (5.30) This fixes the dynamic builds of Perl interface. The Perl interface file previously had to manually copy and paste misc inline functions verbatim from the Perl headers, because we defined `PERL_NO_INLINE_FUNCTIONS` which prevents us form getting some function definitions. The original reason we defined it was because those inline functions would reference Perl functions that would cause linkage errors. This is a little fragile as every time a new version of Perl comes out, we inevitably have to copy over new versions of inline functions to our file, and it's also easy to miss updates to existing functions. Instead, remove the `PERL_NO_INLINE_FUNCTIONS` define, remove the manual copy-pasted inline functions. Simply add stub implementations of the missing linked functions like `Perl_sv_free2` and forward them to the DLL version of the function at runtime. There are only a few functions that need this treatment, and it's a simple stub so there is very low upkeep compared to copying whole implementations to the file. Also, fix the configure script so that if we are using dynamic linkage, we don't pass `-lperl` to the build flags, to avoid accidental external linkage while using dynamic builds. This is similar to how Python integration works. 2) Fix GIMME_V deprecation warnings in Perl 5.38 Just use GIMME_V, and only use GIMME when using 5.30 to avoid needing to link Perl_block_gimme. We could provide a stub like the other linked functions like Perl_sv_free2, but simply using GIMME is the simplest and it has always worked before. 3) Fix Perl 5.38 issues Fix two issues: 3.1. Perl 5.38 links against more functions in their inline headers, so we need to stub them too. 3.2. Perl 5.38 made Perl_get_context an inline function, but *only* for non-Windows build. Fix that. Note that this was happening in Vim currently, as it would build, but fail to run Perl code at runtime. 4) Fix Perl 5.36/5.38 when thread local is used Perl 5.36 introduced using `_Thread_local` for the current context, which causes inline functions to fail. Create a stub `PL_current_context` thread local variable to satisfy the linker for inlined functions. Note that this is going to result in a different `PL_current_context` being used than the one used in the library, but so far from testing it seems to work. 5) Add docs for how to build Perl for dynamic linking to work closes: #12827 closes: #12914 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
author Christian Brabandt <cb@256bit.org>
date Tue, 29 Aug 2023 22:15:03 +0200
parents 15c80d8bc515
children 4635e43f2c6f
line wrap: on
line source

*os_unix.txt*   For Vim version 9.0.  Last change: 2022 Nov 25


		  VIM REFERENCE MANUAL    by Bram Moolenaar


							*unix* *Unix*
This file contains the particularities for the Unix version of Vim.

For compiling Vim on Unix see "INSTALL" and "Makefile" in the src directory.

The default help file name is "/usr/local/lib/vim/help.txt"
The files "$HOME/.vimrc" and "$HOME/.exrc" are used instead of "s:.vimrc" and
"s:.exrc".  Additionally "/usr/local/etc/vimrc" is used first.
If "/usr/local/share" exists it is used instead of "/usr/local/lib".

Temporary files (for filtering) are put in "/tmp".  If you want to place them
somewhere else, set the environment variable $TMPDIR to the directory you
prefer.

With wildcard expansion you can use '~' (home directory) and '$'
(environment variable).

							*fork* *spoon*
For executing external commands fork()/exec() is used when possible, otherwise
system() is used, which is a bit slower.  The output of ":version" includes
|+fork| when fork()/exec() is used, |+system()| when system() is used.  This
can be changed at compile time.
(For forking of the GUI version see |gui-fork|.)

For historic reasons terminal updating under Unix is expected to be slow (e.g.
serial line terminal, shell window in suntools), the 'showcmd' and 'ruler'
options are off by default.  If you have a fast terminal, try setting them
on: >
	set showcmd ruler

When using Vim in an xterm the mouse clicks can be used by Vim by setting
'mouse' to "a".  If there is access to an X-server gui style copy/paste will
be used and visual feedback will be provided while dragging with the mouse.
If you then still want the xterm copy/paste with the mouse, press the shift
key when using the mouse.  See |mouse-using|.  Visual feedback while dragging
can also be achieved via the 'ttymouse' option if your xterm is new enough.

							*terminal-colors*
To use colors in Vim you can use the following example (if your terminal
supports colors, but "T_Co" is empty or zero): >
   :set t_me=^[[0;1;36m     " normal mode (undoes t_mr and t_md)
   :set t_mr=^[[0;1;33;44m  " reverse (invert) mode
   :set t_md=^[[1;33;41m    " bold mode
   :set t_se=^[[1;36;40m    " standout end
   :set t_so=^[[1;32;45m    " standout mode
   :set t_ue=^[[0;1;36m     " underline end
   :set t_us=^[[1;32m       " underline mode start
[the ^[ is an <Esc>, type CTRL-V <Esc> to enter it]

For real color terminals the ":highlight" command can be used.

The file "tools/vim132" is a shell script that can be used to put Vim in 132
column mode on a vt100 and lookalikes.

 vim:tw=78:ts=8:noet:ft=help:norl: