nixprime / cpsm

A CtrlP matcher, specialized for paths.
Apache License 2.0
202 stars 19 forks source link

error with -stack_size option #44

Closed toejough closed 6 years ago

toejough commented 6 years ago

When trying to run the installation script, I get an error:

ld: -stack_size option can only be used when linking a main executable
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [cpsm_py.so] Error 1
make[1]: *** [CMakeFiles/cpsm_py.dir/all] Error 2
make: *** [all] Error 2

Full installation output:

 ~/.vim/plugged/cpsm/install.sh
PY3 not specified; inferring Python version from /usr/local/bin/vim
Python 3 selected
-- The C compiler identification is AppleClang 9.0.0.9000039
-- The CXX compiler identification is AppleClang 9.0.0.9000039
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
CMake Warning at /usr/local/Cellar/cmake/3.10.2/share/cmake/Modules/FindBoost.cmake:801 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.10.2/share/cmake/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/local/Cellar/cmake/3.10.2/share/cmake/Modules/FindBoost.cmake:1542 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:21 (find_package)

-- Boost version: 1.66.0
-- Found the following Boost libraries:
--   program_options
-- Found PythonInterp: /Users/joe/.pyenv/shims/python3 (found suitable version "3.6.1", minimum required is "3")
-- Found PythonInterp: /Users/joe/.pyenv/shims/python3 (found version "3.6.1")
-- Found PythonConfig: -I/Users/joe/.pyenv/versions/3.6.1/include/python3.6m -I/Users/joe/.pyenv/versions/3.6.1/include/python3.6m; -L/Users/joe/.pyenv/versions/3.6.1/lib/python3.6/config-3.6m-darwin -lpython3.6m -ldl -framework CoreFoundation -Wl,-stack_size,1000000 -framework CoreFoundation
-- Optional package ICU was not found
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/joe/.vim/plugged/cpsm/build
Scanning dependencies of target cpsm_core
[ 11%] Building CXX object CMakeFiles/cpsm_core.dir/src/str_util.cc.o
[ 22%] Linking CXX static library libcpsm_core.a
[ 22%] Built target cpsm_core
Scanning dependencies of target cpsm_cli
[ 33%] Building CXX object CMakeFiles/cpsm_cli.dir/src/cpsm_cli_main.cc.o
[ 44%] Linking CXX executable cpsm_cli
[ 44%] Built target cpsm_cli
Scanning dependencies of target cpsm_py
[ 55%] Building CXX object CMakeFiles/cpsm_py.dir/src/ctrlp_util.cc.o
[ 66%] Building CXX object CMakeFiles/cpsm_py.dir/src/python_extension.cc.o
[ 77%] Linking CXX shared library cpsm_py.so
ld: -stack_size option can only be used when linking a main executable
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [cpsm_py.so] Error 1
make[1]: *** [CMakeFiles/cpsm_py.dir/all] Error 2
make: *** [all] Error 2
[I] 2>

Version outputs:

 clang --version
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin17.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
[I] > python --version
Python 3.6.4
[I] > vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Feb  5 2018 13:16:19)
macOS version
Included patches: 1-1450
Compiled by Homebrew
Huge version without GUI.  Features included (+) or not (-):
+acl               +farsi             +mouse_sgr         -tag_any_white
+arabic            +file_in_path      -mouse_sysmouse    -tcl
+autocmd           +find_in_path      +mouse_urxvt       +termguicolors
-autoservername    +float             +mouse_xterm       +terminal
-balloon_eval      +folding           +multi_byte        +terminfo
+balloon_eval_term -footer            +multi_lang        +termresponse
-browse            +fork()            -mzscheme          +textobjects
++builtin_terms    -gettext           +netbeans_intg     +timers
+byte_offset       -hangul_input      +num64             +title
+channel           +iconv             +packages          -toolbar
+cindent           +insert_expand     +path_extra        +user_commands
-clientserver      +job               +perl              +vertsplit
+clipboard         +jumplist          +persistent_undo   +virtualedit
+cmdline_compl     +keymap            +postscript        +visual
+cmdline_hist      +lambda            +printer           +visualextra
+cmdline_info      +langmap           +profile           +viminfo
+comments          +libcall           -python            +vreplace
+conceal           +linebreak         +python3           +wildignore
+cryptv            +lispindent        +quickfix          +wildmenu
+cscope            +listcmds          +reltime           +windows
+cursorbind        +localmap          +rightleft         +writebackup
+cursorshape       +lua               +ruby              -X11
+dialog_con        +menu              +scrollbind        -xfontset
+diff              +mksession         +signs             -xim
+digraphs          +modify_fname      +smartindent       -xpm
-dnd               +mouse             +startuptime       -xsmp
-ebcdic            -mouseshape        +statusline        -xterm_clipboard
+emacs_tags        +mouse_dec         -sun_workshop      -xterm_save
+eval              -mouse_gpm         +syntax
+ex_extra          -mouse_jsbterm     +tag_binary
+extra_search      +mouse_netterm     +tag_old_static
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X -DMACOS_X_DARWIN  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang   -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib  -L/usr/local/lib -o vim        -lncurses -liconv -framework AppKit  -L/usr/local/lib -llua -mmacosx-version-min=10.13 -fstack-protector-strong -L/usr/local/lib  -L/usr/local/Cellar/perl/5.26.1/lib/perl5/5.26.1/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc  -L/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/config-3.6m-darwin -lpython3.6m -framework CoreFoundation  -lruby.2.5.0 -lobjc

OSX 10.13.3 (17D47)

toejough commented 6 years ago

I'm not sure where that option is getting set - when I search for it, it only shows up in cached output, not in any actual build commands:

ack -i 'stack_size'
build/CMakeCache.txt
375:FIND_PACKAGE_MESSAGE_DETAILS_PythonConfig:INTERNAL=[-I/Users/joe/.pyenv/versions/3.6.1/include/python3.6m -I/Users/joe/.pyenv/versions/3.6.1/include/python3.6m; -L/Users/joe/.pyenv/versions/3.6.1/lib/python3.6/config-3.6m-darwin -lpython3.6m -ldl -framework CoreFoundation -Wl,-stack_size,1000000 -framework CoreFoundation][-I/Users/joe/.pyenv/versions/3.6.1/include/python3.6m -I/Users/joe/.pyenv/versions/3.6.1/include/python3.6m][-L/Users/joe/.pyenv/versions/3.6.1/lib/python3.6/config-3.6m-darwin -lpython3.6m -ldl -framework CoreFoundation -Wl,-stack_size,1000000 -framework CoreFoundation][v()]

Wait... it should not be using 3.6.1. why is it using 3.6.1?

Ok, well, that was it. The pyenv 3.6.1 installation didn't have the dynamic libs. Re-installing that python version allowed the installation to pass.

toejough commented 6 years ago

ok, well, now vim exits on load with a SIGABRT. The last line in the startup log if I do vim -V9<logfile> is line 19: sourcing "/Users/joe/.vim/plugged/cpsm/autoload/cpsm.vim"

I think I'm done trying to make this plugin work, at least for tonight. :-/ ¯\_(ツ)_/¯