Skip to content
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

Adding Support for NeoVim #692

Closed
joshuamcginnis opened this issue Jan 3, 2017 · 13 comments
Closed

Adding Support for NeoVim #692

joshuamcginnis opened this issue Jan 3, 2017 · 13 comments

Comments

@joshuamcginnis
Copy link

joshuamcginnis commented Jan 3, 2017

I've been working to get a successful build of neovim on the Odroid 2 and finally had some success, but it took some tweaks to get it working.

In my conversation with the project maintainers, they suggested I reach out and inquire as to how we can get neovim, python-neovim, and python3-neovim as supported packages using DietPi's package management system.

neovim is already supported with apt in Debian and Ubuntu as documented here:
https://github.com/neovim/neovim/wiki/Installing-Neovim

Is there a way I can help get neovim supported as a supported package for DietPi? My thanks in advance.

@Fourdee
Copy link
Collaborator

Fourdee commented Jan 4, 2017

Is there a way I can help get neovim supported as a supported package for DietPi? My thanks in advance.

Yep, i'll take a look and see whats involved.

Should be two options for install method:

  • Sourcebuild: Where its compiled from source during install
  • Deb packages: Where we create .Deb's and pull them in to install.
    ARMv6
    ARMv7
    ARM64 (v8)
    AMD64

Source build is to ensure latest version, but can fail if libraries/compile steps change.

Deb packages preferred, with testing ensures working, stable installations. But they will need to be re-built to match latest versions.

Either way, i'll know more once I've done some tests based on your notes. Leave it with me.

@Fourdee Fourdee added this to the v142 milestone Jan 4, 2017
@Fourdee
Copy link
Collaborator

Fourdee commented Jan 4, 2017

Quick compile C2 notes (based on @joshuamcginnis original notes):

apt-get install -y git build-essential checkinstall libtool libtool-bin autoconf automake cmake g++ pkg-config unzip
apt-get install -y lua5.1 luarocks libuv1-dev

---

#lua stuff
luarocks install lpeg
luarocks install mpack
luarocks install luabitop

---

#Build msgpack-c
cd "$HOME"
git clone --depth=1 https://github.com/msgpack/msgpack-c.git
cd msgpack*
cmake .
make -j $(nproc --all)
make install

# - Create .deb
#checkinstall

---

#Build neovim
cd "$HOME"
git clone --depth=1 https://github.com/neovim/neovim.git
cd neovim
make deps DEPS_CMAKE_FLAGS="-DUSE_BUNDLED_LIBUV=OFF -DUSE_BUNDLED_MSGPACK=OFF -DUSE_BUNDLED_LUAROCKS=OFF -DUSE_BUNDLED_LUAJIT=OFF"
mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$HOME/neovim ..
make -j $(nproc --all) 
make install

# - Create .deb
#checkinstall

@joshuamcginnis
Looks like its failing on LuaJIT 2.0.4, dep required by NeoVim, ARM64 (v8) not supported:

==== Building LuaJIT 2.0.4 ====
make[5]: Entering directory '/root/neovim/.deps/build/src/luajit/src'
Creating directories for 'msgpack'
lj_arch.h:55:2: error: #error "No support for this architecture (yet)"

#
---

#LUA jit
cd "$HOME"
git clone --depth=1 https://github.com/LuaJIT/LuaJIT.git
cd Lua*
make -j $(nproc --all)
#make install

#Same errors

Did you receive the same issues during compile? And, have you been successful in compiling and installing NeoVim on ARM64?

@joshuamcginnis
Copy link
Author

Looks like its failing on LuaJIT 2.0.4, dep required by NeoVim, ARM64 (v8) not supported:

@Fourdee That's correct. This issue has a discussion from another Odroid user regarding this failure. It's a little unclear, but I believe the user was able to get a successful build of luajit with a patch.

However, I opted to configure the build to NOT compile luajit (and others) since the neovim maintainers claimed it was only needed for running tests.

This comment has my exact build steps for getting a successful build:
neovim/neovim#5861 (comment)

@Fourdee
Copy link
Collaborator

Fourdee commented Jan 9, 2017

@joshuamcginnis

Ok, tested again, using your steps located here,fails to build: neovim/neovim#5861 (comment)

I cant seem to get past make deps DEPS_CMAKE_FLAGS="-DUSE_BUNDLED_LIBUV=OFF -DUSE_BUNDLED_MSGPACK=OFF -DUSE_BUNDLED_LUAROCKS=OFF -DUSE_BUNDLED_LUAJIT=OFF":

In file included from /root/neovim/.deps/build/src/luv/src/luv.c:18:0:
/root/neovim/.deps/build/src/luv/src/luv.h:19:17: fatal error: lua.h: No such file or directory
 #include <lua.h>
                 ^
