nullobsi / clight-gui

Qt GUI for clight

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fatal error: ../class/DBusTypes.h: No such file or directory

yochananmarqos opened this issue · comments

I'm not sure if this is actually building yet, but I thought I'd give it a shot. I whipped up a PKGBUILD. Here's the result:

-- The C compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib/ccache/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/ccache/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at CMakeLists.txt:42 (message):
  CMAKE_PREFIX_PATH is not defined, you may need to set it
  (-DCMAKE_PREFIX_PATH="path/to/Qt/lib/cmake" or
  -DCMAKE_PREFIX_PATH=/usr/include/{host}/qt{version}/ on Ubuntu)


-- Configuring done
-- Generating done
-- Build files have been written to: /home/yochanan/Documents/pkgbuilds/clight-gui-git/src/build
make: Entering directory '/home/yochanan/Documents/pkgbuilds/clight-gui-git/src/build'
make[1]: Entering directory '/home/yochanan/Documents/pkgbuilds/clight-gui-git/src/build'
make[2]: Entering directory '/home/yochanan/Documents/pkgbuilds/clight-gui-git/src/build'
Scanning dependencies of target clight-gui_autogen
make[2]: Leaving directory '/home/yochanan/Documents/pkgbuilds/clight-gui-git/src/build'
make[2]: Entering directory '/home/yochanan/Documents/pkgbuilds/clight-gui-git/src/build'
[  1%] Automatic MOC and UIC for target clight-gui
make[2]: Leaving directory '/home/yochanan/Documents/pkgbuilds/clight-gui-git/src/build'
[  1%] Built target clight-gui_autogen
make[2]: Entering directory '/home/yochanan/Documents/pkgbuilds/clight-gui-git/src/build'
[  4%] Generating clight.cpp, clight.h
[  4%] Generating Conf.cpp, Conf.h
[  7%] Generating Gamma.cpp, Gamma.h
[  7%] Generating Daytime.cpp, Daytime.h
[  8%] Generating Dimmer.cpp, Dimmer.h
[ 10%] Generating Dpms.cpp, Dpms.h
[ 13%] Generating Inhibit.cpp, Inhibit.h
[ 13%] Generating Backlight.cpp, Backlight.h
[ 14%] Generating Kbd.cpp, Kbd.h
[ 15%] Generating Screen.cpp, Screen.h
[ 18%] Generating SysBacklight.cpp, SysBacklight.h
[ 18%] Generating Sensor.cpp, Sensor.h
[ 20%] Generating SysScreen.cpp, SysScreen.h
[ 21%] Generating SysGamma.cpp, SysGamma.h
[ 23%] Generating SysSensor.cpp, SysSensor.h
[ 24%] Generating SysDpms.cpp, SysDpms.h
[ 26%] Generating clight.moc
[ 27%] Generating Backlight.moc
[ 28%] Generating Daytime.moc
[ 30%] Generating Conf.moc
[ 31%] Generating Dimmer.moc
[ 33%] Generating Dpms.moc
[ 34%] Generating Inhibit.moc
[ 36%] Generating Gamma.moc
[ 37%] Generating Kbd.moc
[ 39%] Generating SysBacklight.moc
[ 42%] Generating Screen.moc
[ 42%] Generating Sensor.moc
[ 44%] Generating SysScreen.moc
[ 44%] Generating SysGamma.moc
[ 46%] Generating SysDpms.moc
[ 47%] Generating SysSensor.moc
Scanning dependencies of target clight-gui
make[2]: Leaving directory '/home/yochanan/Documents/pkgbuilds/clight-gui-git/src/build'
make[2]: Entering directory '/home/yochanan/Documents/pkgbuilds/clight-gui-git/src/build'
[ 49%] Building CXX object CMakeFiles/clight-gui.dir/models/BacklightPctModel.cpp.o
[ 50%] Building CXX object CMakeFiles/clight-gui.dir/gui/DimmerTab.cpp.o
[ 52%] Building CXX object CMakeFiles/clight-gui.dir/clight-gui_autogen/mocs_compilation.cpp.o
[ 55%] Building CXX object CMakeFiles/clight-gui.dir/gui/BacklightTab.cpp.o
[ 55%] Building CXX object CMakeFiles/clight-gui.dir/main.cpp.o
[ 56%] Building CXX object CMakeFiles/clight-gui.dir/util/initializeMetaTypes.cpp.o
[ 57%] Building CXX object CMakeFiles/clight-gui.dir/gui/InfoTab.cpp.o
[ 59%] Building CXX object CMakeFiles/clight-gui.dir/gui/MainWindow.cpp.o
[ 60%] Building CXX object CMakeFiles/clight-gui.dir/gui/GammaTab.cpp.o
In file included from /home/yochanan/Documents/pkgbuilds/clight-gui-git/src/clight-gui/src/models/BacklightPctModel.h:8,
                 from /home/yochanan/Documents/pkgbuilds/clight-gui-git/src/clight-gui/src/models/BacklightPctModel.cpp:5:
/home/yochanan/Documents/pkgbuilds/clight-gui-git/src/build/SysBacklight.h:22:10: fatal error: ../class/DBusTypes.h: No such file or directory
   22 | #include "../class/DBusTypes.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/clight-gui.dir/build.make:297: CMakeFiles/clight-gui.dir/models/BacklightPctModel.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/yochanan/Documents/pkgbuilds/clight-gui-git/src/clight-gui/src/gui/../models/BacklightPctModel.h:8,
                 from /home/yochanan/Documents/pkgbuilds/clight-gui-git/src/clight-gui/src/gui/BacklightTab.h:9,
                 from /home/yochanan/Documents/pkgbuilds/clight-gui-git/src/clight-gui/src/gui/MainWindow.h:11,
                 from /home/yochanan/Documents/pkgbuilds/clight-gui-git/src/clight-gui/src/gui/MainWindow.cpp:7:
/home/yochanan/Documents/pkgbuilds/clight-gui-git/src/build/SysBacklight.h:22:10: fatal error: ../class/DBusTypes.h: No such file or directory
   22 | #include "../class/DBusTypes.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/clight-gui.dir/build.make:284: CMakeFiles/clight-gui.dir/gui/MainWindow.cpp.o] Error 1
In file included from /home/yochanan/Documents/pkgbuilds/clight-gui-git/src/clight-gui/src/gui/DimmerTab.h:9,
                 from /home/yochanan/Documents/pkgbuilds/clight-gui-git/src/clight-gui/src/gui/DimmerTab.cpp:7:
/home/yochanan/Documents/pkgbuilds/clight-gui-git/src/build/Dimmer.h:22:10: fatal error: ../class/DBusTypes.h: No such file or directory
   22 | #include "../class/DBusTypes.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/clight-gui.dir/build.make:336: CMakeFiles/clight-gui.dir/gui/DimmerTab.cpp.o] Error 1
In file included from /home/yochanan/Documents/pkgbuilds/clight-gui-git/src/clight-gui/src/gui/../models/BacklightPctModel.h:8,
                 from /home/yochanan/Documents/pkgbuilds/clight-gui-git/src/clight-gui/src/gui/BacklightTab.h:9,
                 from /home/yochanan/Documents/pkgbuilds/clight-gui-git/src/clight-gui/src/gui/BacklightTab.cpp:7:
/home/yochanan/Documents/pkgbuilds/clight-gui-git/src/build/SysBacklight.h:22:10: fatal error: ../class/DBusTypes.h: No such file or directory
   22 | #include "../class/DBusTypes.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/clight-gui.dir/build.make:323: CMakeFiles/clight-gui.dir/gui/BacklightTab.cpp.o] Error 1
In file included from /home/yochanan/Documents/pkgbuilds/clight-gui-git/src/clight-gui/src/gui/../models/BacklightPctModel.h:8,
                 from /home/yochanan/Documents/pkgbuilds/clight-gui-git/src/clight-gui/src/gui/BacklightTab.h:9,
                 from /home/yochanan/Documents/pkgbuilds/clight-gui-git/src/clight-gui/src/gui/MainWindow.h:11,
                 from /home/yochanan/Documents/pkgbuilds/clight-gui-git/src/clight-gui/src/main.cpp:2:
/home/yochanan/Documents/pkgbuilds/clight-gui-git/src/build/SysBacklight.h:22:10: fatal error: ../class/DBusTypes.h: No such file or directory
   22 | #include "../class/DBusTypes.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/clight-gui.dir/build.make:271: CMakeFiles/clight-gui.dir/main.cpp.o] Error 1
In file included from /home/yochanan/Documents/pkgbuilds/clight-gui-git/src/clight-gui/src/gui/InfoTab.h:9,
                 from /home/yochanan/Documents/pkgbuilds/clight-gui-git/src/clight-gui/src/gui/InfoTab.cpp:7:
/home/yochanan/Documents/pkgbuilds/clight-gui-git/src/build/clight.h:22:10: fatal error: ../class/DBusTypes.h: No such file or directory
   22 | #include "../class/DBusTypes.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/clight-gui.dir/build.make:362: CMakeFiles/clight-gui.dir/gui/InfoTab.cpp.o] Error 1
In file included from /home/yochanan/Documents/pkgbuilds/clight-gui-git/src/clight-gui/src/gui/GammaTab.h:9,
                 from /home/yochanan/Documents/pkgbuilds/clight-gui-git/src/clight-gui/src/gui/GammaTab.cpp:7:
/home/yochanan/Documents/pkgbuilds/clight-gui-git/src/build/Gamma.h:22:10: fatal error: ../class/DBusTypes.h: No such file or directory
   22 | #include "../class/DBusTypes.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/clight-gui.dir/build.make:349: CMakeFiles/clight-gui.dir/gui/GammaTab.cpp.o] Error 1
In file included from /home/yochanan/Documents/pkgbuilds/clight-gui-git/src/build/clight-gui_autogen/DMHXEJ42XS/../../../clight-gui/src/gui/../models/BacklightPctModel.h:8,
                 from /home/yochanan/Documents/pkgbuilds/clight-gui-git/src/build/clight-gui_autogen/DMHXEJ42XS/../../../clight-gui/src/gui/BacklightTab.h:9,
                 from /home/yochanan/Documents/pkgbuilds/clight-gui-git/src/build/clight-gui_autogen/DMHXEJ42XS/moc_BacklightTab.cpp:10,
                 from /home/yochanan/Documents/pkgbuilds/clight-gui-git/src/build/clight-gui_autogen/mocs_compilation.cpp:2:
/home/yochanan/Documents/pkgbuilds/clight-gui-git/src/build/SysBacklight.h:22:10: fatal error: ../class/DBusTypes.h: No such file or directory
   22 | #include "../class/DBusTypes.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/clight-gui.dir/build.make:258: CMakeFiles/clight-gui.dir/clight-gui_autogen/mocs_compilation.cpp.o] Error 1
make[2]: Leaving directory '/home/yochanan/Documents/pkgbuilds/clight-gui-git/src/build'
make[1]: *** [CMakeFiles/Makefile2:96: CMakeFiles/clight-gui.dir/all] Error 2
make[1]: Leaving directory '/home/yochanan/Documents/pkgbuilds/clight-gui-git/src/build'
make: *** [Makefile:103: all] Error 2
make: Leaving directory '/home/yochanan/Documents/pkgbuilds/clight-gui-git/src/build'

It looks like CMAKE_PREFIX_PATH isn't defined which may be responsible for the error you're running into. Try adding -DCMAKE_PREFIX_PATH=/usr/include/qt/ to the cmake lines

I tried -DCMAKE_PREFIX_PATH=/usr/lib/cmake/Qt5/ which got rid of the warning, but the error is the same.

the dbus types are autogenerated, but it's kind of a bad idea to do that i've heard
i did a workaround in CMake to include all of the metatypes used by the generated interfaces. the directory structure on my machine comes out to src/cmake-build-debug meaning that ../class/DBusTypes.h resolves to the DBusTypes header in the directory.
i just pushed an edit to the CMakeLists that should use the absolute directory, which should fix the issue

That did the trick! Nice job, by the way!

thank you! glad it works :)

I updated my PKGBUILD with a desktop file as well.

Do you mind if I add it to the AUR?

much thanks! :) i hope it's useful!

It's very useful, thank you!