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

Rakudo Star REPL keeps throwing cannot locate symbol 'tcgetattr' error #206

Open
hwayne opened this issue Nov 12, 2024 · 3 comments
Open
Assignees

Comments

@hwayne
Copy link

hwayne commented Nov 12, 2024

Bug Description

I upgraded raku on my Windows machine from version 2023.08 to 2024.10. Now running raku in the terminal opens the repl, and immediately throws this error:

>Cannot locate symbol 'tcgetattr' in native library ''
  in method setup at C:\Program Files\rakudo\share\perl6\core\sources\14F0F0534C870E1E63E36F719EE99DE84801C5C3 (NativeCall) line 1
  in sub raku-nativecall at C:\Program Files\rakudo\share\perl6\core\sources\5228944CC4FA77F123C90F521225D03ABE23DF88 (NativeCall::Dispatcher) line 46
  in sub raku-nativecall at C:\Program Files\rakudo\share\perl6\core\sources\5228944CC4FA77F123C90F521225D03ABE23DF88 (NativeCall::Dispatcher) line 46
  in sub getattr at C:\Program Files\rakudo\share\perl6\site\sources\2184C24047A3D6F4FDDB14A7DDE5E8726DC1D1C2 (Terminal::MakeRaw) line 41
  in method enter-raw-mode at C:\Program Files\rakudo\share\perl6\site\sources\1F85045AFD4BECC446A46588301CBA42671BE415 (Terminal::LineEditor::RawTerminalInput) line 323
  in method read-input at C:\Program Files\rakudo\share\perl6\site\sources\1F85045AFD4BECC446A46588301CBA42671BE415 (Terminal::LineEditor::RawTerminalInput) line 734
  in method prompt at C:\Program Files\rakudo\share\perl6\site\sources\1F85045AFD4BECC446A46588301CBA42671BE415 (Terminal::LineEditor::RawTerminalInput) line 877
  in method repl-read at 'SETTING::'src/core.c/REPL.rakumod line 123
  in method repl-loop at 'SETTING::'src/core.c/REPL.rakumod line 442
  in any <main> at C:\Program Files\rakudo\bin\..\share\perl6\runtime\perl6.moarvm line 1
  in any <entry> at C:\Program Files\rakudo\bin\..\share\perl6\runtime\perl6.moarvm line 1

>Cannot locate symbol 'tcgetattr' in native library ''
[again]

This repeats until I exit out of the REPL.

Reproduction path

Install rakudo star from the .msi installer. Then run in the terminal

> raku

Running raku on a file, or with the -e flag, does not have a bug. Changing RAKUDO_LINE_EDITOR to none (or any value besides LineEditor) causes the REPL to work normally.

Output of sysinfo

Installed from https://rakudo.org/star/windows, release 2024.10-1. The release does not provide rstar, so I cannot run rstar sysinfo or rstar fetch/install

Investigation

I suspect the problem is from Terminal-MakeRaw, which was first added in July 2024. MakeRaw calls tcgetattr, which is provided in POSIX under termios.h. Windows doesn't have that native call, which causes the error. Terminal-MakeRaw is only used by the LineEditor, so the other line editors don't have a bug.

@patrickbkr
Copy link
Collaborator

Your analysis is right. See https://todo.sr.ht/~patrickb/Terminal-MakeRaw/1. I'm working on this.

@patrickbkr patrickbkr self-assigned this Nov 13, 2024
@AntonOks
Copy link
Collaborator

same as #205

@AntonOks
Copy link
Collaborator

I've removed the LineEditor module with 643b1dc

Not sure if this helps because of the often complex recursive module dependencies in Rakudo... so, it there is any other module in the modules.txt, which depends on LineEditor, the problem persist because Star, actually zef, will (try to) install all dependencies form all the modules in this list...

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