compilation terminated.
CMakeFiles/luv.dir/build.make:54: recipe for target 'CMakeFiles/luv.dir/src/luv.c.o' failed
make[6]: *** [CMakeFiles/luv.dir/src/luv.c.o] Error 1
make[6]: Leaving directory '/root/neovim/.deps/build/src/luv-static-build'
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/luv.dir/all' failed
make[5]: *** [CMakeFiles/luv.dir/all] Error 2
make[5]: Leaving directory '/root/neovim/.deps/build/src/luv-static-build'
Makefile:117: recipe for target 'all' failed
make[4]: *** [all] Error 2
make[4]: Leaving directory '/root/neovim/.deps/build/src/luv-static-build'
CMakeFiles/luv-static.dir/build.make:107: recipe for target 'build/src/luv-static-stamp/luv-static-build' failed
make[3]: *** [build/src/luv-static-stamp/luv-static-build] Error 2
make[3]: Leaving directory '/root/neovim/.deps'
CMakeFiles/Makefile2:235: recipe for target 'CMakeFiles/luv-static.dir/all' failed
make[2]: *** [CMakeFiles/luv-static.dir/all] Error 2
make[2]: Leaving directory '/root/neovim/.deps'
Makefile:76: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/root/neovim/.deps'
Makefile:75: recipe for target 'deps' failed
make: *** [deps] Error 2
The dependency target "libuv" of target "luv-static" does not exist.
Call Stack (most recent call first):
  CMakeLists.txt:160 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

