Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

building wf-shell gets errors #74

Closed
caijw opened this issue Nov 15, 2020 · 6 comments
Closed

building wf-shell gets errors #74

caijw opened this issue Nov 15, 2020 · 6 comments

Comments

@caijw
Copy link

caijw commented Nov 15, 2020

I try to build wf-shell and get some errors:

~/Documents/code/wayfire_project/wf-shell(master*) » meson build --prefix=$prefix && ninja -C build && ninja -C build install

Directory already configured.

Just run your build command (e.g. ninja) and Meson will regenerate as necessary.
If ninja fails, run "ninja reconfigure" or "meson --reconfigure"
to force Meson to regenerate.

If build failures persist, run "meson setup --wipe" to rebuild from scratch
using the same options as passed when configuring the build.
To change option values, run "meson configure" instead.
ninja: Entering directory `build'
[1/2] Compiling C++ object src/background/wf-background.p/background.cpp.o
FAILED: src/background/wf-background.p/background.cpp.o 
ccache c++ -Isrc/background/wf-background.p -Isrc/background -I../src/background -Isrc/util -I../src/util -Isubprojects/gtk-layer-shell/include -I../subprojects/gtk-layer-shell/include -I/opt/wayfire/include -I/usr/include/gtkmm-3.0 -I/usr/lib/x86_64-linux-gnu/gtkmm-3.0/include -I/usr/include/atkmm-1.6 -I/usr/include/gtk-3.0/unix-print -I/usr/include/gdkmm-3.0 -I/usr/lib/x86_64-linux-gnu/gdkmm-3.0/include -I/usr/include/giomm-2.4 -I/usr/lib/x86_64-linux-gnu/giomm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/lib/x86_64-linux-gnu/pangomm-1.4/include -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/cairomm-1.0 -I/usr/lib/x86_64-linux-gnu/cairomm-1.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/local/include -I/usr/include/libevdev-1.0/ -I/usr/include/libxml2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -std=c++17 -g -DHAVE_PULSE=1 -Wno-pedantic -Wno-unused-parameter -Wno-parentheses '-DICONDIR="/opt/wayfire/share/wayfire/icons"' '-DMETADATA_DIR="/opt/wayfire/share/wayfire/metadata/wf-shell"' '-DSYSCONF_DIR="/opt/wayfire/etc"' -pthread -MD -MQ src/background/wf-background.p/background.cpp.o -MF src/background/wf-background.p/background.cpp.o.d -o src/background/wf-background.p/background.cpp.o -c ../src/background/background.cpp
../src/background/background.cpp: In member function ‘void BackgroundDrawingArea::show_image(Glib::RefPtr<Gdk::Pixbuf>, double, double)’:
../src/background/background.cpp:33:35: error: ‘create_surface_from_pixbuf’ is not a member of ‘Gdk::Cairo’
     to_image.source = Gdk::Cairo::create_surface_from_pixbuf(image,
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/background/background.cpp:33:35: note: suggested alternative: ‘set_source_pixbuf’
     to_image.source = Gdk::Cairo::create_surface_from_pixbuf(image,
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
                                   set_source_pixbuf
ninja: build stopped: subcommand failed.

Is there any wrong?

@caijw caijw changed the title building wf-shell get errors building wf-shell gets errors Nov 15, 2020
@ammen99
Copy link
Member

ammen99 commented Nov 15, 2020

which version of gtk are you using?

@caijw
Copy link
Author

caijw commented Nov 15, 2020

How can i find out the gtk version when building wf-shell ?

@ammen99
Copy link
Member

ammen99 commented Nov 15, 2020

How did you install gtk? If via package manager you should be able to find the information there.

@caijw
Copy link
Author

caijw commented Nov 20, 2020

image
run dpkg -l libgtk2.0-0 libgtk-3-0
and get this.

@soreau
Copy link
Member

soreau commented Nov 20, 2020

I try to build wf-shell and get some errors:

~/Documents/code/wayfire_project/wf-shell(master*) » meson build --prefix=$prefix && ninja -C build && ninja -C build install

Directory already configured.

Just run your build command (e.g. ninja) and Meson will regenerate as necessary.
If ninja fails, run "ninja reconfigure" or "meson --reconfigure"
to force Meson to regenerate.

If build failures persist, run "meson setup --wipe" to rebuild from scratch
using the same options as passed when configuring the build.
To change option values, run "meson configure" instead.
ninja: Entering directory `build'
[1/2] Compiling C++ object src/background/wf-background.p/background.cpp.o
FAILED: src/background/wf-background.p/background.cpp.o 
ccache c++ -Isrc/background/wf-background.p -Isrc/background -I../src/background -Isrc/util -I../src/util -Isubprojects/gtk-layer-shell/include -I../subprojects/gtk-layer-shell/include -I/opt/wayfire/include -I/usr/include/gtkmm-3.0 -I/usr/lib/x86_64-linux-gnu/gtkmm-3.0/include -I/usr/include/atkmm-1.6 -I/usr/include/gtk-3.0/unix-print -I/usr/include/gdkmm-3.0 -I/usr/lib/x86_64-linux-gnu/gdkmm-3.0/include -I/usr/include/giomm-2.4 -I/usr/lib/x86_64-linux-gnu/giomm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/lib/x86_64-linux-gnu/pangomm-1.4/include -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/cairomm-1.0 -I/usr/lib/x86_64-linux-gnu/cairomm-1.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/local/include -I/usr/include/libevdev-1.0/ -I/usr/include/libxml2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -std=c++17 -g -DHAVE_PULSE=1 -Wno-pedantic -Wno-unused-parameter -Wno-parentheses '-DICONDIR="/opt/wayfire/share/wayfire/icons"' '-DMETADATA_DIR="/opt/wayfire/share/wayfire/metadata/wf-shell"' '-DSYSCONF_DIR="/opt/wayfire/etc"' -pthread -MD -MQ src/background/wf-background.p/background.cpp.o -MF src/background/wf-background.p/background.cpp.o.d -o src/background/wf-background.p/background.cpp.o -c ../src/background/background.cpp
../src/background/background.cpp: In member function ‘void BackgroundDrawingArea::show_image(Glib::RefPtr<Gdk::Pixbuf>, double, double)’:
../src/background/background.cpp:33:35: error: ‘create_surface_from_pixbuf’ is not a member of ‘Gdk::Cairo’
     to_image.source = Gdk::Cairo::create_surface_from_pixbuf(image,
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/background/background.cpp:33:35: note: suggested alternative: ‘set_source_pixbuf’
     to_image.source = Gdk::Cairo::create_surface_from_pixbuf(image,
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
                                   set_source_pixbuf
ninja: build stopped: subcommand failed.

Is there any wrong?

This error happens when attempting to build against gtk 3.22 instead of 3.24. The build system should be updated since it uses a function only found in 3.24.

@ammen99
Copy link
Member

ammen99 commented Nov 20, 2020

Yeah @soreau is right, I pushed a commit to master which bumps the dependency version to 3.24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants