payonel / ocvm Goto Github PK
View Code? Open in Web Editor NEWOpenComputer Emulator
OpenComputer Emulator
I trying to compile OCVM using termux and clang, but it failed.
uname -a
Linux localhost 3.18.14-14961013-QB26445291 #1 SMP PREEMPT Mon Oct 7 20:55:19 KST 2019 armv8l Android
When ran on system with low amount of memory available build does not work, because of hardcoded -j4
flag in Makefile
(many g++ processes begin to eat memory, and lunix starts to swap memory very hard, which leads to system hanging or even OOM-killer waking up). I suggest removing MAKEFLAGS+="-j 4"
line from Makefile
, or adding some environment variable so this behavior could be disabled without editing Makefile
.
an improvement i recently made to ULOS is the usage of palette colors for the TTY's colors. however, in OCVM's T3 GPU emulation these colors are all grayscale, whereas in regular OpenComputers they are not. i suspect it's simply not writing the colors to where they need to be written.
i use ocvm for most of my opencomputers work so i'd greatly appreciate if this was fixed.
If i try to install the GUI Lib the installation hangs and uses 100% of one core.
no error is thrown, might be relatet to emulation of OCEmu as the install works there after a few secs but drawing is much slower than an installtion in minecraft. got about 3 fps
im on arch linux i compiled it and when i run it it just clears the terminal
I successfully built ocvm and started it, but it only cleared the terminal and exited out. When running it with --frame=basic
it says:
failed to initialize: filesystem
I already tried installing luafilesystem
with luarocks, but it didn't help.
__
Whenever I try to build OCVM, it says it can't find Lua 5.2 even though it is installed.
Package lua5.2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua5.2.pc'
to the PKG_CONFIG_PATH environment variable
Package 'lua5.2', required by 'virtual:world', not found
g++ -g --std=c++17 -Wall -I. -MMD -c main.cpp -o bin/main.o
In file included from model/client.h:2:0,
from main.cpp:4:
model/value.h:7:10: fatal error: lua.hpp: No such file or directory
#include <lua.hpp>
^~~~~~~~~
compilation terminated.
make: *** [Makefile:69: bin/main.o] Error 1
EDIT: Tried building on Ubuntu, still the same error even though both Lua 5.2 and 5.3 are installed.
So, I was compiling thin emulator, but it stopped with this error:
[root@localhost ocvm]# make g++ ./bin/./main.cpp.o ./bin/./apis/native-lua.cpp.o ./bin/./apis/os.cpp.o ./bin/./apis/system.cpp.o ./bin/./apis/unicode.cpp.o ./bin/./apis/userdata.cpp.o ./bin/./color/color_map.cpp.o ./bin/./components/component.cpp.o ./bin/./components/computer.cpp.o ./bin/./components/data_card.cpp.o ./bin/./components/drive.cpp.o ./bin/./components/eeprom.cpp.o ./bin/./components/filesystem.cpp.o ./bin/./components/gpu.cpp.o ./bin/./components/internet.cpp.o ./bin/./components/keyboard.cpp.o ./bin/./components/modem.cpp.o ./bin/./components/sandbox.cpp.o ./bin/./components/screen.cpp.o ./bin/./drivers/ansi.cpp.o ./bin/./drivers/ansi_escape.cpp.o ./bin/./drivers/basic_term.cpp.o ./bin/./drivers/connection.cpp.o ./bin/./drivers/factory_shell.cpp.o ./bin/./drivers/fs_utils.cpp.o ./bin/./drivers/internet_drv.cpp.o ./bin/./drivers/internet_http.cpp.o ./bin/./drivers/kb_data.cpp.o ./bin/./drivers/kb_drv.cpp.o ./bin/./drivers/modem_drv.cpp.o ./bin/./drivers/mouse_drv.cpp.o ./bin/./drivers/raw_tty.cpp.o ./bin/./drivers/server_pool.cpp.o ./bin/./drivers/term_buffer.cpp.o ./bin/./drivers/worker.cpp.o ./bin/./io/frame.cpp.o ./bin/./model/client.cpp.o ./bin/./model/config.cpp.o ./bin/./model/host.cpp.o ./bin/./model/log.cpp.o ./bin/./model/luaproxy.cpp.o ./bin/./model/prof_log.cpp.o ./bin/./model/value.cpp.o ./bin/./util/crc32.cpp.o ./bin/./util/md5.cpp.o -o ocvm -llua5.2 -lstdc++ -lstdc++fs -pthread -ldl
/bin/ld: cannot find -llua5.2: No such file or directory collect2: error: ld returned 1 exit status make: *** [Makefile:54: ocvm] Error 1
In client.cfg
I put the following:
{"computer", nil, 2097152},
That should give the emulator 2048K (2x tier 3.5 memory)
But it still gives me 1024K:
╒══════════════════════════════════════════════════════════╕
│ OpenOS 1.7.2 (1024k RAM) │
│ Most programs can be interrupted by pressing Ctrl+Alt+C. │
└──────────────────────────────────────────────────────────┘
And therefore, I can't install MineOS:
/home # pastebin run 0nm5b1ju
Downloading from pastebin.com... success.
Saved data to /tmp/1379293644
Running...
Downloading MineOS installer...
Low-tier screen detected: MineOS requires Tier 3 screen to work properly.
Not enough RAM: MineOS requires at least 2MB (2x Tier 3.5 RAM modules) to work properly.
im building it on fully up to date arch linux and i get this error when the wget is tried
when attempting to make
on Arch, I get the following:
g++ -g --std=c++17 -Wall bin/main.o bin/apis/unicode.o bin/apis/userdata.o bin/apis/os.o bin/apis/system.o bin/components/keyboard.o bin/components/eeprom.o bin/components/filesystem.o bin/components/component.o bin/components/screen.o bin/components/internet.o bin/components/modem.o bin/components/gpu.o bin/components/sandbox.o bin/components/computer.o bin/io/frame.o bin/drivers/connection.o bin/drivers/internet_http.o bin/drivers/fs_utils.o bin/drivers/factory_shell.o bin/drivers/ansi_escape.o bin/drivers/modem_drv.o bin/drivers/worker.o bin/drivers/kb_drv.o bin/drivers/basic_term.o bin/drivers/raw_tty.o bin/drivers/internet_drv.o bin/drivers/ansi.o bin/drivers/mouse_drv.o bin/drivers/term_buffer.o bin/drivers/kb_data.o bin/color/color_map.o bin/model/host.o bin/model/value.o bin/model/luaproxy.o bin/model/client.o bin/model/config.o bin/model/log.o bin/model/prof_log.o -llua5.2 -lstdc++ -lstdc++fs -pthread -ldl -o ocvm
/usr/bin/ld: bin/apis/userdata.o: in function `UserDataApi::invoke(lua_State*)':
/home/lizzy/Projects/ocvm/apis/userdata.cpp:48: undefined reference to `lua_rotate'
/usr/bin/ld: /home/lizzy/Projects/ocvm/apis/userdata.cpp:50: undefined reference to `lua_rotate'
/usr/bin/ld: /home/lizzy/Projects/ocvm/apis/userdata.cpp:54: undefined reference to `lua_rotate'
/usr/bin/ld: bin/model/client.o: in function `Client::component_invoke(lua_State*)':
/home/lizzy/Projects/ocvm/model/client.cpp:240: undefined reference to `lua_rotate'
/usr/bin/ld: /home/lizzy/Projects/ocvm/model/client.cpp:242: undefined reference to `lua_rotate'
/usr/bin/ld: bin/model/client.o:/home/lizzy/Projects/ocvm/model/client.cpp:250: more undefined references to `lua_rotate' follow
collect2: error: ld returned 1 exit status
make: *** [Makefile:54: ocvm] Error 1
When trying with the lua=5.3
argument, I get the same
Lua packages I have installed:
lua 5.3.5-1
lua-lgi 0.9.2-1
lua52 5.2.4-2
lua52-filesystem 1.7.0.2-1
lua52-sec 2:0.6-2
lua52-socket 20160311-1
luarocks5.2 2.4.4-1
GCC packages:
gcc 8.2.1+20180831-1
gcc-libs 8.2.1+20180831-1
gcc54 5.4.1-1
gcc7 7.3.1+20180814-1
gcc7-libs 7.3.1+20180814-1
lib32-gcc-libs 8.2.1+20180831-1
This is the one missing component.
Is it possible to make ocvm not close, but display the EEPROM error screen as PC in OpenComputers?
When trying to compile in linux there is the following error:
g++: error: ../lua-5.3.4/src/liblua.a: File or directory not found
make: *** [Makefile:39: ocvm] Error 1
Certain functions truncate at null characters when marshaling strings between Lua and C++. Both std::string
and Lua strings may contain null characters, and this is relied on heavily when dealing with binary data in Lua. At least ValuePack::push_ret
and Value::checkArg<string>
do this, but I haven't had time to check the whole codebase.
I discovered this while implementing the datacard, thinking my cryptography library was broken. I'll submit a fix for the issues affecting that shortly.
Hi,
I'm trying to package this for nixos. On nixos application paths are read only and their closures are tight: that is, they only have access to other dependencies if they are declared on the package recipe. I've made a first version of the package definition, though I had to patch some files: see https://gitlab.com/roosemberth/dotfiles/commit/60b6bb4355b96207aa9eb57d4299465ca2343db5
However, when I run OpenOS I can't modify nor create any files: client.cfg
references files provided by the package (ie. system
), which are located in the nix-store (which is read only).
I think we could also copy system
when we copy the template client.cfg
.
Bonus points: move the template client.cfg
and system
into a resources-like folder (e.g. lib/
) (see my patch above).
PS: Looks like a great project, I'm looking forward using it for my CI :)
EDIT: Bonus points (2): Move binaries to the bin dir :)
I've installed ocvm on my computer (Ubuntu 22.04 LTS, G++ 11.2.0, Lua 5.3, if that's helpful), built without a problem. But when trying to run the ./ocvm
executable, the terminal clears and returns immediately, and the log file contains:
config [client]: table: {
["components"]={
{"screen","67c66973-51ff-4aec-29cd-baabf2fbe346",},
{"gpu","cf5810e1-e601-1c6a-eb8c-1f369cb85f52",44800,},
{"eeprom","f58c303c-9c59-e5d0-a22c-610717398be7",4096,256,"EEPROM",},
{"computer","919bc877-9de4-e188-7100-be0db91d5fae",1048576,},
{"filesystem","a98fea45-e9cf-158b-fc76-9213af1dfa40","system/loot/openos","OpenOS",},
{"filesystem","af962782-28b2-05d8-6cd2-5227af9b5c21",true,"tmpfs",},
{"filesystem","b93ef4f8-aec4-81bf-b16c-e95f45a74ef4",},
{"keyboard","3d757766-287c-3e94-4f90-bcfe2b1820e5","67c66973-51ff-4aec-29cd-baabf2fbe346",},
{"modem","5614dd04-d85f-c389-cbac-e81054360591",56000,8192,8,},
{"internet","ac7cf7d4-f835-6847-c524-46f13d66d693",true,true,},
{"data","7ab39852-125b-dbdd-08c4-ee5cfaf3eda6",["tier"]=1,},
{"drive","6fe57a67-1ae3-afe0-07f5-d1445ba7d8d5",},
{"sandbox","5a70276d-cb02-4ad3-c638-2fc12b1d679a",},
},
["system"]={["allowBytecode"]=false,["allowGC"]=false,["maxTcpConnections"]=4,["timeout"]=math.huge,},
}
screen: ready
gpu: ready
eeprom: ready
computer: ready
filesystem: ready
filesystem: ready
filesystem: ready
keyboard: ready
modem: ready
internet: ready
data: ready
drive: ready
sandbox: ready
components loaded: 13
machine thread created
machine function loaded
components post initialized
kernal panic, failed to detect thread in stack
lua env baseline: 136833
lua env closed
computer peek memory: 0
When I try and run in in WSL normally it gives me this error:
critical failure: could not set raw mode
skye@Skye-ThinkPad:~$ CF#CB"C>!C<!
The weird text at the bottom is typed when I move the mouse.
However, weirdly enough OCVM works fine when I use tmux
then launch OCVM from inside that.
Offending code:
local address, proxy = computer.getBootAddress(), component.invoke
local rootfs = component.proxy(address)
local handle = assert(rootfs.open("/boot/bootmgr.lua"))
local data = ""
-- hangs in this loop, generates 'basic_string::_M_construct null not valid' error on TLWOY
repeat
local chunk = rootfs.read(handle, math.huge) -- value of 2048 behaves the same
data = data .. (chunk or "")
until not chunk
rootfs.close(handle)
assert(xpcall(assert(load(data, "=OpenNT Boot Manager", "bt", _G)), debug.traceback, address))
This is a very weird error. The following code works perfectly.
local addr, invoke = computer.getBootAddress(), component.invoke
local kernelPath = "/boot/bootmgr.lua"
local handle, err = invoke(addr, "open", kernelPath)
if not handle then
error(err)
end
local t = ""
repeat
local c = invoke(addr, "read", handle, math.huge)
t = t .. (c or "")
until not c
invoke(addr, "close", handle)
local ok, err = load(t, "=" .. kernelPath, "bt", _G)
if not ok then
kernel.logger.panic(err)
end
local ok, err = xpcall(ok, debug.traceback, addr)
if not ok and err then
error(err)
end
When I run ./ocvm
it just clears the terminal.
The only strange thing about my install was I got an error saying couldn't find lua.h, but I fixed it by install liblua5.2-dev
.
make
did install the system files, and I did also try with manually installing it but same result.
I am using Kubuntu 23.04 6.2.0-27-generic
If the program exits due to an error with /proc/self/exe or other low-level initalisation bits, there's nothing in place to reset the cursor's visibility and other changes needed for a decent console experience.
There are so many errors here I don't really care to look through them and separate them out.
0 LoganDark ~/ocvm env PKG_CONFIG_PATH=/usr/local/Cellar/lua/5.2.4_4/lib/pkgconfig/ make
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c main.cpp -o bin/main.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c apis/os.cpp -o bin/apis/os.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c apis/system.cpp -o bin/apis/system.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c apis/unicode.cpp -o bin/apis/unicode.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c apis/userdata.cpp -o bin/apis/userdata.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c components/component.cpp -o bin/components/component.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c components/computer.cpp -o bin/components/computer.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c components/eeprom.cpp -o bin/components/eeprom.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c components/filesystem.cpp -o bin/components/filesystem.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c components/gpu.cpp -o bin/components/gpu.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c components/internet.cpp -o bin/components/internet.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c components/keyboard.cpp -o bin/components/keyboard.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c components/modem.cpp -o bin/components/modem.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c components/sandbox.cpp -o bin/components/sandbox.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c components/screen.cpp -o bin/components/screen.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c io/frame.cpp -o bin/io/frame.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c drivers/ansi.cpp -o bin/drivers/ansi.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c drivers/ansi_escape.cpp -o bin/drivers/ansi_escape.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c drivers/basic_term.cpp -o bin/drivers/basic_term.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c drivers/connection.cpp -o bin/drivers/connection.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c drivers/factory_shell.cpp -o bin/drivers/factory_shell.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c drivers/fs_utils.cpp -o bin/drivers/fs_utils.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c drivers/internet_drv.cpp -o bin/drivers/internet_drv.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c drivers/kb_data.cpp -o bin/drivers/kb_data.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c drivers/kb_drv.cpp -o bin/drivers/kb_drv.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c drivers/modem_drv.cpp -o bin/drivers/modem_drv.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c drivers/mouse_drv.cpp -o bin/drivers/mouse_drv.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c drivers/raw_tty.cpp -o bin/drivers/raw_tty.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c drivers/term_buffer.cpp -o bin/drivers/term_buffer.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c drivers/worker.cpp -o bin/drivers/worker.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c color/color_map.cpp -o bin/color/color_map.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c model/client.cpp -o bin/model/client.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c model/config.cpp -o bin/model/config.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c model/host.cpp -o bin/model/host.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c model/log.cpp -o bin/model/log.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c model/luaproxy.cpp -o bin/model/luaproxy.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c model/prof_log.cpp -o bin/model/prof_log.o
c++ -g --std=c++14 -Wall -I/usr/local/opt/lua/include -I. -MMD -c model/value.cpp -o bin/model/value.o
In file included from drivers/ansi.cpp:2:
./color/color_types.h:5:1: warning: 'Color' defined as a struct here but previously declared as a class
[-Wmismatched-tags]
struct Color
^
drivers/ansi.h:7:1: note: did you mean struct here?
class Color;
^~~~~
struct
drivers/worker.cpp:76:12: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
return std::move(unique_lock<mutex> (_m));
^
drivers/worker.cpp:76:12: note: remove std::move call here
return std::move(unique_lock<mutex> (_m));
^~~~~~~~~~ ~
1 warning generated.
In file included from drivers/ansi_escape.cpp:12:
drivers/ansi.h:7:1: warning: class 'Color' was previously declared as a struct [-Wmismatched-tags]
class Color;
^
./color/color_types.h:5:8: note: previous use is here
struct Color
^
drivers/ansi.h:7:1: note: did you mean struct here?
class Color;
^~~~~
struct
components/filesystem.cpp:41:13: warning: 'this' pointer cannot be null in well-defined C++ code; comparison may be
assumed to always evaluate to false [-Wtautological-undefined-compare]
if (this == nullptr || _fs == nullptr)
^~~~ ~~~~~~~
model/prof_log.cpp:12:12: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
return std::move(ofstream(filename, append ? fstream::app : fstream::out));
^
model/prof_log.cpp:12:12: note: remove std::move call here
return std::move(ofstream(filename, append ? fstream::app : fstream::out));
^~~~~~~~~~ ~
1 warning generated.
drivers/fs_utils.cpp:109:21: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
*pOutData = std::move(static_cast<stringstream const&>(stringstream() << file.rdbuf()).str());
^
drivers/fs_utils.cpp:109:21: note: remove std::move call here
*pOutData = std::move(static_cast<stringstream const&>(stringstream() << file.rdbuf()).str());
^~~~~~~~~~ ~
In file included from drivers/raw_tty.cpp:22:
In file included from ./drivers/ansi_escape.h:3:
In file included from ./io/frame.h:14:
./color/color_types.h:5:1: warning: 'Color' defined as a struct here but previously declared as a class
[-Wmismatched-tags]
struct Color
^
drivers/ansi.h:7:1: note: did you mean struct here?
class Color;
^~~~~
struct
drivers/raw_tty.cpp:48:15: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
_kb_drv = std::move(KeyboardTerminalDriver::create(hasMasterTty()));
^
drivers/raw_tty.cpp:48:15: note: remove std::move call here
_kb_drv = std::move(KeyboardTerminalDriver::create(hasMasterTty()));
^~~~~~~~~~ ~
components/gpu.cpp:544:33: warning: braces around scalar initializer [-Wbraced-scalar-init]
it->value = {" "};
^~~~~
drivers/ansi_escape.cpp:58:9: error: use of undeclared identifier 'sigtimedwait'
if (sigtimedwait(&g_sigset, nullptr, &timeout) == SIGWINCH) // winched
^
In file included from drivers/raw_tty.cpp:1:
In file included from drivers/raw_tty.h:3:
In file included from drivers/mouse_drv.h:3:
In file included from ./io/event.h:3:
In file included from /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/vector:266:
In file included from /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__bit_reference:15:
In file included from /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:643:
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2285:5: warning:
delete called on 'KeyboardTerminalDriver' that is abstract but has non-virtual destructor
[-Wdelete-non-virtual-dtor]
delete __ptr;
^
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2598:7: note:
in instantiation of member function 'std::__1::default_delete<KeyboardTerminalDriver>::operator()' requested here
__ptr_.second()(__tmp);
^
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2552:19: note:
in instantiation of member function 'std::__1::unique_ptr<KeyboardTerminalDriver,
std::__1::default_delete<KeyboardTerminalDriver> >::reset' requested here
~unique_ptr() { reset(); }
^
drivers/raw_tty.cpp:48:25: note: in instantiation of member function 'std::__1::unique_ptr<KeyboardTerminalDriver,
std::__1::default_delete<KeyboardTerminalDriver> >::~unique_ptr' requested here
_kb_drv = std::move(KeyboardTerminalDriver::create(hasMasterTty()));
^
1 warning and 1 error generated.
make: *** [bin/drivers/ansi_escape.o] Error 1
make: *** Waiting for unfinished jobs....
drivers/raw_tty.cpp:29:22: warning: unused variable '_original_kb_mode' [-Wunused-variable]
static unsigned long _original_kb_mode = 0;
^
In file included from components/modem.cpp:1:
In file included from components/modem.h:3:
In file included from components/component.h:5:
./model/value.h:176:48: error: no matching function for call to 'push_ret'
return ValuePack::push_ret(lua, arg) + ValuePack::push_ret(lua, args...);
^~~~~~~~~~~~~~~~~~~
./model/value.h:98:27: note: in instantiation of function template specialization 'ValuePack::push_ret<unsigned long>'
requested here
return ValuePack::push_ret(lua, args...);
^
components/modem.cpp:182:23: note: in instantiation of function template specialization 'ValuePack::ret<unsigned long>'
requested here
return ValuePack::ret(lua, _maxPacketSize);
^
./model/value.h:174:23: note: candidate function template not viable: requires at least 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, const T& arg, const Ts&... args)
^
./model/value.h:101:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, bool arg)
^
./model/value.h:107:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, int32_t arg)
^
./model/value.h:113:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, uint32_t arg)
^
./model/value.h:119:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, int64_t arg)
^
./model/value.h:125:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, uint64_t arg)
^
./model/value.h:131:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, double arg)
^
./model/value.h:137:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, float arg)
^
./model/value.h:143:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, const string& arg)
^
./model/value.h:149:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, const char* arg)
^
./model/value.h:155:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, const void* arg)
^
./model/value.h:161:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, const vector<char>& arg)
^
./model/value.h:167:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, const Value& v)
^
In file included from apis/unicode.cpp:1:
In file included from apis/unicode.h:2:
In file included from ./model/luaproxy.h:7:
./model/value.h:176:48: error: no matching function for call to 'push_ret'
return ValuePack::push_ret(lua, arg) + ValuePack::push_ret(lua, args...);
^~~~~~~~~~~~~~~~~~~
./model/value.h:98:27: note: in instantiation of function template specialization 'ValuePack::push_ret<unsigned long>'
requested here
return ValuePack::push_ret(lua, args...);
^
apis/unicode.cpp:375:23: note: in instantiation of function template specialization 'ValuePack::ret<unsigned long>'
requested here
return ValuePack::ret(lua, wlen(Value::checkArg<vector<char>>(lua, 1)));
^
./model/value.h:174:23: note: candidate function template not viable: requires at least 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, const T& arg, const Ts&... args)
^
./model/value.h:101:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, bool arg)
^
./model/value.h:107:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, int32_t arg)
^
./model/value.h:113:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, uint32_t arg)
^
./model/value.h:119:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, int64_t arg)
^
./model/value.h:125:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, uint64_t arg)
^
./model/value.h:131:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, double arg)
^
./model/value.h:137:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, float arg)
^
./model/value.h:143:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, const string& arg)
^
./model/value.h:149:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, const char* arg)
^
./model/value.h:155:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, const void* arg)
^
./model/value.h:161:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, const vector<char>& arg)
^
./model/value.h:167:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, const Value& v)
^
1 error generated.
1 warning generated.
make: *** [bin/apis/unicode.o] Error 1
In file included from drivers/kb_drv.cpp:1:
In file included from drivers/kb_drv.h:3:
In file included from ./io/event.h:3:
In file included from /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/vector:266:
In file included from /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__bit_reference:15:
In file included from /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:643:
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2285:5: warning:
delete called on non-final 'KeyboardLocalRawTtyDriver' that has virtual functions but non-virtual destructor
[-Wdelete-non-virtual-dtor]
delete __ptr;
^
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2598:7: note:
in instantiation of member function 'std::__1::default_delete<KeyboardLocalRawTtyDriver>::operator()' requested
here
__ptr_.second()(__tmp);
^
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2552:19: note:
in instantiation of member function 'std::__1::unique_ptr<KeyboardLocalRawTtyDriver,
std::__1::default_delete<KeyboardLocalRawTtyDriver> >::reset' requested here
~unique_ptr() { reset(); }
^
drivers/kb_drv.cpp:241:16: note: in instantiation of member function 'std::__1::unique_ptr<KeyboardLocalRawTtyDriver,
std::__1::default_delete<KeyboardLocalRawTtyDriver> >::~unique_ptr' requested here
return std::make_unique<KeyboardLocalRawTtyDriver>();
^
In file included from drivers/kb_drv.cpp:1:
In file included from drivers/kb_drv.h:3:
In file included from ./io/event.h:3:
In file included from /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/vector:266:
In file included from /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__bit_reference:15:
In file included from /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:643:
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2285:5: warning:
delete called on 'KeyboardTerminalDriver' that is abstract but has non-virtual destructor
[-Wdelete-non-virtual-dtor]
delete __ptr;
^
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2598:7: note:
in instantiation of member function 'std::__1::default_delete<KeyboardTerminalDriver>::operator()' requested here
__ptr_.second()(__tmp);
^
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2552:19: note:
in instantiation of member function 'std::__1::unique_ptr<KeyboardTerminalDriver,
std::__1::default_delete<KeyboardTerminalDriver> >::reset' requested here
~unique_ptr() { reset(); }
^
drivers/kb_drv.cpp:241:16: note: in instantiation of member function 'std::__1::unique_ptr<KeyboardTerminalDriver,
std::__1::default_delete<KeyboardTerminalDriver> >::~unique_ptr' requested here
return std::make_unique<KeyboardLocalRawTtyDriver>();
^
In file included from drivers/kb_drv.cpp:1:
In file included from drivers/kb_drv.h:3:
In file included from ./io/event.h:3:
In file included from /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/vector:266:
In file included from /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__bit_reference:15:
In file included from /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:643:
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2285:5: warning:
delete called on non-final 'KeyboardPtyDriver' that has virtual functions but non-virtual destructor
[-Wdelete-non-virtual-dtor]
delete __ptr;
^
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2598:7: note:
in instantiation of member function 'std::__1::default_delete<KeyboardPtyDriver>::operator()' requested here
__ptr_.second()(__tmp);
^
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2552:19: note:
in instantiation of member function 'std::__1::unique_ptr<KeyboardPtyDriver,
std::__1::default_delete<KeyboardPtyDriver> >::reset' requested here
~unique_ptr() { reset(); }
^
drivers/kb_drv.cpp:243:16: note: in instantiation of member function 'std::__1::unique_ptr<KeyboardPtyDriver,
std::__1::default_delete<KeyboardPtyDriver> >::~unique_ptr' requested here
return std::make_unique<KeyboardPtyDriver>();
^
In file included from components/filesystem.cpp:1:
In file included from components/filesystem.h:2:
In file included from components/component.h:5:
./model/value.h:176:48: error: no matching function for call to 'push_ret'
return ValuePack::push_ret(lua, arg) + ValuePack::push_ret(lua, args...);
^~~~~~~~~~~~~~~~~~~
./model/value.h:98:27: note: in instantiation of function template specialization 'ValuePack::push_ret<unsigned long>'
requested here
return ValuePack::push_ret(lua, args...);
^
components/filesystem.cpp:564:23: note: in instantiation of function template specialization
'ValuePack::ret<unsigned long>' requested here
return ValuePack::ret(lua, fs_utils::size(path() + clean(filepath, true, false)));
^
./model/value.h:174:23: note: candidate function template not viable: requires at least 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, const T& arg, const Ts&... args)
^
./model/value.h:101:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, bool arg)
^
./model/value.h:107:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, int32_t arg)
^
./model/value.h:113:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, uint32_t arg)
^
./model/value.h:119:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, int64_t arg)
^
./model/value.h:125:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, uint64_t arg)
^
./model/value.h:131:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, double arg)
^
./model/value.h:137:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, float arg)
^
./model/value.h:143:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, const string& arg)
^
./model/value.h:149:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, const char* arg)
^
./model/value.h:155:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, const void* arg)
^
./model/value.h:161:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, const vector<char>& arg)
^
./model/value.h:167:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, const Value& v)
^
In file included from components/computer.cpp:1:
components/computer.h:68:12: warning: private field '_nexttrace' is not used [-Wunused-private-field]
double _nexttrace = 0;
^
In file included from drivers/internet_drv.cpp:1:
In file included from drivers/internet_drv.h:3:
In file included from ./apis/userdata.h:3:
In file included from ./model/luaproxy.h:7:
./model/value.h:176:48: error: no matching function for call to 'push_ret'
return ValuePack::push_ret(lua, arg) + ValuePack::push_ret(lua, args...);
^~~~~~~~~~~~~~~~~~~
./model/value.h:98:27: note: in instantiation of function template specialization 'ValuePack::push_ret<unsigned long>'
requested here
return ValuePack::push_ret(lua, args...);
^
drivers/internet_drv.cpp:249:23: note: in instantiation of function template specialization
'ValuePack::ret<unsigned long>' requested here
return ValuePack::ret(lua, buffer.size());
^
./model/value.h:174:23: note: candidate function template not viable: requires at least 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, const T& arg, const Ts&... args)
^
./model/value.h:101:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, bool arg)
^
./model/value.h:107:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, int32_t arg)
^
./model/value.h:113:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, uint32_t arg)
^
./model/value.h:119:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, int64_t arg)
^
./model/value.h:125:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, uint64_t arg)
^
./model/value.h:131:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, double arg)
^
./model/value.h:137:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, float arg)
^
./model/value.h:143:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, const string& arg)
^
./model/value.h:149:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, const char* arg)
^
./model/value.h:155:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, const void* arg)
^
./model/value.h:161:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, const vector<char>& arg)
^
./model/value.h:167:23: note: candidate function not viable: requires 2 arguments, but 1 was provided
inline static int push_ret(lua_State* lua, const Value& v)
^
1 warning and 1 error generated.
make: *** [bin/components/filesystem.o] Error 1
4 warnings generated.
1 error generated.
make: *** [bin/components/modem.o] Error 1
1 error generated.
make: *** [bin/drivers/internet_drv.o] Error 1
In file included from model/client.cpp:1:
model/client.h:55:21: warning: private field '_globals' is not used [-Wunused-private-field]
SandboxMethods* _globals;
^
3 warnings generated.
1 warning generated.
1 warning generated.
1 warning generated.
1 warning generated.
I noticed this recently on my laptop. Calling computer.shutdown()
from inside the Lua environment will not cause ocvm ro exit. It won't reboot either.
There is a Simple repo here -- this causes fuschia's installer to not run properly,and instead hang ocvm if there's no tlwy configured, and tlwy otherwise.
This can be fixed by adding time.h
and sys/select.h
as imports to drivers/raw_tty.cpp
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.