Bug 222187 - editors/vim: Recent update to 8.0.1081 breaks build on system with installed devel/libvterm
Summary: editors/vim: Recent update to 8.0.1081 breaks build on system with installed ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Adam Weinberger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-10 08:32 UTC by Oleh Hushchenkov
Modified: 2017-09-13 12:58 UTC (History)
4 users (show)

See Also:


Attachments
Build log (30.45 KB, application/octet-stream)
2017-09-10 16:58 UTC, Oleh Hushchenkov
no flags Details
pkg info output (61.29 KB, text/plain)
2017-09-10 19:09 UTC, Oleh Hushchenkov
no flags Details
vim build log (30.45 KB, text/plain)
2017-09-10 19:11 UTC, Oleh Hushchenkov
no flags Details
Installed packages (46.63 KB, text/plain)
2017-09-11 19:23 UTC, George L. Yermulnik
no flags Details
make.conf (3.51 KB, text/plain)
2017-09-11 19:23 UTC, George L. Yermulnik
no flags Details
Patch that proposed on github (998 bytes, patch)
2017-09-12 06:58 UTC, Oleh Hushchenkov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oleh Hushchenkov 2017-09-10 08:32:24 UTC
libvterm/src/mouse.c:73:6: error: conflicting types for 'vterm_mouse_button'
void vterm_mouse_button(VTerm *vt, int button, int pressed, VTermModifier mod)
     ^
/usr/local/include/vterm.h:154:6: note: previous declaration is here                                                           
void vterm_mouse_button(VTerm *vt, int button, bool pressed, VTermModifier mod);                                               
     ^
1 error generated.                                                                                                             
*** Error code 1                                                                                                               
                                                                                                                               
Stop.                                                                                                                          
make[3]: stopped in /usr/ports/editors/vim/work/vim-8.0.1081/src                                                               
*** Error code 1                                                                                                               
                                                                                                                               
Stop.                                                                                                                          
make[2]: stopped in /usr/ports/editors/vim/work/vim-8.0.1081                                                                   
*** Error code 1                                                                                                               
                                                                                                                               
Stop.                                                                                                                          
make[1]: stopped in /usr/ports/editors/vim                                                                                     
*** Error code 1
Comment 1 Adam Weinberger freebsd_committer freebsd_triage 2017-09-10 15:52:16 UTC
Can you show the compilation command itself that fails?
Comment 2 Adam Weinberger freebsd_committer freebsd_triage 2017-09-10 15:59:24 UTC
I can't reproduce this. Adding a BUILD_DEPENDS on libvterm, vim still builds happily. There may be something else in your environment that is causing this. You can try the following:

* See if updating the port to latest upstream fixes it for you (currently 1089)
* Try removing installed ports to see which one is causing the conflict
* Build in poudriere or synth, which are specifically designed to prevent these sorts of problems
* Bisect between 1035 and 1081 to find which upstream commit caused your breakage

Once you've found the problem conflict and/or commit, let me know and we'll go from there.
Comment 3 Oleh Hushchenkov 2017-09-10 16:58:51 UTC
Created attachment 186230 [details]
Build log
Comment 4 Oleh Hushchenkov 2017-09-10 17:04:53 UTC
I have next results:
* This breakage introduced in version 8.0.1050
* Version 8.0.1049 builds successfully
* Update port to latest upstream version(tested 8.0.1091) did not fixed this issue
Comment 5 Oleh Hushchenkov 2017-09-10 17:09:00 UTC
Removing devel/libvterm fixes this issue. But I still need this lib.
Comment 6 Adam Weinberger freebsd_committer freebsd_triage 2017-09-10 17:46:10 UTC
Thanks for the bisection, Oleh.

I'm pretty swamped here so I can't do much diagnosis today, but I'll add an option to disable the terminal feature.

Can you add --enable-terminal=no and confirm that it builds for you?
Comment 7 Adam Weinberger freebsd_committer freebsd_triage 2017-09-10 17:58:45 UTC
Oleh I still can't reproduce this problem. What OPTIONS are you building with, what FreeBSD version, what is in your make.conf, and what ports do you have installed?
Comment 8 Oleh Hushchenkov 2017-09-10 18:49:23 UTC
uname -a
FreeBSD merom 11.1-STABLE FreeBSD 11.1-STABLE #0 r323206: Wed Sep  6 15:25:56 EEST 2017     root@merom:/usr/obj/usr/src/sys/GENERIC  amd64

cat /var/db/ports/editors_vim/options
# This file is auto-generated by 'make config'.
# Options for vim-8.0.1081
_OPTIONS_READ=vim-8.0.1081
_FILE_COMPLETE_OPTIONS_LIST=CSCOPE DEFAULT_VIMRC EXUBERANT_CTAGS NLS XTERM_SAVE ATHENA CONSOLE GNOME GTK2 GTK3 MOTIF X11 LUA PERL PYTHON RUBY TCL
OPTIONS_FILE_SET+=CSCOPE
OPTIONS_FILE_SET+=DEFAULT_VIMRC
OPTIONS_FILE_SET+=EXUBERANT_CTAGS
OPTIONS_FILE_SET+=NLS
OPTIONS_FILE_UNSET+=XTERM_SAVE
OPTIONS_FILE_UNSET+=ATHENA
OPTIONS_FILE_SET+=CONSOLE
OPTIONS_FILE_UNSET+=GNOME
OPTIONS_FILE_UNSET+=GTK2
OPTIONS_FILE_UNSET+=GTK3
OPTIONS_FILE_UNSET+=MOTIF
OPTIONS_FILE_UNSET+=X11
OPTIONS_FILE_SET+=LUA
OPTIONS_FILE_UNSET+=PERL
OPTIONS_FILE_SET+=PYTHON
OPTIONS_FILE_UNSET+=RUBY
OPTIONS_FILE_UNSET+=TCL

