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

Build on OSX #101

Closed
erf opened this issue Nov 8, 2015 · 15 comments
Closed

Build on OSX #101

erf opened this issue Nov 8, 2015 · 15 comments

Comments

@erf
Copy link
Contributor

erf commented Nov 8, 2015

The new LUA addition looks exiting. I tried to install the third party libraries manually, but i think i screwed something up, because i can't see syntax highlighting. This is probably due to LUA or LPEG, but i did not get any errors. Anyone successful at building for OSX ?

@martanne
Copy link
Owner

martanne commented Nov 8, 2015

Your subject refers to a build issue, but then you state that you do not get any errors (hence the build was successful)? Did you do make install or set VIS_PATH=. ./vis?

@erf
Copy link
Contributor Author

erf commented Nov 8, 2015

I ran make and it built without errors but I guess i was making the assumption that some third party library was not working correctly since syntax highlighting was not showing, and that the build process could be improved upon for OSX. But i guess it could be another issue as well. Feel free to rename it.

@erf
Copy link
Contributor Author

erf commented Nov 8, 2015

I did do make install

@martanne
Copy link
Owner

martanne commented Nov 8, 2015

Run VIS_PATH=. ./vis from the build directory. If it does not work, use the Mac OS X equivalent of strace(1) and check what files it tries to open.

@erf
Copy link
Contributor Author

erf commented Nov 8, 2015

I ran VIS_PATH=. ./vis but i get the following warning:

Warning: failed to load theme `default-256' set $VIS_PATH

I believe it's because lpeg is not properly installed, and i'm not sure how to install it. The make local does not work.

@martanne
Copy link
Owner

martanne commented Nov 8, 2015

I assume you have built lpeg using make macosx? After that you must place the resulting lpeg.so file somewhere in the lua package path. Start the interactive lua interpreter and execute: print(package.cpath).

Anyway, except for the non-existing error reporting this is not a vis issue ...

@erf
Copy link
Contributor Author

erf commented Nov 9, 2015

Got it working by putting the lpeg.so in the right place.

I'm surely lacking some know-how in the linux / unix world, but automating the install process for vis on osx would be sweet.

@twe4ked
Copy link
Contributor

twe4ked commented Nov 9, 2015

@erf Once there is a version we can look at getting it on homebrew.

@erf
Copy link
Contributor Author

erf commented Nov 9, 2015

@twe4ked Yes let's do that.

@martanne martanne closed this as completed Nov 9, 2015
@martanne
Copy link
Owner

@twe4ked did you ever start packaging for homebrew? This would at least partially cover #162.

@twe4ked
Copy link
Contributor

twe4ked commented Mar 28, 2016

I had a quick look into it over the weekend but I ran out of time. I'll try get around to it soon.

@martanne
Copy link
Owner

Thanks, looking forward to it! I had a quick look at the package repository, both libtermkey and Lua 5.2 are already packaged and should not cause any problems. LPeg might be a bit more tricky because homebrew seems to have some issues with Lua dependency management? The sile formula refers to it in some way ...

@twe4ked
Copy link
Contributor

twe4ked commented Mar 31, 2016

I've opened a PR to add vis to homebrew.

Edit: It conflicts with an OS X app so hopefully it's allowed.

https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/vis.1.html

@twe4ked
Copy link
Contributor

twe4ked commented Mar 31, 2016

There were a few issues with the PR that I've fixed up. Here's what it looks like to install. The lua dependencies and the vis(1) conflict make things a bit more difficult.

@martanne
Copy link
Owner

martanne commented Apr 2, 2016

Thanks! So the installation procedure would be:

$ brew install lua && luarocks-5.2 install lpeg
$ brew install vis && brew link --force vis

Better than compiling from source I guess. Not sure why homebrew does not manage to properly handle Lua dependencies.

As for the name clash, I was aware of it, but at the time thought it would still be a fitting project name. Partly because of cat -v considered harmful which is the reason the original vis command exists. After all a goal of vis (the editor) is to handle arbitrary files and visually display them ...

The other main reason is that the computer science student organization at my university is also called vis, and they "sponsored" development with their free coffee service. Because the starting point for the whole project was a university course covering Project Oberon this reference seemed appropriate.

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

No branches or pull requests

3 participants