-
Notifications
You must be signed in to change notification settings - Fork 53
color_coded doesn't compile with multiple installed Lua versions on the system. #16
Comments
If I try to explicitly build with Lua5.2, I get SEGV fault: j@w1x8:~/.vim/bundle/color_coded {(master)} |
Thanks for making an issue.
If you'd like to debug, you can try disabling all plugins except for color_coded. You can also try running Your compilation issue should be resolved. If you need to modify the compiler flags, you can also use the $ make CXX_FLAGS=-foobar=spam |
I pulled your revisions, and it still doesn't build: @w1x8: Building bin/libcolor_coded_boost_system.a |
BTW, if you want to meet on IRC to debug this, maybe its better? I'm torpor on freenode .. |
BTW, which Lua version are you expecting to be linking with - 5.2 or 5.3? |
Okay, I added flags to link against lua 5.2, same deal. Building bin/libcolor_coded_boost_system.a $ make run |
Here are my vim details: $ vim --version Maybe color_coded doesn't like luajit? |
"Multiple installed Lua version on the system." Perhaps that's it. On debian jessie I have to have both lua 5.1 and 5.2 packages. I can't just use one version of it. |
I don't understand - why should you need both installed? I think the best thing to do is work out which version of Lua that color_coded is written for, and then just use it. |
Feel fortunate the compilation errors are getting posted here. Most people will encounter compilation issues and throw up their hands and give up and not press the issue.
I am confirming the edit: corrections |
@seclorum You didn't |
The dependencies section of the readme (linked to from the compilation step) specifies that 5.2 should be used. I've added some more flags which should better support Debian-based distros and OS X (just now). Please be sure to |
I did actually configure before I make'd .. I just didn't snag it in the pate. Here is the result of a new attempt: @w1x8: Compiler: c++ Updating submodules... done To run compile, use Building bin/libcolor_coded_boost_system.a Same deal, alas. Tell me how I can debug it further and I'll try to nail this for you. |
Try to answer these
|
|
Interesting: with the plugin disabled (commented out in vimrc), 'make run' also produces the SEGV error - i.e. whatever make run is doing, even with the color_coded plugin disabled, crashes gvim. |
No useful info in the debugger? Did it crash and break in the debugger? Can you issue |
Yes, just noticed that it loads only color_coded, so make run is a good test going further, since it means I can leave my vimrc alone. It did not crash and break in the debugger (lldb) so I'm looking into that a bit further. |
Okay, I wasn't using lldb properly (missing the -- separating args at the command line) so now I have useful information: "test/simple.cpp" 44L, 621CProcess 12698 stopped
|
Can I get the full backtrace? That's only the first frame. |
|
Interesting. Thanks for the backtace. Looks like it's crashing right in the plugin's "main" (entry point). Not even getting past the registration. Looking. |
Maybe it has something to do with this: http://lua-users.org/lists/lua-l/2011-11/msg00474.html (Trying now) |
A hah! Try building your macvim without luajit. Follow the README for the brew instructions. |
I did try that but it actually produced a vim without Lua (even though --with-lua was specified on the brew command line per the README) - it seems that the latest vim from homebrew has a luajit preference for some reason I haven't debugged yet. But, let me see if the -pagezero_size 10000 -image_base 100000000 args work, because I'd actually prefer to make it work with luajit if possible .. |
Never mind, of course this won't work (-pagezero_size 10000 -image_base 100000000) because .. not building an executable with a main .. (i.e. is plugin) |
That link you gave also mentioned that linking to luajit2 is required. I haven't tested color_coded with luajit, so I'm thinking we should try removing it on your machine for now (yes, it should be addressed if it's an issue -- let's find out). I'm using a fresh install of Yosemite on a test machine and it worked just fine with the command in the README. What do you mean it produced a vim without lua for you? There was no |
Here's the new vim version details:
Same problem - make run (after fresh configure && make) produces SEGV. Really at a loss what it could be at this point. |
Your vim still has luajit. See it on the last line. When you |
Please do this: $ brew uninstall macvim
$ brew install macvim --with-lua --override-system-vim
$ brew linkapps macvim |
Yes, I noticed that - I don't know why its not being rebuilt without luajit .. so I did a complete clean of macvim from my system, after a complete rebuild of macvim - without luajit - it seems the problem has gone away. Apologies - I guess this is related to the fact that vim was originally built on my system with luajit enabled. Still would be good to get it working with luajit somehow, but after all, its good to know the problem seems to be luajit related. |
Since I use cscope, also going to try to install vim --with-cscope too, and see if that interferes with things (probably won't, but just in case) ... |
Absolutely, if this solves your issue, I'll open a ticket about the luajit issues so they can be resolved. I'm thinking you should be good after this; let me know! |
Looks good, will continue to use it from this point on. Thanks for putting up with this luajit nonsense - let me know if I can help you get luajit support sorted out, that would be good (I would like to use other plugins that rely on luajit at some point) .. |
Excellent. I'm glad to hear we at least have it working on your machine. I'll make an issue about luajit now. I appreciate your patience. |
No worries - happy to help. Should've been obvious from the beginning, but thats murphy for you.. ;) |
I get these results, due to the fact that I have multiple Lua versions installed on my system (OSX 10.10.2), managed with homebrew:
j@w1x8:~/.vim/bundle/color_coded {(master)}
$ make
Tracking API changes...
Building bin/libcolor_coded_boost_system.a
Compiling src/error_code.cpp
Linking bin/libcolor_coded_boost_system.a
Building bin/libcolor_coded_boost_filesystem.a
Compiling src/codecvt_error_category.cpp
Compiling src/operations.cpp
Compiling src/path.cpp
Compiling src/path_traits.cpp
Compiling src/portability.cpp
Compiling src/unique_path.cpp
Compiling src/utf8_codecvt_facet.cpp
Linking bin/libcolor_coded_boost_filesystem.a
Building bin/color_coded.so
Compiling src/main.cpp
src/main.cpp:3:12: fatal error: 'lua.h' file not found
#include <lua.h>
^
1 error generated.
make: *** [src/main.cpp.o] Error 1
$ ls /opt/local/lib/lua
/opt/local/lib/liblua.5.1.5.dylib /opt/local/lib/liblua.5.2.dylib /opt/local/lib/liblua.dylib /opt/local/lib/libluajit-5.1.2.0.3.dylib /opt/local/lib/libluajit-5.1.dylib
/opt/local/lib/liblua.5.1.dylib /opt/local/lib/liblua.5.3.0.dylib /opt/local/lib/liblua5.1.dylib /opt/local/lib/libluajit-5.1.2.dylib
/opt/local/lib/liblua.5.2.3.dylib /opt/local/lib/liblua.5.3.dylib /opt/local/lib/libluabind.dylib /opt/local/lib/libluajit-5.1.a
/opt/local/lib/lua:
5.1 5.2
/opt/local/lib/luarocks:
rocks
j@w1x8:~/.vim {}
$ ls /opt/local/include/lua
/opt/local/include/lua.hpp
/opt/local/include/lua-5.1:
lauxlib.h lua.h lua.hpp luaconf.h lualib.h
/opt/local/include/lua-5.3:
lauxlib.h lua.h lua.hpp luaconf.h lualib.h
/opt/local/include/lua5.1:
lauxlib.h lua.h lua.hpp luaconf.h lualib.h
/opt/local/include/lua5.2:
lauxlib.h lua.h lua.hpp lua5.2 luaconf.h lualib.h
/opt/local/include/lua5.3:
lauxlib.h lua.h lua.hpp luaconf.h lualib.h
/opt/local/include/luabind:
adopt_policy.hpp container_policy.hpp exception_handler.hpp iterator_policy.hpp open.hpp scope.hpp weak_ref.hpp
back_reference.hpp copy_policy.hpp from_stack.hpp lua_include.hpp operator.hpp shared_ptr_converter.hpp wrapper_base.hpp
back_reference_fwd.hpp dependency_policy.hpp function.hpp luabind.hpp out_value_policy.hpp tag_function.hpp yield_policy.hpp
class.hpp detail get_main_thread.hpp make_function.hpp prefix.hpp typeid.hpp
class_info.hpp discard_result_policy.hpp get_pointer.hpp nil.hpp raw_policy.hpp value_wrapper.hpp
config.hpp error.hpp handle.hpp object.hpp return_reference_to_policy.hpp version.hpp
/opt/local/include/luajit-2.0:
lauxlib.h lua.h lua.hpp luaconf.h luajit.h lualib.h
The text was updated successfully, but these errors were encountered: