Bug 223901 - editors/vim: Does not start after pkg autoremove
Summary: editors/vim: Does not start after pkg autoremove
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Adam Weinberger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-27 04:21 UTC by Marián Černý
Modified: 2017-11-28 04:38 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marián Černý 2017-11-27 04:21:41 UTC
I have vim built without NLS knob on my portbuild machine. When I install it installs gettext-runtime as well:

    # pkg install vim
    
    New packages to be INSTALLED:
        vim: 8.0.1309
        gettext-runtime: 0.19.8.1_1

However, when I run `pkg autoremove`, gettext get's removed:

    # pkg autoremove
    
    Installed packages to be REMOVED:
        gettext-runtime-0.19.8.1_1

After I confirm the removal, vim does not run:

    Shared object "libintl.so.8" not found, required by "vim"

I believe the issue is related to the fact, that I have NLS disabled but gettext-runtime is probably present while the vim port builds. My portbuild consist of installing a list of ports using make install and then running `pkg create -a` and `pkg repo`.

Vim has the dependency for shared lib properly registered:

    # pkg info -rdbB vim
    vim-8.0.1309
    Shared Libs required:
        libintl.so.8

And gettext-runtime provides the required shared lib:

    # pkg info -rdbB gettext-runtime
    gettext-runtime-0.19.8.1_1
    Shared Libs provided:
        libasprintf.so.0
        libintl.so.8
    Depends on     :
        indexinfo-0.3.1

So it looks like this is more a bug of `pkg autoremove`. However, shouldn't vim built without NLS knob not depend on gettext at all?
Comment 1 Marián Černý 2017-11-27 04:33:37 UTC
I have reported this as a bug of `pkg autoremove` as well:

https://github.com/freebsd/pkg/issues/1639
Comment 2 Adam Weinberger freebsd_committer freebsd_triage 2017-11-28 00:24:09 UTC
(In reply to Marián Černý from comment #1)
This is definitely a bug in the vim port, and I'm sure you're correct that it's caused by libintl being available when the port builds.
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-11-28 04:35:45 UTC
A commit references this bug:

Author: adamw
Date: Tue Nov 28 04:35:10 UTC 2017
New revision: 455019
URL: https://svnweb.freebsd.org/changeset/ports/455019

Log:
  Fix WITHOUT_NLS

  Due to vim's configure not behaving like it says it does, the --disable-nls
  option doesn't actually disable NLS. It linked against libintl anyway.
  It turns out that to ACTUALLY disable NLS, you need to set --enable-nls to
  a nonsense value.

  PR:		223901
  Reported by:	Marian Cerny (whose name I'm butchering in 7-bit ASCII)

Changes:
  head/editors/vim/Makefile
Comment 4 Adam Weinberger freebsd_committer freebsd_triage 2017-11-28 04:38:52 UTC
Should be fixed now. Vim's configure script does some very strange things, and this was apparently one of them.

Thank you for reporting this, Marián! Please let me know if this patch doesn't fix it for you.