2

Fedora 23で次のオプションを使用してvimを構築しようとしています

+python +python3 +perl +lua +ruby +gui +conceal +guiいくつかのプラグインが必要です。

それらすべてが組み込まれたバージョンを見つけることができませんでした(だから私は自分でやります)

旅はヴァロリックを追うことから始まった

sudo yum install -y ruby ruby-devel lua lua-devel luajit \
    luajit-devel ctags git python python-devel \
    python3 python3-devel tcl-devel \
    perl perl-devel perl-ExtUtils-ParseXS \
    perl-ExtUtils-XSpp perl-ExtUtils-CBuilder \
    perl-ExtUtils-Embed

私も持っていますncurses(生、開発、静的、...)

それで

$ cd $HOME/Sources
$ git clone https://github.com/vim/vim.git
$ cd vim
$ ./configure --with-tlib=ncurses \
              --with-features=huge \
              --enable-fail-if-missing \
              --enable-luainterp=yes \
              --enable-mzschemeinterp \
              --enable-perlinterp \
              --enable-pythoninterp=yes \
              --with-python-config-dir=/usr/lib64/python2.7/config \
              --enable-python3interp=yes \
              --enable-tclinterp=yes \
              --enable-rubyinterp=yes \
              --enable-cscope \
              --enable-multibyte \
              --enable-gui=auto \
              --prefix=$HOME/Build/vim \
              --with-compiledby=statquant | tee configure.log

以下が画面に出力されます。

/home/statquant/Sources/vim/src/config-PyMake3137:1478: warning: overriding recipe for target 'Modules/_math.o'
/home/statquant/Sources/vim/src/config-PyMake3137:1475: warning: ignoring old recipe for target 'Modules/_math.o'
/home/statquant/Sources/vim/src/config-PyMake3137:1517: warning: overriding recipe for target 'Modules/timemodule.o'
/home/statquant/Sources/vim/src/config-PyMake3137:1482: warning: ignoring old recipe for target 'Modules/timemodule.o'
configure: error: NOT FOUND!
      You need to install a terminal library; for example ncurses.
      Or specify the name of the library with --with-tlib.

その後私は

make | tee make.log

$HOME/Sources/vim/src代わりに実際にvimが組み込まれていることに気付きました$HOME/Build/vim(おそらくそれを期待するのは間違っていました)

私が実行する:version./vim -g(vimはGUIサポート付きでビルドされました)、 NO python NO python3 .... ここに画像の説明を入力

configure.logあります_ _make.log

EDIT1 : 以下の作品、今は見逃すだけ+perl +ruby

./configure --with-features=huge \
       --enable-tclinterp=yes \
       --enable-luainterp=yes \
       --enable-pythoninterp=yes \
       --enable-python3interp=yes \
       --with-compiledby=statquant \
       --prefix=$HOME/Build/vim \

make install # and yes it installs in $HOME/Build/vim  

ここに画像の説明を入力

EDIT2 追加しようとするとどうなり

  1. +パール

走れる

./configure --with-features=huge \
            --enable-tclinterp=yes \
            --enable-luainterp=yes \
            --enable-pythoninterp=yes \
            --enable-python3interp=yes \
            --enable-perlinterp=yes \
            --prefix=$HOME/Build/vim \
            --with-compiledby=statquant | tee configure.log

動作しているようです(エラーなし):configure.log

make | tee make.log
[...]
cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security]
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined
<command-line>:0:0: note: this is the location of the previous definition
cc1: some warnings being treated as errors
make[1]: *** [objects/option.o] Error 1
Makefile:2907: recipe for target 'objects/option.o' failed
make[1]: Leaving directory '/home/statquant/Sources/vim/src'
make: *** [first] Error 2
Makefile:26: recipe for target 'first' failed

vim組み込みはありません/home/statquant/Sources/vim/srcmake.log

  1. +ルビー

    ./configure --with-features=huge \ --enable-tclinterp=yes \ --enable-luainterp=yes \ --enable-pythoninterp=yes \ --enable-python3interp=yes \ --enable-rubyinterp=yes \ --prefix=$HOME/Build/vim \ --with-compiledby=statquant | ティーconfigure.log

実行すらしないconfigure

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.

ログは次のとおりです。configure.log

4

5 に答える 5

0

これに関する Vim の問題が提出されました: https://github.com/vim/vim/issues/1081

その問題へのコメントで言及した回避策を使用しています: https://github.com/vim/vim/issues/1081#issuecomment-269920486

役に立つかもしれない場合に備えて、そのコメントのほとんどを以下にコピーしました。

Fedora 25 (x86_64) でこの問題に遭遇しました。Vim の構成スクリプトは、CFLAGS に関する対応するクエリなしで LDFLAGS について Ruby に問い合わせます: https://github.com/vim/vim/blob/v8.0.0134/src/auto/configure#L7174

rubyldflags=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LDFLAGS']"`

Fedora 23 以降、すべての RPM はデフォルトで「強化」されています: https://fedoraproject.org/wiki/Changes/Harden_All_Packages

RPM がビルドされると、RPM SPEC ファイルで使用される %configure マクロが自動的に調整され、強化された設定を使用して CFLAGS、LDFLAGS、およびその他のいくつかの環境変数が提供されます。Fedora の ruby​​ パッケージを使用している場合、rbconfig を使用した上記のクエリは強化されたリンカー フラグを返します。Vim の configure スクリプトは対応する rbconfig を使用して ruby​​ の CFLAGS を照会しないため、コンパイル フラグとリンク フラグが一致せず、次のエラーが発生します。

configure: error: NOT FOUND!
      You need to install a terminal library; for example ncurses.
      Or specify the name of the library with --with-tlib.

src/auto/config.log では、このフラグの不一致により、次のエラーが発生します。

configure:11318: checking for tgetent in -lncurses
configure:11343: gcc -o conftest -g -O2  -L. -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--enable-new-dtags -Wl,-z,relro    -L/usr/local/lib conftest.c -lncurses   -lselinux  >&5
/usr/bin/ld: /tmp/cckpDslF.o: relocation R_X86_64_PC32 against undefined symbol `tgetent' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

回避策を使ってビルドを成功させることはできますが、configure スクリプトの適切な修正を提案できるほど autoconf についてよく知りません。回避策として、最初にいくつかの RPM 関連パッケージをインストールする必要があります。

sudo dnf install -y rpm-build redhat-rpm-config

次に、これらの変数をシェル プロンプトで次のように設定します。

eval $(rpmbuild --eval '%{configure}' | egrep '^\s*[A-Z]+=')

上記は rpmbuild --eval '%{configure}' を使用して、多くの環境変数の割り当てで始まる %configure マクロの定義を照会します。これにより、%configure マクロで提供されるのと同じデフォルトのコンパイル環境が提供されます。以下の呼び出しを実行すると成功します。

./configure --quiet --with-features=huge --enable-rubyinterp
于 2017-01-07T17:00:06.963 に答える
0

を有効にしまし-Werror=format-securityた。これは、format ofprintfまたはscanf現在 `error.

で使用法を修正できif_perl.cます。これは生成されたファイルだと思います。またはフラグを削除します-Werror=format-security

于 2016-01-24T11:49:32.683 に答える