Skip to content

MacVim stopped working after update to v. 8.2.1424 (gettext) #1073

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ekortright opened this issue Aug 13, 2020 · 7 comments · Fixed by #1076
Closed

MacVim stopped working after update to v. 8.2.1424 (gettext) #1073

ekortright opened this issue Aug 13, 2020 · 7 comments · Fixed by #1076
Milestone

Comments

@ekortright
Copy link

After updating to 8.2.1424 (164), MacVim stopped working. The program runs, but no window is displayed.

When trying to run from the command line, this is what I see:

$ mvim
dyld: Library not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib
  Referenced from: /Users/me/Applications/MacVim.app/Contents/MacOS/Vim
  Reason: image not found
Abort trap: 6

Until now, I have been using MacVim with the gettext that comes with homebrew:

$ gettext --version
gettext (GNU gettext-runtime) 0.21
Copyright (C) 1995-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Ulrich Drepper.
@mvilain
Copy link

mvilain commented Aug 13, 2020

I'm seeing different error on 10.13.6:

$ mvim
dyld: Library not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib
Referenced from: /Applications/MacVim.app/Contents/MacOS/Vim
Reason: Incompatible library version: Vim requires version 11.0.0 or later, but libintl.8.dylib provides version 10.0.0
Abort trap: 6

@ychin
Copy link
Member

ychin commented Aug 13, 2020

There was an issue with the latest release with how the linkage is done and I’ll work to fix it in the next couple days. For now please use 163. I believe I should have reverted the updater to point to 163. Is that not the case?

@ekortright
Copy link
Author

ekortright commented Aug 13, 2020

I just followed the prompts from MacVim and it installed 164.

Downloaded 163 and that works fine. Thanks.

@ychin
Copy link
Member

ychin commented Aug 13, 2020

Right. I think there was roughly 2-3 hours where this slipped through before someone filed the issue and I reverted the version bump so I would need to confirm that’s the case. Sorry about that.

Edit: I tried and confirmed that we are no longer upgrading snapshot-163 to snapshot-164. I think you guys were unlucky and upgraded it in the 2 hour time frame :(

@ychin ychin added this to the snapshot-165 milestone Aug 13, 2020
ychin added a commit to ychin/macvim that referenced this issue Aug 15, 2020
Currently, all the external libraries MacVim links against are
dynamically linked, but so far they are all system libraries or bundled
in /usr/lib, so all users have them installed. When gettext dependency
was added to the Travis build to add localization support, it relied on
an installed libintl.dylib library, usually in /usr/local/lib. This
means users who don't have it installed and open the distributed binary
will see MacVim immediately crash due to a missing dylib.

Instead, statically link against libintl.a instead. This is tricky
because clang stubbornly prefers dynamic libs over static ones if both
exist and you use the "-l" argument. Instead, you have to pass full path
to the static lib for it to link against it. Modify configure.ac to do
so, but because of the full path requirement, it's hard to get
AC_TRY_LINK to work with it, so just manually check for the library's
existence and use that. Hacky but works.

Also, add a check to Travis CI build to make sure we didn't accidentally
introduce third-party dynacmic linkage to the build.
- Add a new test to use objdump to dump out the dependencies, and check
  that we don't have any external third-party linkage (basically any
  dynamic links other than the pre-installed /usr/lib). Have to also
  check for existence of objdump because xcode 7 / macOS 10.11 doesn't
  have it installed.
- Split the beginning sanity checks to a separate fold group called
  "smoketest". Also, don't unset errexit until that part is done, so
  that we will immediately fail out of the job if the smoketest fails.
  Unsetting errexit is only useful in the later regular tests that could
  be a little flaky.

Fix macvim-dev#1073
ychin added a commit to ychin/macvim that referenced this issue Aug 15, 2020
Currently, all the external libraries MacVim links against are
dynamically linked, but so far they are all system libraries or bundled
in /usr/lib, so all users have them installed. When gettext dependency
was added to the Travis build to add localization support, it relied on
an installed libintl.dylib library, usually in /usr/local/lib. This
means users who don't have it installed and open the distributed binary
will see MacVim immediately crash due to a missing dylib.

Instead, statically link against libintl.a instead. This is tricky
because clang stubbornly prefers dynamic libs over static ones if both
exist and you use the "-l" argument. Instead, you have to pass full path
to the static lib for it to link against it. Modify configure.ac to do
so, but because of the full path requirement, it's hard to get
AC_TRY_LINK to work with it, so just manually check for the library's
existence and use that. Hacky but works.

Also, add a check to Travis CI build to make sure we didn't accidentally
introduce third-party dynacmic linkage to the build.
- Add a new test to use objdump to dump out the dependencies, and check
  that we don't have any external third-party linkage (basically any
  dynamic links other than the pre-installed /usr/lib). Have to also
  check for existence of objdump because xcode 7 / macOS 10.11 doesn't
  have it installed.
- Split the beginning sanity checks to a separate fold group called
  "smoketest". Also, don't unset errexit until that part is done, so
  that we will immediately fail out of the job if the smoketest fails.
  Unsetting errexit is only useful in the later regular tests that could
  be a little flaky.

Fix macvim-dev#1073
@ychin
Copy link
Member

ychin commented Aug 15, 2020

This should be fixed. Snapshot 165 should be out soon, and i added a check to make sure a similar problem (external library linkage) won't show up again.

ychin added a commit to ychin/macvim that referenced this issue Aug 15, 2020
Vim patch 8.2.1456

Features

- New "Appearance" option pane (accessible via Cmd-, or MacVim ->
  Preferences) to allow customizing how MacVim looks. Users can now
  select how MacVim works with Dark Mode, and configure titlebar to be
  hidden or transparent. macvim-dev#912 macvim-dev#1038 macvim-dev#1056
- MacVim localization support. It now uses translated Vim messages for
  the specified locale. See `:help multilang-messages` to see how to
  configure it. macvim-dev#991

General:

- Python is now built against 3.8, up from 3.7. macvim-dev#1012

Fixes:

- Fix mvim:// protocol handler behavior. Reverts behavior back to old
  behavior (before snapshot-162), but add new fallback handling to try
  to handle poorly formed URLs that don't double-encode special
  characters. See `:help macvim://`. macvim-dev#1055
- Can now change tabs using menu and keyboard shortcuts (Cmd-{ / Cmd-} /
  Cmd-T) when in terminal mode. macvim-dev#1045
- Fix crash during MacVim launch in Snapshot 164 (8.2.1424) due to
  dynamic library linkage. macvim-dev#1073

Targets macOS 10.9+

Script interfaces have compatibility with these versions:

- Lua 5.3
- Perl 5.18
- Python2 2.7
- Python3 3.8
- Ruby 2.7
ychin added a commit that referenced this issue Aug 15, 2020
Vim patch 8.2.1456

Features

- New "Appearance" option pane (accessible via Cmd-, or MacVim ->
  Preferences) to allow customizing how MacVim looks. Users can now
  select how MacVim works with Dark Mode, and configure titlebar to be
  hidden or transparent. #912 #1038 #1056
- MacVim localization support. It now uses translated Vim messages for
  the specified locale. See `:help multilang-messages` to see how to
  configure it. #991

General:

- Python is now built against 3.8, up from 3.7. #1012

Fixes:

- Fix mvim:// protocol handler behavior. Reverts behavior back to old
  behavior (before snapshot-162), but add new fallback handling to try
  to handle poorly formed URLs that don't double-encode special
  characters. See `:help macvim://`. #1055
- Can now change tabs using menu and keyboard shortcuts (Cmd-{ / Cmd-} /
  Cmd-T) when in terminal mode. #1045
- Fix crash during MacVim launch in Snapshot 164 (8.2.1424) due to
  dynamic library linkage. #1073

Targets macOS 10.9+

Script interfaces have compatibility with these versions:

- Lua 5.3
- Perl 5.18
- Python2 2.7
- Python3 3.8
- Ruby 2.7
@ychin
Copy link
Member

ychin commented Aug 15, 2020

The release should now be out. Please re-open the issue if it still doesn't work.

https://github.com/macvim-dev/macvim/releases/tag/snapshot-165

@ekortright
Copy link
Author

Works! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants