% zig build
install
└─ install toys
└─ zig build-exe toys Debug native 29 errors
error: ld.lld: undefined symbol: libdecor_frame_translate_coordinate
note: referenced by fl_libdecor-plugins.c
note: fl_libdecor-plugins.c.o:(fl_libdecor_titlebar_buffer) in archive /usr/local/lib64/libfltk.a
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::decoration_sizes(int*, int*, int*, int*)) in archive /usr/local/lib64/libfltk.a
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(handle_close(libdecor_frame*, void*)) in archive /usr/local/lib64/libfltk.a
note: referenced 6 more times
error: ld.lld: undefined symbol: libdecor_frame_set_minimized
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::iconize()) in archive /usr/local/lib64/libfltk.a
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(handle_configure(libdecor_frame*, libdecor_configuration*, void*)) in archive /usr/local/lib64/libfltk.a
error: ld.lld: undefined symbol: libdecor_configuration_get_window_state
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(handle_configure(libdecor_frame*, libdecor_configuration*, void*)) in archive /usr/local/lib64/libfltk.a
error: ld.lld: undefined symbol: libdecor_configuration_get_content_size
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(handle_configure(libdecor_frame*, libdecor_configuration*, void*)) in archive /usr/local/lib64/libfltk.a
error: ld.lld: undefined symbol: libdecor_frame_is_visible
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(handle_configure(libdecor_frame*, libdecor_configuration*, void*)) in archive /usr/local/lib64/libfltk.a
error: ld.lld: undefined symbol: libdecor_state_new
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(handle_configure(libdecor_frame*, libdecor_configuration*, void*)) in archive /usr/local/lib64/libfltk.a
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(handle_configure(libdecor_frame*, libdecor_configuration*, void*)) in archive /usr/local/lib64/libfltk.a
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::size_range()) in archive /usr/local/lib64/libfltk.a
note: referenced 1 more times
error: ld.lld: undefined symbol: libdecor_frame_commit
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(handle_configure(libdecor_frame*, libdecor_configuration*, void*)) in archive /usr/local/lib64/libfltk.a
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::size_range()) in archive /usr/local/lib64/libfltk.a
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::resize(int, int, int, int)) in archive /usr/local/lib64/libfltk.a
error: ld.lld: undefined symbol: libdecor_frame_is_floating
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(handle_configure(libdecor_frame*, libdecor_configuration*, void*)) in archive /usr/local/lib64/libfltk.a
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::resize(int, int, int, int)) in archive /usr/local/lib64/libfltk.a
error: ld.lld: undefined symbol: libdecor_state_free
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(handle_configure(libdecor_frame*, libdecor_configuration*, void*)) in archive /usr/local/lib64/libfltk.a
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::size_range()) in archive /usr/local/lib64/libfltk.a
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::resize(int, int, int, int)) in archive /usr/local/lib64/libfltk.a
error: ld.lld: undefined symbol: libdecor_frame_set_fullscreen
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(handle_configure(libdecor_frame*, libdecor_configuration*, void*)) in archive /usr/local/lib64/libfltk.a
error: ld.lld: undefined symbol: libdecor_frame_get_xdg_toplevel
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(handle_configure(libdecor_frame*, libdecor_configuration*, void*)) in archive /usr/local/lib64/libfltk.a
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::fullscreen_off(int, int, int, int)) in archive /usr/local/lib64/libfltk.a
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::fullscreen_on()) in archive /usr/local/lib64/libfltk.a
note: referenced 13 more times
error: ld.lld: undefined symbol: libdecor_frame_set_visibility
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(handle_configure(libdecor_frame*, libdecor_configuration*, void*)) in archive /usr/local/lib64/libfltk.a
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(handle_configure(libdecor_frame*, libdecor_configuration*, void*)) in archive /usr/local/lib64/libfltk.a
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::use_border()) in archive /usr/local/lib64/libfltk.a
error: ld.lld: undefined symbol: libdecor_frame_get_content_width
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(handle_configure(libdecor_frame*, libdecor_configuration*, void*)) in archive /usr/local/lib64/libfltk.a
error: ld.lld: undefined symbol: libdecor_frame_get_content_height
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(handle_configure(libdecor_frame*, libdecor_configuration*, void*)) in archive /usr/local/lib64/libfltk.a
error: ld.lld: undefined symbol: libdecor_frame_set_min_content_size
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(handle_configure(libdecor_frame*, libdecor_configuration*, void*)) in archive /usr/local/lib64/libfltk.a
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::size_range()) in archive /usr/local/lib64/libfltk.a
error: ld.lld: undefined symbol: libdecor_unref
note: referenced by Fl_Wayland_Screen_Driver.cxx
note: Fl_Wayland_Screen_Driver.cxx.o:(Fl_Wayland_Screen_Driver::close_display()) in archive /usr/local/lib64/libfltk.a
error: ld.lld: undefined symbol: libdecor_frame_set_max_content_size
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(handle_configure(libdecor_frame*, libdecor_configuration*, void*)) in archive /usr/local/lib64/libfltk.a
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::size_range()) in archive /usr/local/lib64/libfltk.a
error: ld.lld: undefined symbol: libdecor_frame_get_xdg_surface
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(handle_configure(libdecor_frame*, libdecor_configuration*, void*)) in archive /usr/local/lib64/libfltk.a
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(handle_configure(libdecor_frame*, libdecor_configuration*, void*)) in archive /usr/local/lib64/libfltk.a
error: ld.lld: undefined symbol: libdecor_frame_unset_capabilities
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::size_range()) in archive /usr/local/lib64/libfltk.a
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::size_range()) in archive /usr/local/lib64/libfltk.a
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::makeWindow()) in archive /usr/local/lib64/libfltk.a
note: referenced 1 more times
error: ld.lld: undefined symbol: libdecor_frame_set_capabilities
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::size_range()) in archive /usr/local/lib64/libfltk.a
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::size_range()) in archive /usr/local/lib64/libfltk.a
error: ld.lld: undefined symbol: libdecor_frame_unref
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::hide()) in archive /usr/local/lib64/libfltk.a
error: ld.lld: undefined symbol: libdecor_frame_set_parent
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::makeWindow()) in archive /usr/local/lib64/libfltk.a
error: ld.lld: undefined symbol: libdecor_decorate
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::makeWindow()) in archive /usr/local/lib64/libfltk.a
error: ld.lld: undefined symbol: libdecor_frame_set_app_id
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::makeWindow()) in archive /usr/local/lib64/libfltk.a
error: ld.lld: undefined symbol: libdecor_frame_set_title
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::makeWindow()) in archive /usr/local/lib64/libfltk.a
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::label(char const*, char const*)) in archive /usr/local/lib64/libfltk.a
error: ld.lld: undefined symbol: libdecor_frame_map
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::makeWindow()) in archive /usr/local/lib64/libfltk.a
error: ld.lld: undefined symbol: libdecor_new
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::makeWindow()) in archive /usr/local/lib64/libfltk.a
error: ld.lld: undefined symbol: libdecor_frame_set_maximized
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::maximize()) in archive /usr/local/lib64/libfltk.a
error: ld.lld: undefined symbol: libdecor_frame_unset_maximized
note: referenced by Fl_Wayland_Window_Driver.cxx
note: Fl_Wayland_Window_Driver.cxx.o:(Fl_Wayland_Window_Driver::un_maximize()) in archive /usr/local/lib64/libfltk.a
error: the following command failed with 29 compilation errors:
/home/coleman/zig/zig build-exe -ODebug --dep toys_lib --dep zfltk -Mroot=/home/coleman/srcs/toys/src/main.zig -ODebug -Mtoys_lib=/home/coleman/srcs/toys/src/root.zig -search_paths_first_static -lcfltk -lfltk -lfltk_images -lfltk_png -lfltk_jpeg -lfltk_z -lfltk_gl -search_paths_first -lwayland-client -lwayland-cursor -lxkbcommon -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -ldbus-1 -lEGL -lwayland-egl -lwayland-client -lGL -lGLU -lOpenGL -lX11 -lXext -lXinerama -lXcursor -lXrender -lX11 -lXfixes -I/usr/include/freetype2 -I/usr/include/libpng16 -lXft -I/usr/include/freetype2 -I/usr/include/libpng16 -lfontconfig -lfreetype -I/usr/include/pango-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lharfbuzz -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -lpangoxft-1.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lharfbuzz -lfontconfig -lfreetype -lXft -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -lgobject-2.0 -lglib-2.0 -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/pixman-1 -lcairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/pixman-1 -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lharfbuzz -lcairo -ODebug -Mzfltk=/home/coleman/.cache/zig/p/zfltk-0.0.4-f3VRY1sUAgDx-bVEnwtJE_zzEQN-5vgfO_yJlQonbGcu/src/zfltk.zig -lc++ -lc --cache-dir /home/coleman/srcs/toys/.zig-cache --global-cache-dir /home/coleman/.cache/zig --name toys --zig-lib-dir /home/coleman/zig/lib/ --listen=-
Build Summary: 2/5 steps succeeded; 1 failed
install transitive failure
└─ install toys transitive failure
└─ zig build-exe toys Debug native 29 errors
error: the following build command failed with exit code 1:
/home/coleman/srcs/toys/.zig-cache/o/757671621eaa2a320e19b5ba9e2b034d/build /home/coleman/zig/zig /home/coleman/zig/lib /home/coleman/srcs/toys /home/coleman/srcs/toys/.zig-cache /home/coleman/.cache/zig --seed 0xfa52623f -Zfbdff5716a0389d4
Perhaps this issue should be opened on cfltk, but I only got errors when running
zig build.I am on a funky desktop. Void Linux with IceWM (an x11 window manager). Lots of packages installed. I think the cmake build found a Wayland package and assumed I wanted to build Wayland backend support.
cfltkbuilt fine.But
zig buildyielded an error.error log
TL;DR is: many missing symbols like the following.
After reading fltk's wayland-related README, it seems like
libdecoris only needed on wayland.My solution was to build and install
cfltkwith these adjustments. I'm not sure if cmake_options.txt updates were needed.One more thing: my original install was just a naive
sudo ./scripts/bootstrap_posix.sh.