PerBothner / DomTerm

DOM/JavaScript-based terminal-emulator/console

Home Page:https://domterm.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failure to build wry

SolarAquarion opened this issue · comments

Compiling dt-wry v2.9.5 (/build/domterm-git/src/DomTerm/dt-wry)
error[E0599]: no method named with_ipc_handler found for struct WebViewBuilder in the current scope
--> src/main.rs:141:14
|
141 | .with_ipc_handler(handler)
| ^^^^^^^^^^^^^^^^ help: there is an associated function with a similar name: with_rpc_handler

For more information about this error, try rustc --explain E0599.
error: could not compile dt-wry due to previous error

Where are you getting Wry from? Wry made a incompatible change not that long ago. I believe you need to build it from from dev or next branch.

I took another look and in the last month the 0.13.x versions have been released - most recently 0.13.3.
I updated Cargo.toml to use 0.13.3. (SInce Cargo.toml is a generated file, I actually updated configure.ac.)
Using that seems to work.

You should be able to git pull, re-run autoreconf -i, re-run configure, remove the dt-wry/target directory, and re-run make.

cp -p dt-wry/target/release/dt-wry bin
cd lws-term && make ../bin/domterm
make[2]: Entering directory '/build/domterm-git/src/DomTerm/lws-term'
g++ -DPACKAGE_NAME=\"DomTerm\" -DPACKAGE_TARNAME=\"domterm\" -DPACKAGE_VERSION=\"2.9.5\" -DPACKAGE_STRING=\"DomTerm\ 2.9.5\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"domterm\" -DVERSION=\"2.9.5\" -DHAVE_QT=1 -I.     -I./lws-term  -DRESOURCE_DIR='"../share/domterm"'   -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -flto -c -o ldomterm-server.o `test -f 'server.cc' || echo './'`server.cc
g++ -DPACKAGE_NAME=\"DomTerm\" -DPACKAGE_TARNAME=\"domterm\" -DPACKAGE_VERSION=\"2.9.5\" -DPACKAGE_STRING=\"DomTerm\ 2.9.5\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"domterm\" -DVERSION=\"2.9.5\" -DHAVE_QT=1 -I.     -I./lws-term  -DRESOURCE_DIR='"../share/domterm"'   -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -flto -c -o ldomterm-utils.o `test -f 'utils.cc' || echo './'`utils.cc
utils.cc: In function ‘void generate_random_string(char*, int)’:
utils.cc:639:14: warning: ignoring return value of ‘ssize_t getrandom(void*, size_t, unsigned int)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  639 |     getrandom(buf, nchars, 0);
      |     ~~~~~~~~~^~~~~~~~~~~~~~~~
utils.cc: In function ‘void printf_error(options*, const char*, ...)’:
utils.cc:897:10: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  897 |     write(opts->fd_err, sb.buffer, sb.len);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++ -DPACKAGE_NAME=\"DomTerm\" -DPACKAGE_TARNAME=\"domterm\" -DPACKAGE_VERSION=\"2.9.5\" -DPACKAGE_STRING=\"DomTerm\ 2.9.5\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"domterm\" -DVERSION=\"2.9.5\" -DHAVE_QT=1 -I.     -I./lws-term  -DRESOURCE_DIR='"../share/domterm"'   -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -flto -c -o ldomterm-protocol.o `test -f 'protocol.cc' || echo './'`protocol.cc
In file included from /usr/include/libwebsockets.h:358,
                 from server.h:40,
                 from protocol.cc:1:
protocol.cc: In function ‘bool reportEvent(const char*, char*, size_t, lws*, tty_client*, proxy_mode)’:
protocol.cc:1454:25: warning: field precision specifier ‘.*’ expects argument of type ‘int’, but argument 4 has type ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wformat=]
 1454 |             lwsl_notice("#%d: %.*s\n", client->connection_number,
      |                         ^~~~~~~~~~~~~
 1455 |                         dstr.length(), dstr.c_str());
      |                         ~~~~~~~~~~~~~
      |                                    |
      |                                    std::__cxx11::basic_string<char>::size_type {aka long unsigned int}
protocol.cc:1454:33: note: format string is defined here
 1454 |             lwsl_notice("#%d: %.*s\n", client->connection_number,
      |                               ~~^~
      |                                 |
      |                                 int
protocol.cc: In destructor ‘tty_client::~tty_client()’:
protocol.cc:428:22: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  428 |                 write(request->fd_out, close_response, len+1);
      |                 ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
protocol.cc: In function ‘bool reportEvent(const char*, char*, size_t, lws*, tty_client*, proxy_mode)’:
protocol.cc:1344:26: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 1344 |                     write(request->fd_out, cresult, clen); // FIXME check
      |                     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
protocol.cc: In function ‘pty_client* handle_remote(int, arglist_t, options*, tty_client*)’:
protocol.cc:2544:20: warning: ignoring return value of ‘int pipe(int*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 2544 |         (void) pipe(stderr_pipe);
      |                ~~~~^~~~~~~~~~~~~
g++ -DPACKAGE_NAME=\"DomTerm\" -DPACKAGE_TARNAME=\"domterm\" -DPACKAGE_VERSION=\"2.9.5\" -DPACKAGE_STRING=\"DomTerm\ 2.9.5\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"domterm\" -DVERSION=\"2.9.5\" -DHAVE_QT=1 -I.     -I./lws-term  -DRESOURCE_DIR='"../share/domterm"'   -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -flto -c -o ldomterm-http.o `test -f 'http.cc' || echo './'`http.cc
gcc -DPACKAGE_NAME=\"DomTerm\" -DPACKAGE_TARNAME=\"domterm\" -DPACKAGE_VERSION=\"2.9.5\" -DPACKAGE_STRING=\"DomTerm\ 2.9.5\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"domterm\" -DVERSION=\"2.9.5\" -DHAVE_QT=1 -I.     -I./lws-term  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -flto -c -o ldomterm-whereami.o `test -f 'whereami.c' || echo './'`whereami.c
g++ -DPACKAGE_NAME=\"DomTerm\" -DPACKAGE_TARNAME=\"domterm\" -DPACKAGE_VERSION=\"2.9.5\" -DPACKAGE_STRING=\"DomTerm\ 2.9.5\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"domterm\" -DVERSION=\"2.9.5\" -DHAVE_QT=1 -I.     -I./lws-term  -DRESOURCE_DIR='"../share/domterm"'   -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -flto -c -o ldomterm-commands.o `test -f 'commands.cc' || echo './'`commands.cc
commands.cc: In function ‘int simple_window_action(int, arglist_t, lws*, options*, const char*, const char*, const char*)’:
commands.cc:137:27: error: format not a string literal and no format arguments [-Werror=format-security]
  137 |         tclient->ob.printf(seq);
      |         ~~~~~~~~~~~~~~~~~~^~~~~
commands.cc: In function ‘int complete_action(int, arglist_t, lws*, options*)’:
commands.cc:1087:15: warning: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 1087 |         system(sysb);
      |         ~~~~~~^~~~~~
cc1plus: some warnings being treated as errors

Different build failure.

Hm. You've enabled more warnings than I do. There was one error in your log, and I just fixed that.
I'll take a look at the warnings in the morning.

it all builds now, thanks