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

Explicitly include headers for PCH free build #312

Merged
merged 1 commit into from
Jun 15, 2024

Conversation

pastalian
Copy link
Contributor

There are some headers that implicitly included by PCH. Include those explicitly so PCH free build succeeds.

Error log
$ cmake -GNinja -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON -DUSE_KEYCHAIN=OFF -DENABLE_QRCODE_LOGIN=OFF ..
$ ninja
...
[9/93] Building CXX object CMakeFiles/abaddon.dir/src/components/channellist/classic/mentionoverlay.cpp.o
FAILED: CMakeFiles/abaddon.dir/src/components/channellist/classic/mentionoverlay.cpp.o 
/usr/sbin/c++ -DENABLE_NOTIFICATION_SOUNDS -DFMT_SHARED -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -DWITH_LIBHANDY -DWITH_MINIAUDIO -DWITH_RNNOISE -DWITH_VOICE -I/root/abaddon/src -I/root/abaddon/build -I/usr/include/gtkmm-3.0 -I/usr/lib64/gtkmm-3.0/include -I/usr/include/gdkmm-3.0 -I/usr/lib64/gdkmm-3.0/include -I/usr/include/gtk-3.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glibmm-2.4 -I/usr/lib64/glibmm-2.4/include -I/usr/include/giomm-2.4 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/giomm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/lib64/pangomm-1.4/include -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/cairomm-1.0 -I/usr/lib64/cairomm-1.0/include -I/usr/include/atkmm-1.6 -I/usr/lib64/atkmm-1.6/include -I/usr/include/atk-1.0 -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include -I/usr/include/libhandy-1 -I/usr/include/miniaudio -isystem /usr/include/opus -std=gnu++17 -MD -MT CMakeFiles/abaddon.dir/src/components/channellist/classic/mentionoverlay.cpp.o -MF CMakeFiles/abaddon.dir/src/components/channellist/classic/mentionoverlay.cpp.o.d -o CMakeFiles/abaddon.dir/src/components/channellist/classic/mentionoverlay.cpp.o -c /root/abaddon/src/components/channellist/classic/mentionoverlay.cpp
In file included from /root/abaddon/src/components/channellist/classic/mentionoverlay.cpp:1:
/root/abaddon/src/components/channellist/classic/mentionoverlay.hpp:19:10: error: 'set' in namespace 'std' does not name a template type
   19 |     std::set<Snowflake> m_guild_ids;
      |          ^~~
[10/93] Building CXX object CMakeFiles/abaddon.dir/src/components/channellist/classic/guildlist.cpp.o
FAILED: CMakeFiles/abaddon.dir/src/components/channellist/classic/guildlist.cpp.o 
/usr/sbin/c++ -DENABLE_NOTIFICATION_SOUNDS -DFMT_SHARED -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -DWITH_LIBHANDY -DWITH_MINIAUDIO -DWITH_RNNOISE -DWITH_VOICE -I/tmp/abaddon/src -I/tmp/abaddon/build -I/usr/include/gtkmm-3.0 -I/usr/lib64/gtkmm-3.0/include -I/usr/include/gdkmm-3.0 -I/usr/lib64/gdkmm-3.0/include -I/usr/include/gtk-3.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glibmm-2.4 -I/usr/lib64/glibmm-2.4/include -I/usr/include/giomm-2.4 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/giomm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/lib64/pangomm-1.4/include -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/cairomm-1.0 -I/usr/lib64/cairomm-1.0/include -I/usr/include/atkmm-1.6 -I/usr/lib64/atkmm-1.6/include -I/usr/include/atk-1.0 -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include -I/usr/include/libhandy-1 -I/usr/include/miniaudio -isystem /usr/include/opus -std=gnu++17 -MD -MT CMakeFiles/abaddon.dir/src/components/channellist/classic/guildlist.cpp.o -MF CMakeFiles/abaddon.dir/src/components/channellist/classic/guildlist.cpp.o.d -o CMakeFiles/abaddon.dir/src/components/channellist/classic/guildlist.cpp.o -c /tmp/abaddon/src/components/channellist/classic/guildlist.cpp
/tmp/abaddon/src/components/channellist/classic/guildlist.cpp: In function 'Gtk::Widget* AddMentionOverlay(Gtk::Widget*, Snowflake)':
/tmp/abaddon/src/components/channellist/classic/guildlist.cpp:98:44: error: 'Overlay' is not a member of 'Gtk'
   98 |     auto *overlay = Gtk::make_managed<Gtk::Overlay>();
      |                                            ^~~~~~~
