You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The zinit module build run would report that the module built successfully without actually producing the bundle file on OSX.
Updated `zsh.mdh'.
/Library/Developer/CommandLineTools/usr/bin/make -f Makemod prefix='/usr/local' exec_prefix='/usr/local' bindir='/usr/local/bin' libdir='/usr/local/lib' MODDIR='/usr/local/lib/zsh/5.3.1-dev-0' infodir='/usr/local/share/info' mandir='/usr/local/share/man' datadir='/usr/local/share' fndir='/usr/local/share/zsh/5.3.1-dev-0/functions' htmldir='/usr/local/share/zsh/htmldoc' runhelpdir='/usr/local/share/zsh/5.3.1-dev-0/help' CC='gcc' CPPFLAGS='-I/usr/local/include' DEFS='-DHAVE_CONFIG_H' CFLAGS='-g -Wall -O3' LDFLAGS='-L/usr/local/lib' EXTRA_LDFLAGS='-rdynamic' DLCFLAGS='-fno-common' DLLDFLAGS='-bundle -flat_namespace -undefined suppress' LIBLDFLAGS='' EXELDFLAGS='' LIBS='-liconv -ldl -ltermcap -lm -lc' DL_EXT='so' DLLD='gcc' AWK='gawk' ANSI2KNR=': ansi2knr' YODL=': yodl ' YODL2TXT=': yodl2txt' YODL2HTML=': yodl2html' FUNCTIONS_INSTALL='' tzsh='zsh' prep
echo 'timestamp for *.mdd files' > ../Src/modules.stamp
Module has been built correctly.
To load the module, add following 2 lines to .zshrc, at top:
module_path+=( "/Users/Tommy.Wang/.dotfiles/zsh/zinit/module/Src" )
zmodload zdharma_continuum/zinit
After loading, use command `zpmod' to communicate with the module.
See `zpmod -h' for more information.
zdharma_continuum % ls -la
total 136
drwxr-xr-x 7 Tommy.Wang staff 224 Dec 25 10:00 .
drwxr-xr-x 118 Tommy.Wang staff 3776 Dec 25 10:02 ..
-rw-r--r-- 1 Tommy.Wang staff 156 Dec 24 14:14 .cvsignore
-rw-r--r-- 1 Tommy.Wang staff 18 Dec 24 14:14 .distfiles
-rw-r--r-- 1 Tommy.Wang staff 16 Dec 24 14:14 .exrc
-rw-r--r-- 1 Tommy.Wang staff 50209 Dec 24 14:14 zinit.c
-rw-r--r-- 1 Tommy.Wang staff 86 Dec 24 14:14 zinit.mdd
This is because configure somehow determined that dynamically linked modules were unavailable, and disabled the module in config.modules:
# Edit this file to change the way modules are loaded.
# The format is strict; do not break lines or add extra spaces.
# Run `make prep' if you change anything here after compiling
# (there is no need if you change this just after the first time
# you run `configure').
#
# Values of `link' are `static', `dynamic' or `no' to compile the
# module into the shell, link it in at run time, or not use it at all.
# In the final case, no attempt will be made to compile it.
# Use `static' or `no' if you do not have dynamic loading.
#
# Values of `load' are `yes' or `no'; if yes, any builtins etc.
# provided by the module will be autoloaded by the main shell
# (so long as `link' is not set to `no').
#
# Values of `auto' are `yes' or `no'. configure sets the value to
# `yes'. If you set it by hand to `no', the line will be retained
# when the file is regenerated in future.
#
# Note that the `functions' entry extends to the end of the line.
# It should not be quoted; it is used verbatim to find files to install.
#
# You will need to run `config.status --recheck' if you add a new
# module.
#
# You should not change the values for the pseudo-module zsh/main,
# which is the main shell (apart from the functions entry).
name=zsh/main modfile=Src/zsh.mdd link=static auto=yes load=yes functions=Functions/Chpwd/* Functions/Exceptions/* Functions/Math/* Functions/Misc/* Functions/MIME/* Functions/Prompts/* Functions/VCS_Info/* Functions/VCS_Info/Backends/*
name=zdharma_continuum/zinit modfile=Src/zdharma_continuum/zinit.mdd link=no auto=yes load=no
I tested this on OSX Monterey, but according to this thread, the issue with the configure affects zsh 5.8 starting on OSX Big Sur that prevents it from properly detecting the platform features.
This has since been fixed in the 5.9 branch (via this patch), but 5.9 has also changed such that the zinit module no longer builds.
Investigating how the homebrew formula built zsh, I found that I could get the module to build from the zsh repo by setting CFLAGS as shown in the formula. I tried setting CFLAGS prior to running zinit module build, but that unfortunately didn't work right out of the box.
Here are the step that I took to finally get this to build:
Before running make, I confirmed that the file config.modules contained the zdharma-continuum/zinit plugin and that the link option was set to dynamic:
Finally, after running, I simply copied zsh/Src/zdharma_continuum/zinit.bundle wherever it needed to go (see ZINIT[MODULE_DIR]) and was able to get it load.
% zpmod -h
Usage: zpmod {subcommand} {subcommand-arguments}
zpmod report-append {plugin-ID} {new-report-body}
zpmod source-study [-l]
Command <report-append>:
Used by Zinit internally to speed up loading plugins with tracking (reporting).
It extends the given field {plugin-ID} in $ZINIT_REPORTS hash, with the given string
{new-report-body}.
Command <source-study>:
Displays list of files loaded via `source' or `.' builtins, with duration that each
loading lasted, in milliseconds. The module tracks all calls to those builtins and
measures the time each call took. This can be used to e.g. profile loading of plugins,
regardless of the plugin manager used.
Option -l shows full paths to the files.
The text was updated successfully, but these errors were encountered:
The
zinit module build
run would report that the module built successfully without actually producing the bundle file on OSX.This is because
configure
somehow determined that dynamically linked modules were unavailable, and disabled the module inconfig.modules
:I tested this on OSX Monterey, but according to this thread, the issue with the
configure
affects zsh 5.8 starting on OSX Big Sur that prevents it from properly detecting the platform features.This has since been fixed in the 5.9 branch (via this patch), but 5.9 has also changed such that the zinit module no longer builds.
Investigating how the homebrew formula built zsh, I found that I could get the module to build from the zsh repo by setting CFLAGS as shown in the formula. I tried setting CFLAGS prior to running
zinit module build
, but that unfortunately didn't work right out of the box.Here are the step that I took to finally get this to build:
Before running make, I confirmed that the file
config.modules
contained the zdharma-continuum/zinit plugin and that the link option was set todynamic
:Finally, after running, I simply copied
zsh/Src/zdharma_continuum/zinit.bundle
wherever it needed to go (see ZINIT[MODULE_DIR]) and was able to get it load.The text was updated successfully, but these errors were encountered: