cannot run 'make' during installation

Asked by OctopodesC

After I change my directory to /livewallpaper-0.4.1/src/build, run cmake .., and run make, I am confronted with this code-

me@OctopodesC:~/livewallpaper-0.4.1/src/build$ make

[ 33%] Building C object CMakeFiles/livewallpaper.dir/main.o
/home/sean/livewallpaper-0.4.1/src/main.c:22:20: fatal error: config.h: No such file or directory
 #include "config.h"
                    ^
compilation terminated.
make[2]: *** [CMakeFiles/livewallpaper.dir/main.o] Error 1
make[1]: *** [CMakeFiles/livewallpaper.dir/all] Error 2
make: *** [all] Error 2

I am new to both linux(ubuntu) and livewallpaper.

Question information

Language:
English Edit question
Status:
Solved
For:
LiveWallpaper Edit question
Assignee:
No assignee Edit question
Solved by:
Maximilian Schnarr
Solved:
Last query:
Last reply:
Revision history for this message
Maximilian Schnarr (fyrmir) said :
#1

I think you did not install all dependencies to compile LiveWallpaper and so cmake could not create the config.h file. If you run cmake .. again in the build directory, cmake will tell you which library it hasn't found. Just install that library and run cmake .. again. If cmake finishes without any error, then you can run make to compile LiveWallpaper.

I run the following command to install all dependencies required to compile and run LiveWallpaper:
sudo apt-get install build-essential cmake libpeas-dev libglew-dev libglib2.0-dev libupower-glib-dev libappindicator3-dev libgtk-3-dev gobject-introspection libgirepository1.0-dev xcftools gtk-doc-tools intltool python-opengl python-imaging python-gi-cairo

Revision history for this message
OctopodesC (octopodesc) said :
#2

Tried what you said above. cmake .. now disays

CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present. A line of code such as

    cmake_minimum_required(VERSION 2.8)

  should be added at the top of the file. The version specified may be lower
  if you wish to support older CMake versions for this project. For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: /home/sean/livewallpaper-0.4.1/src/build

and make had the same problem as before.

Revision history for this message
Maximilian Schnarr (fyrmir) said :
#3

You created the build directory inside the src directory, but this is the wrong place. Your build directory should be in the same directory as the src directory. In your case the build directory has to be /home/sean/livewallpaper-0.4.1/build/

Revision history for this message
OctopodesC (octopodesc) said :
#4

Just restarted and placed build in that directory. both 'cmake ..' and 'make' run without error, but when I tried 'make install' it replied with

-- Install configuration: ""
-- Installing: /usr/local/include/livewallpaper
CMake Error at include/cmake_install.cmake:36 (FILE):
  file INSTALL cannot set permissions on "/usr/local/include/livewallpaper"
Call Stack (most recent call first):
  cmake_install.cmake:37 (INCLUDE)

make: *** [install] Error 1

after saying 'Install the project'

Revision history for this message
Best Maximilian Schnarr (fyrmir) said :
#5

Try 'sudo make install' to install LiveWallpaper

Revision history for this message
OctopodesC (octopodesc) said :
#6

Thanks Maximilian Schnarr, that solved my question.