[31/71] Building CXX object CMakeFiles/abaddon.dir/src/misc/cairo.cpp.o
FAILED: CMakeFiles/abaddon.dir/src/misc/cairo.cpp.o 
/usr/sbin/c++ -DENABLE_NOTIFICATION_SOUNDS -DFMT_SHARED -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -DWITH_LIBHANDY -DWITH_MINIAUDIO -DWITH_RNNOISE -DWITH_VOICE -I/tmp/abaddon/src -I/tmp/abaddon/build -I/usr/include/gtkmm-3.0 -I/usr/lib64/gtkmm-3.0/include -I/usr/include/gdkmm-3.0 -I/usr/lib64/gdkmm-3.0/include -I/usr/include/gtk-3.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glibmm-2.4 -I/usr/lib64/glibmm-2.4/include -I/usr/include/giomm-2.4 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/giomm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/lib64/pangomm-1.4/include -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/cairomm-1.0 -I/usr/lib64/cairomm-1.0/include -I/usr/include/atkmm-1.6 -I/usr/lib64/atkmm-1.6/include -I/usr/include/atk-1.0 -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include -I/usr/include/libhandy-1 -I/usr/include/miniaudio -isystem /usr/include/opus -std=gnu++17 -MD -MT CMakeFiles/abaddon.dir/src/misc/cairo.cpp.o -MF CMakeFiles/abaddon.dir/src/misc/cairo.cpp.o.d -o CMakeFiles/abaddon.dir/src/misc/cairo.cpp.o -c /tmp/abaddon/src/misc/cairo.cpp
In file included from /tmp/abaddon/src/misc/cairo.cpp:1:
/tmp/abaddon/src/misc/cairo.hpp:4:28: error: 'Cairo' does not name a type
    4 | void PathRoundedRect(const Cairo::RefPtr<Cairo::Context> &cr, double x, double y, double w, double h, double r);
      |                            ^~~~~
[4/30] Building CXX object CMakeFiles/abaddon.dir/src/platform.cpp.o
FAILED: CMakeFiles/abaddon.dir/src/platform.cpp.o 
/usr/sbin/c++ -DENABLE_NOTIFICATION_SOUNDS -DFMT_SHARED -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -DWITH_LIBHANDY -DWITH_MINIAUDIO -DWITH_RNNOISE -DWITH_VOICE -I/tmp/abaddon/src -I/tmp/abaddon/build -I/usr/include/gtkmm-3.0 -I/usr/lib64/gtkmm-3.0/include -I/usr/include/gdkmm-3.0 -I/usr/lib64/gdkmm-3.0/include -I/usr/include/gtk-3.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glibmm-2.4 -I/usr/lib64/glibmm-2.4/include -I/usr/include/giomm-2.4 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/giomm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/lib64/pangomm-1.4/include -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/cairomm-1.0 -I/usr/lib64/cairomm-1.0/include -I/usr/include/atkmm-1.6 -I/usr/lib64/atkmm-1.6/include -I/usr/include/atk-1.0 -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include -I/usr/include/libhandy-1 -I/usr/include/miniaudio -isystem /usr/include/opus -std=gnu++17 -MD -MT CMakeFiles/abaddon.dir/src/platform.cpp.o -MF CMakeFiles/abaddon.dir/src/platform.cpp.o.d -o CMakeFiles/abaddon.dir/src/platform.cpp.o -c /tmp/abaddon/src/platform.cpp
/tmp/abaddon/src/platform.cpp: In function 'std::string Platform::FindResourceFolder()':
/tmp/abaddon/src/platform.cpp:104:17: error: 'util' has not been declared
  104 |             if (util::IsFolder(path + "/res") && util::IsFolder(path + "/css")) {
      |                 ^~~~

There are some headers that implicitly included by PCH. Include those
explicitly so PCH free build succeeds.
@ouwou ouwou merged commit bc7c5f9 into uowuo:master Jun 15, 2024
9 checks passed
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

Successfully merging this pull request may close these issues.

2 participants