Hi Niels,

2016-3-20(Sun) 23:18:30 UTC+9 Niels Kobschätzki:
> Hi,
> 
> I am trying to compile vim on Fedora 23. Tbh I am not a developer and
> don't have a lot of knowledge about make-files etc but I want some
> features that the pre-compiled binaries for Fedora don't deliver.
> When I compile with --enable-perlinterp I get the following error:
> 
> gcc -c -I. -Iproto -DHAVE_CONFIG_H     -fPIC -U_FORTIFY_SOURCE
> -D_FORTIFY_SOURCE=1       -I/usr/include/luajit-2.0 -D_REENTRANT
> -D_GNU_SOURCE -O2 -g  -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
> -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4
> -grecord-gcc-switches -m64 -mtune=generic -fwrapv  -I/usr/local/include
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I/usr/lib64/perl5/CORE
> -I/usr/include/python2.7 -DPYTHON_HOME='"/usr"' -pthread
> -DDYNAMIC_PYTHON_DLL=\"libpython2.7.so.1.0\" -I/usr/include/python3.4m
> -DPYTHON3_HOME='L"/usr"' -pthread
> -DDYNAMIC_PYTHON3_DLL=\"libpython3.4m.so.1.0\" -I/usr/include
> -I/usr/include -DRUBY_VERSION=22 -I/usr/include  -D_REENTRANT=1
> -D_THREAD_SAFE=1  -D_LARGEFILE64_SOURCE=1  -o objects/option.o option.c
> 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
> Makefile:2877: recipe for target 'objects/option.o' failed
> make: *** [objects/option.o] Error 1
> 
> Compilation without --enable-perlinterp works
> 
> Any idea what the problem could be?
> 
> Oh, and while compiling (with or without --enable-perlinterp) each file
> throws this warning: /usr/include/features.h:328:4: warning: #warning
> _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
> #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
>     ^
> 
> I cannot see that configure throws any errors.

I can reproduced.
I think this might perl side of the problem.

$ perl -V | grep cppflags
    cppflags='-D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall 
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 
-mtune=generic -fwrapv -fno-strict-aliasing -I/usr/local/include'

If here there is a `-Werror=format-security`, it must also be `-Wformat`.
But it does not have the `-Wformat`.  So build error occurs with `--perlinterp`.

I thought the corresponding measures in Vim side.
Attached patch might fix this problem.

--
Best regards,
Hirohito Higashi (a.k.a. h_east)

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/auto/configure b/src/auto/configure
index a708230..8694503 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -5686,7 +5686,8 @@ $as_echo "OK" >&6; }
 
                   perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
 	      -e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//' \
-			-e 's/-fdebug-prefix-map[^ ]*//g'`
+			-e 's/-fdebug-prefix-map[^ ]*//g' \
+			-e 's/-Werror=format-security/-Wformat &/'`
             perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
 		sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
 			-e 's/-bE:perl.exp//' -e 's/-lc //'`
diff --git a/src/configure.in b/src/configure.in
index f29b62c..e61e46c 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -1000,7 +1000,9 @@ if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then
       dnl Remove "-fdebug-prefix-map", it isn't supported by clang.
       perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
 	      -e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[[^ ]]*//' \
-			-e 's/-fdebug-prefix-map[[^ ]]*//g'`
+			-e 's/-fdebug-prefix-map[[^ ]]*//g' \
+			-e 's/-Werror=format-security/-Wformat &/'`
+
       dnl Remove "-lc", it breaks on FreeBSD when using "-pthread".
       perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
 		sed -e '/Warning/d' -e '/Note (probably harmless)/d' \

Raspunde prin e-mail lui