udevbe / greenfield

HTML5 Wayland compositor :seedling:
GNU Affero General Public License v3.0
913 stars 28 forks source link

Unable to build on ArchLinux #89

Closed t123yh closed 2 years ago

t123yh commented 2 years ago

Hi udevbe,

I'm getting a build error trying to build the proxy part of Greenfield.

Seems that libwayland-server.so is somehow missing. After copying libwayland-server.so from /usr/lib to the specified path below, it builds, but when a Wayland client connects, a SIGSEGV is received.

I can provide ssh of my test server for you if you would like to investigate further.

[root@Wayland-test compositor-proxy]# yarn build:native
yarn run v1.22.17
$ cmake-js
[
  '/usr/bin/node',
  '/root/greenfield/compositor-proxy/node_modules/.bin/cmake-js'
]
info TOOL Using Unix Makefiles generator.
info CMD CONFIGURE
info RUN [
info RUN   'cmake',
info RUN   '/root/greenfield/compositor-proxy',
info RUN   '--no-warn-unused-cli',
info RUN   '-G',
info RUN   'Unix Makefiles',
info RUN   '-DCMAKE_JS_VERSION=6.2.1',
info RUN   '-DCMAKE_BUILD_TYPE=Release',
info RUN   '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/root/greenfield/compositor-proxy/build/Release',
info RUN   '-DCMAKE_JS_INC=/root/.cmake-js/node-x64/v17.2.0/include/node;/root/greenfield/compositor-proxy/node_modules/nan',
info RUN   '-DCMAKE_JS_SRC=',
info RUN   '-DNODE_RUNTIME=node',
info RUN   '-DNODE_RUNTIMEVERSION=17.2.0',
info RUN   '-DNODE_ARCH=x64'
info RUN ]
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 11.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found GLIB2: /usr/lib/libglib-2.0.so
-- Found GStreamer: GSTREAMER_INCLUDE_DIRS;GSTREAMER_LIBRARIES;GSTREAMER_VERSION;GSTREAMER_BASE_INCLUDE_DIRS;GSTREAMER_BASE_LIBRARIES;GSTREAMER_GSTREAMER-APP_INCLUDE_DIRS;GSTREAMER_GSTREAMER-APP_LIBRARIES;GSTREAMER_GSTREAMER-VIDEO_INCLUDE_DIRS;GSTREAMER_GSTREAMER-VIDEO_LIBRARIES (found version "1.18.5")
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.0")
-- Configuring done
-- Generating done
-- Build files have been written to: /root/greenfield/compositor-proxy/build
info CMD BUILD
info RUN [
info RUN   'cmake',
info RUN   '--build',
info RUN   '/root/greenfield/compositor-proxy/build',
info RUN   '--config',
info RUN   'Release'
info RUN ]
[ 25%] Building C object CMakeFiles/app-endpoint-encoding.dir/native/src/node_encoder.c.o
[ 50%] Building C object CMakeFiles/app-endpoint-encoding.dir/native/src/gst_encoder.c.o
[ 75%] Building C object CMakeFiles/app-endpoint-encoding.dir/native/src/gst_main_loop.c.o
make[2]: *** No rule to make target '../node_modules/westfield-endpoint/src/libwayland-server.so', needed by '../dist/encoding/app-endpoint-encoding.node'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/app-endpoint-encoding.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
ERR! OMG Process terminated: 2
error Command failed with exit code 1.
Zubnix commented 2 years ago

The compositor proxy uses a patched wayland server so you can’t simply use the system wayland server. The patched wayland server should have been build automatically when you run yarn install and should be located at the path indicated by the error you get.

Zubnix commented 2 years ago

Could you try deleting your node_modules directory and show me the logs of yarn install?

t123yh commented 2 years ago

Hi Zubnix,

Thank you very much for your reply! The building procedure completed successfully after I removed node_modules and tried again. I think this is because I haven't installed wayland before my first attempt to run yarn install.

However, I can still see nothing on the webpage after I clicked connect. The log from proxy are showing that both Wayland and WebSocket is connected, and gnome-terminal does run without any error logs, but I can see nothing on the web page.