projecthamster / xfce4-hamster-plugin

A recreation of the gnome-shell 'hamster project extension' for the xfce4 panel.
http://projecthamster.org
GNU General Public License v2.0
27 stars 8 forks source link

build issues with cmake (on debian bullseye) #47

Closed GeraldJansen closed 2 years ago

GeraldJansen commented 2 years ago

With a fresh clone of current master, installation fails because libhamster.so doesn't get created in the make step. Looking a bit closer, I got this:

[build]$ make
[ 35%] Built target translations_1
[ 35%] Built target translations
[ 45%] Built target data
[ 50%] Building C object panel-plugin/CMakeFiles/hamster.dir/button.c.o
vm.drop_caches = 3
[ 55%] Building C object panel-plugin/CMakeFiles/hamster.dir/hamster.c.o
vm.drop_caches = 3
[ 60%] Building C object panel-plugin/CMakeFiles/hamster.dir/plugin.c.o
vm.drop_caches = 3
[ 65%] Building C object panel-plugin/CMakeFiles/hamster.dir/settings.c.o
vm.drop_caches = 3
[ 70%] Building C object panel-plugin/CMakeFiles/hamster.dir/util.c.o
vm.drop_caches = 3
[ 75%] Building C object panel-plugin/CMakeFiles/hamster.dir/view.c.o
vm.drop_caches = 3
[ 80%] Building C object panel-plugin/CMakeFiles/hamster.dir/windowserver.c.o
vm.drop_caches = 3
[ 85%] Linking C shared library libhamster.so
vm.drop_caches = 3
[100%] Built target hamster
[build]$ ls panel-plugin/CMakeFiles/hamster.dir
build.make      cmake_clean.cmake  depend.internal  flags.make  progress.make
C.includecache  DependInfo.cmake   depend.make      link.txt    relink.txt

I'm not sure what those vm.drop_caches = 3 messages are about, but no object files are being created.

aquaherd commented 2 years ago

I need to update the instructions. The following works for me on debian bullseye:

xfce4-hamster-plugin. cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -B build
-- Configuring done
-- Generating done
-- Build files have been written to: /home/herd/Projects/desk/xfce/xfce4-hamster-plugin/build
xfce4-hamster-plugin. cmake --build build
[ 36%] Built target translations_1
[ 36%] Built target translations
[ 47%] Built target data
Scanning dependencies of target hamster
[ 52%] Building C object panel-plugin/CMakeFiles/hamster.dir/button.c.o
[ 57%] Building C object panel-plugin/CMakeFiles/hamster.dir/hamster.c.o
[ 63%] Building C object panel-plugin/CMakeFiles/hamster.dir/plugin.c.o
[ 68%] Building C object panel-plugin/CMakeFiles/hamster.dir/settings.c.o
[ 73%] Building C object panel-plugin/CMakeFiles/hamster.dir/util.c.o
[ 78%] Building C object panel-plugin/CMakeFiles/hamster.dir/view.c.o
[ 84%] Building C object panel-plugin/CMakeFiles/hamster.dir/windowserver.c.o
[ 89%] Linking C shared library libhamster.so
[100%] Built target hamster
xfce4-hamster-plugin. cmake --install build
-- Install configuration: ""
-- Installing: /usr/share/locale/cs/LC_MESSAGES/xfce4-hamster-plugin.mo
CMake Error at build/cmake_install.cmake:46 (file):
  file INSTALL cannot copy file
  "/home/herd/Projects/desk/xfce/xfce4-hamster-plugin/build/cs.gmo" to
  "/usr/share/locale/cs/LC_MESSAGES/xfce4-hamster-plugin.mo": Permission
  denied.

xfce4-hamster-plugin. find -name hamster.so
xfce4-hamster-plugin. find -name libhamster.so
./build/panel-plugin/libhamster.so
xfce4-hamster-plugin. echo $MAKEFLAGS

xfce4-hamster-plugin.
aquaherd commented 2 years ago

The fix with 17.1 is that the end install is in /usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libhamster.so instead of /usr/lib/xfce4/panel/plugins/libhamster.so hard coded but the build itself should not be affected. So called multi-lib-awareness required by fedora, also supported by debian if e.g. 32-bit x86 is enabled.

GeraldJansen commented 2 years ago

Thanks for the feedback and new instructions. I followed them but the result is still the same (i.e. no hamster.dir/*.o files created and no libhamster.so created.) I'm still getting the messages about vm.drop_caches = 3 and have no idea what could be triggering them.

aquaherd commented 2 years ago

fired up a podman and built there succeessfully - no idea how to proceed from here on

Perhaps a virtual machine issue? Will build succeed with export MAKEFLAGS=j1 ?

GeraldJansen commented 2 years ago

I must apologize for wasting your time. I had a long forgotten personal alias for cc as a cleancache script :-(

The build and installation works just fine now. Thanks again.

aquaherd commented 2 years ago

No worries.