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

Linenoise broken on Windows as of 2016.11 #17

Open
stmuk opened this issue Dec 30, 2016 · 10 comments
Open

Linenoise broken on Windows as of 2016.11 #17

stmuk opened this issue Dec 30, 2016 · 10 comments

Comments

@stmuk
Copy link

stmuk commented Dec 30, 2016

I had to revert the version of Linenoise shipped with star to the one before Native::Resources removal in order to get it to work on Windows 10/mingw (from Strawberry Perl)

@hoelzro
Copy link
Collaborator

hoelzro commented Jan 1, 2017

@stmuk What kinds of problems did you see with the latest linenoise?

@ugexe
Copy link
Member

ugexe commented Jan 2, 2017

The problem is the make file has a hard coded liblinenoise%SO% but also relies on the $*VM.platform-library-name elsewhere which doesn't prefix the library name with 'lib'. So it fails trying to find liblinenoise.dll when it should be linenoise.dll

I've fixed that issue in #19, but starting linenoise via perl6 after install prints out a message about a missing symbol. I suspect this is an issue with the dll being renamed to $some-sha1 ~ '.dll' when installed, and that it needs to keep its original file name (see: sergot/openssl@91efa8c)

@hoelzro
Copy link
Collaborator

hoelzro commented Jan 5, 2017

@ugexe Thanks for the feedback - I've merged your PR. Is there other work that needs to be done for this to work on Windows?

@ugexe
Copy link
Member

ugexe commented Jan 5, 2017

Yes, you need to implement something like https://github.com/sergot/openssl/blob/91efa8c4f53e86501f23b3a6aeb4184cfedbfa9f/lib/OpenSSL/NativeLib.pm6 and replace your use of %?RESOURCES<libraries/linenoise> with something like the &ssl-lib from OpenSSL/NativeLib.pm6. The purpose of NativeLib.pm6 is that on Windows it copies the installed perl6/install/site/resource/lakjf09jf2093jf.dll to a temporary directory, renames it to its original linenoise.dll, and returns an IO::Path pointing at that. The PR simply allowed this to be installed on windows again

This is really a bug in CompUnit::Repository::Installation in that there needs to be a way to declare a file name cannot be mangled, so don't view this suggestion as anything other than a workaround.

@hoelzro
Copy link
Collaborator

hoelzro commented Jan 9, 2017

@ugexe I'm kind of loathe to copy/paste some DLL-fixing code from the OpenSSL module, partially since it doesn't have a license in place. I don't like Linenoise being broken on Windows, but perhaps it would be better to wait for the CompUnit system to support the non-workaround behavior you described above.

@raiph
Copy link

raiph commented Feb 13, 2019

I'm not a windows user and I'm not aware of anyone newly complaining about this but I encountered this issue while following up on another issue, and then dug a bit further to understand the status of this issue, and think it would be useful to update this issue with what I see, especially point 4:

  1. Aiui, Linenoise works on windows for rob but is broken for at least ugexe and stmuk and maybe others, maybe all others. (I've no idea but I find it hard to believe it's broken for all windows users!)

  2. Per ugexe's comment just above, there's a "bug in CompUnit::Repository::Installation in that there needs to be a way to declare a file name cannot be mangled".

  3. Per that same comment, there's a workaround that's been used for OpenSSL.

  4. Per your comment just above one of the reasons you didn't copy/paste that workaround for this Linenoise module was a lack of license at that time. Since then one has been added: https://github.com/sergot/openssl/blob/master/LICENSE

  5. Per ugexe's 2018 comment comment Normalize the path portion of repo specs rakudo/rakudo#2212 (comment) I'm guessing they have not fixed the above mentioned bug

@hoelzro
Copy link
Collaborator

hoelzro commented Feb 13, 2019

@raiph Thanks for filling in this information! BTW, do you know of anyone would like to take over maintainership of Linenoise? I haven't worked on Perl 6 for a while and free time is at a premium for me, so I can't really give it the love and attention it deserves!

@JJ
Copy link
Collaborator

JJ commented Nov 18, 2019

OK, I guess that'll have to be us. This one is a blocker for #29, so we'll try this one to go first.

@JJ
Copy link
Collaborator

JJ commented Nov 28, 2019

For the time being, the Makefile (and some paths) are Linux-specific. I'm trying to find a way to compile it, in its current version, in Windows, and eventually I think we'll have to create two separate Makefiles.

@JJ
Copy link
Collaborator

JJ commented Nov 28, 2019

OK, this is working now in Windows so we have at least a procedure to carry it out. I'll try and find a way to put this in the Makefile so that it's OS-independent.

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

5 participants