-
Notifications
You must be signed in to change notification settings - Fork 13
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
Error when install: Error: Build error: Failed compiling object src/term.o #29
Comments
What does your set up look like? What compiler toolchain are you using, how did you configure LuaRocks? |
Thanks for your reply. I found that the dependencies are compiled, but the compiler says things like "ENABLE_VIRTUAL_TERMINAL_INPUT" and "DISABLE_NEWLINE_AUTO_RETURN." are undeclared. This causes the Lua system install to fail. Do you know how I can fix this? |
what windows version are you on? |
Also; make sure your paths are clean (do not mix different compilers) just to be sure. That zipfile has You might want to give this a try;
|
I ran into this as well when using hererocks (to install any lua version, luarocks seems to be 3.8.0) in a github actions |
That would explain it. This functionality was added to windows 10 somewhere 2019. Which is by now 5 years ago... Would it be fair to state that one should stick to an older luasystem version, or upgrade to a later toolchain? |
It would be ideal to have some #if blocks to avoid this issue. I've only had a brief look at the code, but maybe you could just set it to zero if it isn't set? e.g. #ifndef ENABLE_VIRTUAL_TERMINAL_INPUT
#define ENABLE_VIRTUAL_TERMINAL_INPUT 0
#endif This seems in line with the comment here: Lines 106 to 108 in 4549924
If that can't be a solution, then having a note somewhere to specify which luasystem versions are supported on which toolchains would be useful. |
That depends. What happens if this constant is not defined (or zero)? Would the term module still work as expected? Would any tests fail? Is enabling this feature critical to the functionality of the Lua module? I'm not familiar with the Windows terminal, so I don't know enough to answer any of these questions. If the module just "doesn't work right" without this constant/feature, then is it possible to generate a more appropriate compile error message when the Windows version is too low? Something like: #if WINVER < XXX
#error Windows version not supported, need at least version YYY for terminal support
#endif |
It would not work. Even worse, if you run it on a recent version of windows, but with the 2019 compiler. It would compile but not work. Very confusing imho. I think @o-lim s suggestion of generating a more descriptive compile time error is probably the best option. |
That sounds good to me. |
My Windows version is: |
@Ryuu-64 I think it's more related to the toolchain, than the actual Windows version. Since Windows does binary distributions, the actual OS doesn't include the header files for development. You only get those with the Windows SDK or with Visual Studio installation. So what toolchain version were you using? |
With this change, the first error displayed is the new error message: For the Hopefully the |
@Ryuu-64 This is the same version that the |
@tobil4sk thx for all the digging in this issue! |
Here is the console log. I wonder why it failed.
I'm using "x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z" "lua-5.4.2_Win64_vc17_lib.zip" and "lua-5.4.2_Win64_bin.zip".
Would anyone be able to help?
The text was updated successfully, but these errors were encountered: