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

Doesn't work on systems with ncurses 6 #8

Closed
mortie opened this issue Jan 6, 2016 · 12 comments
Closed

Doesn't work on systems with ncurses 6 #8

mortie opened this issue Jan 6, 2016 · 12 comments
Assignees
Labels

Comments

@mortie
Copy link

mortie commented Jan 6, 2016

I'm using arch linux, which uses version 6 of ncurses, and thus has no /usr/lib/libncursesw.so.5. Running anything using this library then results in:

Cannot locate native library 'libncursesw.so.5': libncursesw.so.5: cannot open shared object file: No such file or directory

Symlinking /usr/lib/libncursesw.so.6.0 to /usr/lib/libncursesw.so.5 hackishly "solves" the issue, but isn't exactly a great solution.

@azawawi
Copy link
Owner

azawawi commented Jan 6, 2016

I see. Did you try using %*ENV<PERL6_NCURSES_LIB> to specify the ncurses library name/location?

@azawawi
Copy link
Owner

azawawi commented Jan 7, 2016

Did it work for you?

@CIAvash
Copy link

CIAvash commented Feb 25, 2016

@azawawi I set %*ENV<PERL6_NCURSES_LIB> to libncursesw.so.6, it didn't work and the same error was printed. Then I removed precomp files and tried again, it worked. And after this it works even if PERL6_NCURSES_LIB is not set.

Does it have something to do with LIB being constant and the precompilation?

@azawawi
Copy link
Owner

azawawi commented May 28, 2016

Sorry for the late reply. Unfortunately, a corrupted .precomp folder is sometimes the cause of some of the Perl 6 modules not working correctly when upgraded.

@azawawi azawawi added the bug label May 28, 2016
@blippy
Copy link

blippy commented Apr 12, 2017

I had the same problem, but was able to obtain a build as follows:

PERL6_NCURSES_LIB=libncursesw.so.6

then rebuild in the usual way.

@azawawi azawawi closed this as completed Apr 12, 2017
@azawawi
Copy link
Owner

azawawi commented Apr 12, 2017

@blippy Thanks for your feedback.

@blippy
Copy link

blippy commented Apr 12, 2017

I think it is to do with the fact that at perl6-ncurses6/lib/NCurses6.pm6, line 5 reads:

constant LIB = %*ENV<PERL6_NCURSES_LIB> || 'libncursesw.so.5';

I had a chat on perl6-users-help, where Brandon Allbery stated:

ABI version 6 is not compatible with version 5 (in particular, color handling changed). It is not safe to just use whatever ncurses happens to be around.

Given all of the potential conflict between version 5 and version 6 of ncurses, I have done what I think is the best solution: forked your repo as a basis for NCurses6 - aimed at compatability with version 6 of the library.

This should keep everyone happy (?). Anyone on older systems, or just wanting a vanilla install of Perl 6, can install rakudo in the usual way. Anyone wanting to go down the ncurses 6 route can install my module NCurses6: https://github.com/blippy/perl6-ncurses6 . It also enables users to have both versions on their system, and pick and choose whatever they favour the most.

@azawawi
Copy link
Owner

azawawi commented Apr 13, 2017

Great 👍 But why not have both on the same repository?

@blippy
Copy link

blippy commented Apr 13, 2017

I was spooked by Brandon's comment. ncurses6 seems to have better colour support.

I wonder what you think the best way forward is. Should you change 'libncursesw.so.5' to 'libncursesw.so.6', or to 'libncursesw.so', stick with the approach as-is whereby the user has to set PERL6_NCURSES_LIB and remove my NCurses6 as a bad idea, or something else?

Am I right in thinking that NCurses is part of the rakudo distribution?

@azawawi azawawi reopened this Apr 14, 2017
@azawawi
Copy link
Owner

azawawi commented Apr 14, 2017

Thanks for waking me up 👍

Please try 4c7c837. Your feedback is appreciated.

@azawawi azawawi self-assigned this Apr 14, 2017
@blippy
Copy link

blippy commented Apr 14, 2017

There seems to be a success. Here's what I did (IIRC):

  1. unset my PERL6_NCURSES_LIB, and started a new shell to ensure it was unset
  2. recompiled and reinstalled rakudo-star 2017.01
  3. Uninstalled NCurses
  4. Cloned your repo, and checked out the commit you listed above
  5. panda install .
  6. cd examples
  7. perl6 starfield.pl6

I was presented with a nice moving starfield :) So we have a winner!

Many thanks for fixing this for me.

I think the next step should be for me to remove NCurses6 from ecosystem, as it is redundant. Do you agree?

@azawawi
Copy link
Owner

azawawi commented Apr 14, 2017

Great. I am open to PRs (i.e. more tests, more examples, ideas for NCurses::Simple or NCurses::Lite). Please also checkout the new examples I am adding :)

Also please note panda is now deprecated in favor of zef.

@azawawi azawawi closed this as completed Apr 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants