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

0.2.4-dev compile error: -Werror=cast-function-type #81

Closed
joebonrichie opened this issue Oct 16, 2018 · 2 comments
Closed

0.2.4-dev compile error: -Werror=cast-function-type #81

joebonrichie opened this issue Oct 16, 2018 · 2 comments

Comments

@joebonrichie
Copy link
Contributor

Currently getting this compile error on 0.2.3 and 0.2.4-dev

[ 54%] Building CXX object src/radiotray-ng/extras/media_keys/CMakeFiles/media_keys.dir/linux/media_keys.cpp.o
In file included from /usr/include/sigc++-2.0/sigc++/sigc++.h:104,
                 from /usr/include/glibmm-2.4/glibmm/thread.h:49,
                 from /usr/include/glibmm-2.4/glibmm.h:88,
                 from /usr/include/giomm-2.4/giomm.h:22,
                 from /home/build/YPKG/root/radiotray-ng/build/radiotray-ng.git/src/radiotray-ng/extras/media_keys/linux/media_keys.cpp:23:
/usr/include/sigc++-2.0/sigc++/signal.h: In static member function ‘static sigc::internal::signal_emit0<void, sigc::nil>::result_type sigc::internal::signal_emit0<void, sigc::nil>::emit(sigc::internal::signal_impl*)’:
/usr/include/sigc++-2.0/sigc++/signal.h:794:56: error: cast between incompatible function types from ‘sigc::internal::hook’ {aka ‘void* (*)(void*)’} to ‘sigc::internal::signal_emit0<void, sigc::nil>::call_type’ {aka ‘void (*)(sigc::internal::slot_rep*)’} [-Werror=cast-function-type]
           (reinterpret_cast<call_type>(slot.rep_->call_))(slot.rep_);
                                                        ^
/usr/include/sigc++-2.0/sigc++/signal.h: In static member function ‘static sigc::internal::signal_emit0<void, sigc::nil>::result_type sigc::internal::signal_emit0<void, sigc::nil>::emit_reverse(sigc::internal::signal_impl*)’:
/usr/include/sigc++-2.0/sigc++/signal.h:821:55: error: cast between incompatible function types from ‘sigc::internal::hook’ {aka ‘void* (*)(void*)’} to ‘sigc::internal::signal_emit0<void, sigc::nil>::call_type’ {aka ‘void (*)(sigc::internal::slot_rep*)’} [-Werror=cast-function-type]
           (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_);
                                                       ^
cc1plus: all warnings being treated as errors
make[2]: *** [src/radiotray-ng/extras/media_keys/CMakeFiles/media_keys.dir/build.make:63: src/radiotray-ng/extras/media_keys/CMakeFiles/media_keys.dir/linux/media_keys.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:540: src/radiotray-ng/extras/media_keys/CMakeFiles/media_keys.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

Removing -Werror in CMakeLists.txt will fix the compile error, but of course that isn't a proper fix.

Thanks in advance!

gcc version: 8.2.0
glibmm : 2.56.0
libsigc++ : 2.10.0

@ebruck
Copy link
Owner

ebruck commented Oct 16, 2018

Looks like these headers need to be marked as "system".
I'll have a look, but am not seeing this in Ubuntu 18.10 which I believe is using gcc 8.2.0.

@joebonrichie
Copy link
Contributor Author

You're right similar to d4fb8dd marking radiotray-ng/CMakeLists.txt, src/radiotray-ng/extras/media_keys/CMakeLists.txt and src/radiotray-ng/extras/rtng_dbus/CMakeLists.txt as SYSTEM PRIVATE did the trick.

@ebruck ebruck closed this as completed Oct 17, 2018
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

2 participants