cat /etc/make.conf
#MALLOC_PRODUCTION=yes
#KERNCONF=GENERIC-NODEBUG

#WITHOUT="GUI"
#WITHOUT="X11"

#OPTIONS_UNSET=GUI
#OPTIONS_UNSET=X11

PORTS_MODULES+=x11/nvidia-driver-340

DISABLE_VULNERABILITIES=yes

DEFAULT_VERSIONS+=perl5=5.24
DEFAULT_VERSIONS+=python3=3.6
DEFAULT_VERSIONS+=ssl=openssl

DEVELOPER=yes

I can attach output of "pkg info" but is large.
Comment 9 Oleh Hushchenkov 2017-09-10 18:52:49 UTC
Adam, how I can add --enable-terminal=no to build? Maybe I am doing something wrong, but this have no effect.
Comment 10 Adam Weinberger freebsd_committer freebsd_triage 2017-09-10 18:59:04 UTC
(In reply to Oleh Hushchenkov from comment #9)

In the Makefile:

CONFIGURE_ARGS+= --enable-terminal=no
Comment 11 Adam Weinberger freebsd_committer freebsd_triage 2017-09-10 19:02:29 UTC
(In reply to Oleh Hushchenkov from comment #8)
I will need that pkg info output, and the full build log for vim.
Comment 12 Oleh Hushchenkov 2017-09-10 19:06:57 UTC
(In reply to Adam Weinberger from comment #11)
This exactly what I am doing, but I see this line during work configure script:

checking --enable-terminal argument... defaulting to yes

And build still fail with same error.
Comment 13 Oleh Hushchenkov 2017-09-10 19:09:26 UTC
Created attachment 186233 [details]
pkg info output
Comment 14 Oleh Hushchenkov 2017-09-10 19:11:22 UTC
Created attachment 186234 [details]
vim build log
Comment 15 Oleh Hushchenkov 2017-09-10 19:54:24 UTC
I can reproduce this issue on other machine with FreeBSD 10.4-BETA4 amd64.
Comment 16 George L. Yermulnik 2017-09-11 14:04:13 UTC
Having the same issue. "CONFIGURE_ARGS+= --enable-terminal=no" didn't help. Deinstalling "libvterm" helped. But it seems not quite good solution as one may need/want to have standalone "libvterm" port installed.
Comment 17 George L. Yermulnik 2017-09-11 19:21:00 UTC
As asked by Adam attaching some additional info: make.conf and a list of installed packages (FreeBSD 10.3-STABLE i386).
Comment 18 George L. Yermulnik 2017-09-11 19:23:17 UTC
Created attachment 186273 [details]
Installed packages
Comment 19 George L. Yermulnik 2017-09-11 19:23:42 UTC
Created attachment 186274 [details]
make.conf
Comment 20 Adam Weinberger freebsd_committer freebsd_triage 2017-09-12 02:11:12 UTC
Oleh and George,

I still don't know what is causing the build failure, but you can disable the terminal subsystem with:

MAKE_ARGS+=   CONF_OPT_TERMINAL=--disable-terminal
Comment 21 Oleh Hushchenkov 2017-09-12 05:15:51 UTC
I created issue on github https://github.com/vim/vim/issues/2080
Comment 22 Oleh Hushchenkov 2017-09-12 06:58:46 UTC
Created attachment 186288 [details]
Patch that proposed on github

This patch fixes this issue for me.
Comment 23 commit-hook freebsd_committer freebsd_triage 2017-09-12 23:22:57 UTC
A commit references this bug:

Author: adamw
Date: Tue Sep 12 23:22:20 UTC 2017
New revision: 449743
URL: https://svnweb.freebsd.org/changeset/ports/449743

Log:
  Update to patchlevel 1098 to fix build when libvterm is installed.

  PR:		222187
  Reported by:	Oleh Hushchenkov and George L. Yermulnik

Changes:
  head/editors/vim/Makefile
  head/editors/vim/distinfo
Comment 24 Adam Weinberger freebsd_committer freebsd_triage 2017-09-12 23:24:31 UTC
Thanks, Oleh and George! The patch has been committed upstream, and I've updated vim to that patchlevel.
Comment 25 Oleh Hushchenkov 2017-09-13 04:19:00 UTC
Thank you, Adam!
Comment 26 George L. Yermulnik 2017-09-13 12:57:34 UTC
Thanks, Adam!
Comment 27 George L. Yermulnik 2017-09-13 12:58:10 UTC
And thank you Oleh!