I compile vim9 by my self, but [esc][?4m keeps showing up,why?how to fix this? - vim

my configure armument is
./configure --with-features=huge --enable-multibyte --enable-python3interp=dynamic --enable-cscope --enable-gui=auto --enable-gtk2-check --enable-fontset --enable-largefile --disable-netbeans --with-compiledby="xxx" --enable-fail-if-missing --prefix=/root/software
make
make install
when I edit a new buffer in vim, [esc][?4m appears, how do I fix this problem?
I recompile vim many times, it does't work, I want [esc][?4m don't show up again.

I just went into the exact same problem today. The fix is adding below lines in your .vimrc file:
set keyprotocol=
let &term=&term
For more information, you can refer to the issue reported in GitHub.

Related

Issue with make in Cygwin

I've been using cygwin to build gcc. However, after I try to configure gcc, in the way shown below:
$ C:/cygwin64/home/myusername/gcc-9.3.0/configure --program-suffix=-4.9.2 --enable-languages=c,c++ --disable-bootstrap --disable-shared
and then compile it like this:
$ make -j4
I have this error message:
make: *** No targets specified and no makefile found. Stop.
I don't have much experience with cygwin, so any help would be greatly appreciated!
If someone else has this problem lately.. My error was extracting the file with the name of the folder So obviously the path wasn't correct because now was duplicated, just remove that one, select "extract here"
and now use the command. Otherwise, modify the path, that should work, too

Compiling FFmpeg lib and add it to NDK sources on Windows8

I've seen some articles about how to compile and uses FFmpeg for Android.
These are 2 good examples - example1 and example2
Unfortunately, non off them, or others I found helped me. In those two examples a build_android.sh is created and configure the FFmpeg's configuraion file and call to make. Every time when I'm running the script I'm getting the following error:
c:\android\development\android-ndk-r9\sources\ffmpeg>sh build_android.sh
c:/android/development/android-ndk-r9/toolchains/arm-linux-androideabi-4.8/prebu
ilt/windows-x86_64/arm-linux-androideabi/bin/bin/arm-linux-androideabi-gcc is un
able to create an executable file.
C compiler test failed.
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user#ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
Makefile:2: config.mak: No such file or directory
Makefile:49: /common.mak: No such file or directory
Makefile:92: /libavutil/Makefile: No such file or directory
Makefile:92: /library.mak: No such file or directory
Makefile:169: /doc/Makefile: No such file or directory
Makefile:170: /tests/Makefile: No such file or directory
make: *** No rule to make target `/tests/Makefile'. Stop.
Makefile:2: config.mak: No such file or directory
If someone encountered and solved this issue it'll be much appreciated!
After trying the suggested script I ran into a new problem that I couldn't solved, this is the output of the script:
.... Enabled components list....
In the end of the list I got the following:
Enabled indevs:
dv1394 v4l2i
fbdev
Enabled outdevs:
fbdev v4l2
License: LGPL version 2.1 or later
Creating config.mak, config.h, and doc/config.texi...
WARNING: C:/android/development/android-ndk-r9/toolchains/arm-linux-androideabi-
4.8/prebuilt/windows-x86_64/bin/arm-linux-androideabi-pkg-config not found, libr
ary detection may fail.
make: *** No rule to make target libavfilter/libavfilter.so', needed by all-ye
s'. Stop.
make: *** No rule to make target install-libavfilter-shared', needed by instal
l-libs-yes'. Stop.
Can you paste what's in your build_android.sh file which you've copied inside the FFmpeg directory?
I've got the same error when one of the variables defined at the start of the script where set incorrectly. Check to see if your NDK or SYSROOT or TOOLCHAIN variables are set to a valid path!
I've tried using the following steps and it worked for me:
1) Download FFmpeg
git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
2) Create a file called build_android.sh inside the FFmpeg directory
cd ffmpeg; touch build_ffmpeg_for_android.sh;
3) Add the following content to the file
#!/usr/bin/env bash
NDK=$HOME/Software/Android/android-ndk-r10/
SYSROOT=$NDK/platforms/android-19/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64
function build_one
{
./configure \
--prefix=$PREFIX \
--enable-shared \
--disable-static \
--disable-doc \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-avdevice \
--disable-doc \
--disable-symver \
--cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
--target-os=linux \
--arch=arm \
--enable-cross-compile \
--sysroot=$SYSROOT \
--extra-cflags="-Os -fpic $ADDI_CFLAGS" \
--extra-ldflags="$ADDI_LDFLAGS" \
$ADDITIONAL_CONFIGURE_FLAG
make clean
make -j4
make install
}
CPU=arm
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm"
build_one
4) Make the script executable
chmod +x build_ffmpeg_for_android.sh
5) Start the build of FFmpeg for Android (ARM)
(run the script with Bash, i.e. /usr/bin/bash not /usr/bin/sh)
./build_ffmpeg_for_android.sh
I was getting the same errors as #powerX and I was able to solve the issue using a different method from #dZkF9RWJT6wN8ux.
Though I am using Ubuntu 13.10, I hope you find my answer helpful. With android NDK r9 and FFMPEG 2.2 "Muybridge" release, I was finally able to accomplish the third step entitled "Build FFMPEG" from #powerX example1 link: http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/
I finally fixed this by changing the SYSROOT variable in the build_android.sh file to point to ".../android-19/arch-arm" instead of .../android-9/arch-arm".
Hope this helps.

build vim with MinGW

I'm trying to build vim with MinGW by running ./configure && make in the vim repository root, but I'm getting the following error:
checking --with-tlib argument... empty: automatic terminal library selection
checking for tgetent in -ltinfo... no
checking for tgetent in -lncurses... no
checking for tgetent in -ltermlib... no
checking for tgetent in -ltermcap... no
checking for tgetent in -lcurses... no
no terminal library found
checking for tgetent()... configure: error: NOT FOUND!
You need to install a terminal library; for example ncurses.
Or specify the name of the library with --with-tlib.
C:\pdev\MinGW\bin\sed.exe: -e expression #1, char 1: unknown command: `C'
While researching this issue, I came across this post on the vim_use Google Groups,
which describes the exactly the same problem. It has one reply, suggesting searching for a MinGW curses package.
I found a repository of MinGW packages, but there's no ncurses there. Also, they're really old - the newest was
updated in 2003.
If I change to the src directory and run make from there, the build process
starts and completes witHout error. It produces a few executables (gvim.exe, vim.exe and a few more)
and dumps them in src, but does not create a proper distribution.
The targets for complete distributions are in the root Makefile, such as dosbin_gvim,
but I'm getting errors when trying to build this target:
$ make dosbin_gvim
rm -rf dist/gvim73.zip
rm -rf dist/vim
mkdir dist/vim
mkdir dist/vim/vim73
tar cf - \
README_bindos.txt uninstal.txt \
| (cd dist/vim/vim73; tar xf -)
find dist/vim/vim73 -type f -exec vim -e -X -u no_title.vim -c ":set tx|wq" {} \;
cp gvim.exe dist/vim/vim73/gvim.exe
cp: cannot stat `gvim.exe': No such file or directory
make: *** [dosbin_gvim] Error 1
Using the exe's that are built with the stuff in the runtime folder, I could
probably cobble up a distribution myself, but it would be hackish and fragile.
I would much rather know what is causing these errors, and how to fix them.
Building Vim on Windows is very frustrating. Do not use configure. You should use Make_ming.mak directly, for example:
make -f Make_ming.mak ARCH=x86-64 OPTIMIZE=MAXSPEED STATIC_STDCPLUS=yes FEATURES=HUGE GUI=yes OLE=yes NETBEANS=no PYTHON="D:/Applications/Python 2.7.3" PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON3="D:/Applications/Python 3.2.3" PYTHON3_VER=32 DYNAMIC_PYTHON3=yes gvim.exe
Most likely, you'll have to patch Make_ming.mak as it contains lots of subtle bugs. For instance, specifying "D:/Applications/Python 3.2.3" (as shown above) will not work without patching since Make_ming.mak expect you to specify paths without spaces. There are other annoying issues as well, but I don't want to go into details about them here.
If you are looking for fresh 64-bit builds of Vim for Windows, then I'd suggest you try my Vim for Windows compiled directly from Bram's source code, it includes support for both Python 2 and Python 3.
NOTE: I've built it using MinGW-w64.
Good luck.
I just compiled VIM on MinGW and made a gist about it. For configure to run through you will need
mingw-get install mingw32-libpdcurses
and then you can do
./configure --with-tlib=pdcurses
but to no avail, because make will not do its job.
The gist will lead you to a gvim74.exe, which you can use to install just like with the downloaded one.

Prerequisites for gcc-4.7.2: ppl-0.11 fails to find gmp-4.3.2

I'm trying to build prerequisites for gcc-4.7.2.
Both ppl-0.11 and gmp-4.3.2 are the recommended versions in <gcc_src>/gcc-4.7.2/gcc/doc/HTML/prerequisites.html
I have built and installed gmp-4.3.2 (with --enable-cxx set)
Attempting to configure ppl-0.11 fails.
configure: error: Cannot find GMP version 4.1.3 or higher.
GMP is the GNU Multi-Precision library:
see http://www.swox.com/gmp/ for more information.
When compiling the GMP library, do not forget to enable the C++ interface:
add --enable-cxx to the configuration options.
This is my configure line:
./configure \
--prefix=$PREFIX \
--with-gmp=$PREFIX \
--with-gmp-prefix=$PREFIX \
If I look in the directory where I specified with-gmp, here is the installed gmp:
$ grep MP_VERSION $PREFIX/include/gmp*
$PREFIX/include/gmp.h:#define __GNU_MP_VERSION 4
$PREFIX/include/gmp.h:#define __GNU_MP_VERSION_MINOR 3
$PREFIX/include/gmp.h:#define __GNU_MP_VERSION_PATCHLEVEL 2
.
$ l $PREFIX/include/gmp*
$PREFIX/include/gmp.h
$PREFIX/include/gmpxx.h
.
$ l /$PREFIX/lib/libgmp*
$PREFIX/lib/libgmp.a
$PREFIX/lib/libgmp.la
$PREFIX/lib/libgmp.so -> libgmp.so.3.5.2
$PREFIX/lib/libgmp.so.3 -> libgmp.so.3.5.2
$PREFIX/lib/libgmp.so.3.5.2
$PREFIX/lib/libgmpxx.a
$PREFIX/lib/libgmpxx.la
$PREFIX/lib/libgmpxx.so -> libgmpxx.so.4.1.2
$PREFIX/lib/libgmpxx.so.4 -> libgmpxx.so.4.1.2
$PREFIX/lib/libgmpxx.so.4.1.2
Am I missing something?
As far as I can tell, GMP is available and of the requisite version
Depending on what distro you are running, have you tried to install the gmp-devel package (i.e. yum install gmp-devel on Fedora/RedHat etc)?
PPL will by default try to use default locations for GMP. If you use crosstool-ng, you must do either a cross-native or canadian-cross build. If you are doing this manually, specify CXXFLAGS to PPL's ./configure, with a -I<path-to-gmp-header> and a -Wl,-L<path-to-gmp-libs>. This allows the PPL ./configure to find the correct version of GMP.
Apparently a PPL configure with,
--prefix=$PREFIX \
--with-gmp=$PREFIX \
--with-gmp-prefix=$PREFIX \
Is not enough. I sleuthed through the ./configure script and was hacking up crosstool-ng before I realized that I was no longer building a cross-compiler, but a canadian-cross when I wasn't using my distro gcc, but another host compiler with a lower glibc shared library. This is useful if you want your compiler to run on a larger class of machines. It is unlikely that the glibc version of the build compiler will effect much.
I still had to patch 120-ppl.sh in crosstool-ng,
do_ppl_for_build() {
...
ppl_cxxflags="${CT_CFLAGS_FOR_BUILD}"
+ ppl_cxxflags+=" -I${CT_BUILDTOOLS_PREFIX_DIR}/include "
+ ppl_cxxflags+=" -Wl,-L${CT_BUILDTOOLS_PREFIX_DIR}/lib "
if [ "${CT_PPL_NEEDS_FPERMISSIVE}" = "y" ]; then
ppl_cxxflags+=" -fpermissive"
fi
So I also faced the same issue and what I did was:
1) Went inside gmp-4.3.2 folder
2) make distclean
3) ./configure --prefix=/home/sen/Documents/mingw/downloads/gmp_build --enable-cxx
4) make && make install
5) Went inside ppl-0.11 folder
6) ./configure --prefix=/home/sen/Documents/mingw/downloads/ppl_build --with-gmp-prefix=/home/sen/Documents/mingw/downloads/gmp_build --enable-cxx
7) make & make install
Took some 10-20 mins to compile and things were fine.
Thanks,
Sen
After years, the issue has been run into. The solution is firstly to download last version of gmp. Then, copy the path as in like the picture. Don't forget to ./configure with --enable-cxx, which is really important point. ./configure --enable-cxx. Now time is to ppl installation, ./configure -help indicates that --with-gmp=DIR search for libgmp/libgmpxx in DIR/include and DIR/lib. So write ./configure --with-gmp=<<dir of gmp as shown in first picture, you may have a different path>>
I wrote, respectively, ./configure --with-gmp=/usr/local/include, make, sudo make install then it works like a charm!

Cannot link ncurses while compiling vim

I'm trying to compile vim 7.3 in home directory. As a terminal library, I installed ncurses in ~/lib/ncurses/ncurses-5.9 with --with-shared option.
After setting
set path = ( ~/lib/ncurses/ncurses-5.9/bin/ $path )
setenv LD_LIBRARY_PATH ~/lib/ncurses/ncurses-5.9/lib/:$LD_LIBRARY_PATH
I tried to configure vim with
./configure --enable-multibyte --prefix=/home/******/apps/vim/vim73
or
./configure --enable-multibyte --prefix=/home/******/apps/vim/vim73 --with-tlib=ncurses
however it failes while searching for ncurses. It seems -lncurses flag is unavailable, and ldconfig did not help.
I do not see what I did wrong... can anybody help me?
Install the ncurses-devel package
$ yum install ncurses-devel
Then try again:
$ ./configure <your options>
LD_LIBRARY_PATH is used at runtime not compile time to find the correct libraries. You need to set LDFLAGS or set a configure option to find the ncurses library:
env LDFLAGS=-L<PATH TO NCURSES LIB> ./configure ...
In the vim git directory, after reading from command line ./configure --help, what I did was:
./configure --with-local-dir=PATH
where PATH is the path to the ncurses directory (with all its libraries). Like in my case it was:
./configure --with-local-dir=/opt/ncurses
This seemed to give no error about not finding ncurses library. And the installation went properly.

Resources