Unable to build tinywl on Ubuntu Cosmic #1463
Comments
Tinywl has improper gcc flag ordering. Its tinywl: tinywl.c xdg-shell-protocol.h xdg-shell-protocol.c
$(CC) $(CFLAGS) \
-I /usr/include \
-g -Werror -I. \
-DWLR_USE_UNSTABLE \
-o $@ $< \ # <-- this line switched with
$(LIBS) # <-- this line and it now builds accordingly; however, there is a new error when running: $ LD_LIBRARY_PATH=/usr/local/lib/x86_64-linux-gnu ./tinywl
2019-01-16 10:20:43 - [backend/session/direct-ipc.c:47] Do not have root privileges; cannot become DRM master
2019-01-16 10:20:43 - [backend/session/session.c:91] Failed to load session backend
2019-01-16 10:20:43 - [backend/backend.c:265] Failed to start a DRM session
Segmentation fault (core dumped) Tinywl should be choosing the X11 backend but instead it's choosing DRM. I tried opening
|
This seems wrong.
Is |
Yes:
|
Can confirm that the order works. See also https://eli.thegreenplace.net/2013/07/09/library-order-in-static-linking. The linker first looks at tinywl.o for the symbols that it needs, then in -lwayland-server etc. It doesn't keep track of the symbols provided by preceding libs. |
You're right. Can you send a PR? |
Done! #1471 |
This issue isn't completely fixed:
Can you try rootston? Never run a Wayland compositor with |
My bad, sorry |
Attempt to run rootston:
|
@georgewsinger See https://github.com/swaywm/sway/wiki/Running-Sway-without-systemd |
@ascent12 I'm running Unbuntu Cosmic 18.10, so should have systemd, no? Do you mean this: https://github.com/swaywm/sway/wiki/Running-Sway-without-systemd#direct-via-capabilities ? |
@georgewsinger You probably compiled wlroots without logind support. That would happen if you using the auto-detection of dependencies (the default behaviour) and you don't have |
@ascent12 I'm now getting:
|
What I really need is the x11 backend enabled (I don't want to load tinywl in DRM, but in Ubuntu 18.10 against X). But when I adjust the
I get this error:
|
Don't do that, it won't work. Instead, use Meson options: |
Any updates on this? |
Your last suggestion worked 👍 |
Problem: I'm on Ubuntu Cosmic (18.10). When attempting to build
tinywl
, I get severalundefined reference
's:Dependencies
I installed
wlroots
viaand I seem to have all of the needed dependencies (in particular:
wayland-scanner
and other wayland libraries):and here are the actual wlroots libs:
with
How Makefile variables are expanding
Just to be sure, I verified in a shell that the Makefile variables are expanding as follows:
WAYLAND_PROTOCOLS := //usr/share/wayland-protocol
,WAYLAND_SCANNER := /usr/bin/wayland-scannery
, and finallyLIBS := -I/usr/local/include -I/usr/include/libdrm -I/usr/include/pixman-1 -L/usr/local/lib/x86_64-linux-gnu -lwlroots -lwayland-server -lxkbcommon
.What gives?
The text was updated successfully, but these errors were encountered: