Hi,
The Vim GTK+ 2 interface is failing to build, while the GTK+ 3 interface is building fine on Arch Linux 64-bit. Here is the error message I am getting during the build of Vim GTK+ 2:
tune=generic -O2 -pipe -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -o objects/gui_beval.o gui_beval.c gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DDYNAMIC_LUA_DLL=\"liblua.so.5.3.2\" -I/usr/include -o objects/if_lua.o if_lua.c gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DDYNAMIC_PERL_DLL=\"libperl.so\" -D_REENTRANT -D_GNU_SOURCE -fwrapv -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -I/usr/lib/perl5/core_perl/CORE -o objects/if_perl.o auto/if_perl.c <command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined <command-line>:0:0: note: this is the location of the previous definition In file included from if_perl.xs:610:0: /usr/lib/perl5/core_perl/CORE/inline.h: In function ‘S_av_top_index’: /usr/lib/perl5/core_perl/CORE/inline.h:20:5: error: ‘PERL_ARGS_ASSERT_AV_TOP_INDEX’ undeclared (first use in this function) PERL_ARGS_ASSERT_AV_TOP_INDEX; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/lib/perl5/core_perl/CORE/inline.h:20:5: note: each undeclared identifier is reported only once for each function it appears in /usr/lib/perl5/core_perl/CORE/inline.h: In function ‘S_append_utf8_from_native_byte’: /usr/lib/perl5/core_perl/CORE/inline.h:242:5: error: ‘PERL_ARGS_ASSERT_APPEND_UTF8_FROM_NATIVE_BYTE’ undeclared (first use in this function) PERL_ARGS_ASSERT_APPEND_UTF8_FROM_NATIVE_BYTE; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/lib/perl5/core_perl/CORE/inline.h: In function ‘S__is_utf8_char_slow’: /usr/lib/perl5/core_perl/CORE/inline.h:274:5: error: ‘PERL_ARGS_ASSERT__IS_UTF8_CHAR_SLOW’ undeclared (first use in this function) PERL_ARGS_ASSERT__IS_UTF8_CHAR_SLOW; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/lib/perl5/core_perl/CORE/inline.h: In function ‘S_is_safe_syscall’: /usr/lib/perl5/core_perl/CORE/inline.h:305:5: error: ‘PERL_ARGS_ASSERT_IS_SAFE_SYSCALL’ undeclared (first use in this function) PERL_ARGS_ASSERT_IS_SAFE_SYSCALL; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/lib/perl5/core_perl/CORE/inline.h: In function ‘S_sv_only_taint_gmagic’: /usr/lib/perl5/core_perl/CORE/inline.h:390:5: error: ‘PERL_ARGS_ASSERT_SV_ONLY_TAINT_GMAGIC’ undeclared (first use in this function) PERL_ARGS_ASSERT_SV_ONLY_TAINT_GMAGIC; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Makefile:2859: recipe for target 'objects/if_perl.o' failed make[1]: *** [objects/if_perl.o] Error 1 make[1]: Leaving directory '/home/fusion809/GitHub/mine/PKGBUILDs/gvim-git/src/vim/src' Makefile:26: recipe for target 'first' failed make: *** [first] Error 2
Thanks for your time,
Brenton
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
Aha this error disappeared when I downgraded Perl from 5.22.2 to 5.22.1.
--
--
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 vim_dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
@vim-ml I'm afraid I don't know how to get the configuration settings you're referring to (I'm more an end-user than a developer) so I'll give you the best I can think of, the configure and make command used by my gvim
PKGBUILD:
./configure \
--enable-fail-if-missing \
--with-compiledby='Arch Linux AUR' \
--prefix=/usr \
--enable-gui=gtk2 \
--with-features=huge \
--enable-cscope \
--enable-multibyte \
--enable-perlinterp=dynamic \
--enable-pythoninterp=dynamic \
--enable-python3interp=dynamic \
--enable-rubyinterp=dynamic \
--enable-luainterp=dynamic
make
—
You are receiving this because you were mentioned.
--
The Arch Linux Build system (ABS) is setting make variable 'CPPFLAGS="-D_FORTIFY_SOURCE=2"' as well as some of the other flags seen above by default in its configuration file /etc/makepkg.conf
.
These settings don't seem to be involved in the problem discussed here, though.
Rather, it seems to be an incompatibility between Perl 5.22.2 and value dynamic
of configure option --enable-perlinterp
as suggested by the following tests running ./configure
and make
on up to date Arch Linux independently from its build system. In particular CPPFLAGS="-D_FORTIFY_SOURCE
had been set to its expected value by the configure script ("checking whether we need -D_FORTIFY_SOURCE=1... yes"):
./configure --enable-gui=no --enable-perlinterp=yes
: make
runs flawlessly, no apparent issues in the code generated that way./configure --enable-gui=no --enable-perlinterp=dynamic
: make
fails with error messages as posted above./configure --enable-gui=no --enable-perlinterp=dynamic
: same as 1.—
You are receiving this because you were mentioned.
Thank you for the feedback. Now I understand where the D flag comes from.
Currently, we have a patch for fixing the issue, but unfortunately, it has been kept under review for a week.
This is because Bram and Damien, the author of the patch, are concerned about whether or not the patch breaks the Perl interface on older versions of Perl, say 5.18 (https://groups.google.com/forum/#!topic/vim_dev/xLXIFC8p3EY).
I think vim_dev would appreciate it if someone could have a try at the patch with an older Perl other than 5.22 and let us know the result here.
—
You are receiving this because you were mentioned.
I just tried the patch on the following perls:
Each of them built ok, but when I ran vim and tried :perl print 'hi'
, I got the following error:
E448: Could not load library function Perl_ISv_ptr
Sorry, this command is disabled: the Perl library could not be loaded.
I'll try more recent perls later.
—
You are receiving this because you were mentioned.
Alright, I tried the following versions as well:
For each of these versions, vim built correctly, and :perl print 'hi'
works just fine.
—
You are receiving this because you were mentioned.
Well I just tried building gVim on the Open Build Service (OBS) and this Perl issue has reared its ugly head again https://build.opensuse.org/package/live_build_log/home:fusion809:arch_extra:extra/gvim/Arch_Extra/i586.
—
You are receiving this because you were mentioned.
@fusion809
Did you apply the patch mentioned earlier? Otherwise the failure comes as no surprise.
Also, could you eventually exchange this issue's title with something less specific? Problem is not limited to gVim / GTK but affects Perl 5.22.2 in general.
—
You are receiving this because you were mentioned.
Oops didn't see the mention of a patch until now.
—
You are receiving this because you were mentioned.
@hoelzro Thank you for testing with old versions.
I just tried the patch on the following perls:
- 5.8.9
- 5.10.1
- 5.12.5
Do these failures depend on Damien's patch? Do they work without the patch?
—
You are receiving this because you were mentioned.
I tried to compile Vim 7.4.1847 with ActivePerl 5.10.1 and without Damien's patch. It failed with the following error:
if_perl.obj : error LNK2001: unresolved external symbol _Perl_sv_2nv
The error is different from @hoelzro's case, but it seems that if_perl has been already broken for very old perl.
—
You are receiving this because you were mentioned.
I built rpms of 7.4.1832 without Damien's patch for these perls:
5.8.5 (el4)
5.8.8 (el5)
5.10.1 (el6)
5.16.3 (el7)
The ':perl print "hi"' test works on all of them.
To build with perl < 5.8.7 a fix is needed since it lacks the PERLIO_FUNCS_* defines but once that is fixed it works.
The patch I made can be found here:
http://jupiterrise.com/tmp/vim-7.4-old-perl-support.patch
With 7.4.1848 the build is broken for 5.8.8 and 5.8.5:
objects/if_perl.o: In function newBUFrv':
SvREFCNT_inc_void_NN'
/builddir/build/BUILD/vim-7.4.1848/src/if_perl.xs:823: undefined reference to
objects/if_perl.o: In function newWINrv':
SvREFCNT_inc_void_NN'
/builddir/build/BUILD/vim-7.4.1848/src/if_perl.xs:807: undefined reference to
collect2: ld returned 1 exit status
A simple define allows the build to complete:
#ifndef SvREFCNT_inc_void_NN
#define SvREFCNT_inc_void_NN SvREFCNT_inc
#endif
With the two fixes in place the perl print test works with 7.4.1848 on these perls:
5.8.5 (el4)
5.8.8 (el5)
5.10.1 (el6)
5.16.3 (el7)
I also tested with perl 5.8.0 (el3) but it fails miserably:
Attempt to free temp prematurely: SV 0x9426824 during global destruction.
Attempt to free temp prematurely: SV 0x9426dc4 during global destruction.
Attempt to free temp prematurely: SV 0x9481ee4 during global destruction.
Attempt to free temp prematurely: SV 0x93471ac during global destruction.
Attempt to free temp prematurely: SV 0x93471b8 during global destruction.
Attempt to free temp prematurely: SV 0x9344388 during global destruction.
Attempt to free temp prematurely: SV 0x9344448 during global destruction.
Attempt to free temp prematurely: SV 0x930a2d4 during global destruction.
Attempt to free temp prematurely: SV 0x9344358 during global destruction.
Attempt to free temp prematurely: SV 0x93471c4 during global destruction.
Scalars leaked: 11Vim: Double signal, exiting
Attempt to free unreferenced scalar during global destruction.
Attempt to free unreferenced scalar during global destruction.
Attempt to free unreferenced scalar during global destruction.
Attempt to free unreferenced scalar during global destruction.Segmentation fault
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
—
You are receiving this because you are subscribed to this thread.