So as suggested here (make , not make deps: neovim/neovim#4692 (comment)

Tried:

make distclean
make -j $(nproc --all) DEPS_CMAKE_FLAGS="-DUSE_BUNDLED_LIBUV=OFF -DUSE_BUNDLED_MSGPACK=OFF -DUSE_BUNDLED_LUAROCKS=OFF -DUSE_BUNDLED_LUAJIT=OFF"

Which results in:

make[4]: Leaving directory '/root/neovim/.deps/build/src/unibilium'
[ 77%] Completed 'unibilium'
make[3]: Leaving directory '/root/neovim/.deps'
[ 77%] Built target unibilium
/usr/bin/install -c -m 755 lib/libjemalloc.a /root/neovim/.deps/usr/lib
/usr/bin/install -c -m 755 lib/libjemalloc_pic.a /root/neovim/.deps/usr/lib
make[4]: Leaving directory '/root/neovim/.deps/build/src/jemalloc'
[ 79%] Completed 'jemalloc'
make[3]: Leaving directory '/root/neovim/.deps'
[ 79%] Built target jemalloc
make[2]: Leaving directory '/root/neovim/.deps'
Makefile:76: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/root/neovim/.deps'
Makefile:75: recipe for target 'deps' failed
make: *** [deps] Error 2

@joshuamcginnis
Copy link
Author

Those errors seem to hint at either lua not being installed or the wrong version (which I did the first time around).

sudo apt-get install lua5.1 luarocks libuv1-dev

Are you sure you have lua5.1 and libuv1-dev installed?

@Fourdee
Copy link
Collaborator

Fourdee commented Jan 10, 2017

@joshuamcginnis

Are you sure you have lua5.1 and libuv1-dev installed?

Yes. Followed your instructions exactly: neovim/neovim#5861 (comment)

Also tried with libuv0.10-dev, same result.

root@DietPi:~/neovim# apt-cache search libuv
libuv0.10 - asynchronous event notification library - runtime library
libuv0.10-dbg - asynchronous event notification library - debugging symbols
libuv0.10-dev - asynchronous event notification library - development files
libuv1 - asynchronous event notification library - runtime library
libuv1-dbg - asynchronous event notification library - debugging symbols
libuv1-dev - asynchronous event notification library - development files
r-cran-httpuv - GNU R package of HTTP and WebSocket Server Library

So, either something has changed on NeoVim git, that breaks your original compile notes. Or, possibly we are lacking some additional packages and/or steps?

@joshuamcginnis
Copy link
Author

Are you on slack or freenode? Perhaps I can blow away my installation and we can go through it together.

@Fourdee
Copy link
Collaborator

Fourdee commented Jan 13, 2017

@joshuamcginnis

Are you on slack or freenode?

Nope, i'd never get anything done lol 😃

Perhaps I can blow away my installation and we can go through it together.

Sounds good, may take a bit longer, but we should be able to achieve this here.

Here are my install notes (based on yours), includes all the commands required: https://github.com/Fourdee/DietPi/issues/692#issuecomment-270419916

@Fourdee Fourdee modified the milestones: v142, Prototyping Jan 13, 2017
@007lva
Copy link

007lva commented Jan 15, 2017

I'm testing Dietpi Stretch, and I just noticed that neovim package is already included in the repo:

https://packages.debian.org/stretch/neovim

@joshuamcginnis
Copy link
Author

joshuamcginnis commented Jan 18, 2017

It looks like Debian 9 Stretch will go full freeze on 2-Feb-2017. Though, I don't know how much longer after DietPi Stretch will be released. That said, it might be the path of least resistance for this issue.

As an aside, if I were to begin testing DietPi Stretch, will I need to reimage once it released or will the normal update process take care of it?

@Fourdee
Copy link
Collaborator

Fourdee commented Jan 19, 2017

As an aside, if I were to begin testing DietPi Stretch, will I need to reimage once it released or will the normal update process take care of it?

If i'am honest, unknown at the moment. It really depends how much Stretch changes. We'll patch if we can, however, do expect a new image required for Alpha > Beta? > Release

@Fourdee
Copy link
Collaborator

Fourdee commented Jan 19, 2017

@joshuamcginnis @007lva (thanks!)

NeoVim, straightforward apt install on Stretch:
https://github.com/Fourdee/DietPi/issues/475#issuecomment-273755851

@Fourdee
Copy link
Collaborator

Fourdee commented Jan 19, 2017

Although a simple apt-get install, i've added to dietpi-software aswell, under additional linux software.

Will mark this as closed. This installation is available for Stretch only.

@joshuamcginnis

If you get any further success with compiling for Jessie, please reopen as needed. However, from my end, I simply don't have the time available to put more into this, and, i'am a nano user 😉 lol.

@Fourdee Fourdee closed this as completed Jan 19, 2017
@Fourdee Fourdee modified the milestones: v143, Prototyping Jan 19, 2017
@Fourdee Fourdee mentioned this issue Jan 29, 2017
Fourdee referenced this issue Jan 29, 2017
v143
(29/01/17)

Images:

BPi Pro | Image has been updated to 4.9 kernel. Onboard WiFi is now functional, HDMI audio is not supported at this time (3.5mm only): https://github.com/Fourdee/DietPi/issues/732

Changes / Improvements / Optimizations:

General | RPi: DietPi kernel is now installed by default. This adds support for Allo Piano 2.1 DAC, and 192KHz 16bit HDMI output.

DietPi-RAMdisk | Enabled additional logging for this process, as some users are experiencing issues. This should help us find the cause: https://github.com/Fourdee/DietPi/issues/719

DietPi-Config | Audio > Sound card: Added support for RPi "Pi-DIGI+"

DietPi-Software | NeoVim: Now available for RPi Stretch: https://github.com/Fourdee/DietPi/issues/692

DietPi-Software | O!MPD: Now available for installation. Slick, feature-rich MPD web interface music player: http://dietpi.com/phpbb/viewtopic.php?f=8&t=5&p=5171#p5171

DietPi-Software | NetData: Updated to latest (1.5.0): https://github.com/Fourdee/DietPi/issues/728

DietPi-JustBoom | Added option to launch Alsamixer

DietPi-JustBoom | Added various options unique to the Allo Piano 2.1 DAC: https://github.com/Fourdee/DietPi/issues/714

Bug fixes:

General | Pine 64 FB cursor is now visible: https://github.com/Fourdee/DietPi/issues/596

General | LED heartbeat for H3 is now functional and applied during boot.

DietPi-Config | Display > Added support for JustBoom IR Remote. Supports Kodi & MPD controls by default: https://github.com/Fourdee/DietPi/issues/735

DietPi-Config | Audio > USB-DAC: When enabled, will always re-detect and apply active card index during boot. Many thanks to "J. Künz" for these fixes!

DietPi-Config | Audio > Sound card: Corrected options for BPi Pro. Many thanks to "J. Künz" for these fixes!

DietPi-Config | Audio > Sound card: Corrected options for OPi Zero (H2+) HDMI and 3.5mm analogue (default).

DietPi-Config | Audio > Sound card: Allo Piano 2.1 DAC for RPi is now functional. Driver provided by DietPi kernel: https://github.com/Fourdee/DietPi/issues/727

DietPi-Software | Failure to move MySQL DB store will now prevent further action being taken: https://github.com/Fourdee/DietPi/issues/715

DietPi-Software | Resolved an issue with VNC4server/RealVNC install, that prevented desktop launch command being inserted to xstartup, if a desktop was installed beforehand:

DietPi-Software | Resolved an issue where installing LMS and SqueezeLite at the same time, would result in apt failure 100: https://github.com/Fourdee/DietPi/issues/736
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants