After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 761829 - undefined reference to `gdk_mir_display_get_type'
undefined reference to `gdk_mir_display_get_type'
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.16.x
Other Linux
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-02-10 14:48 UTC by Hanmac
Modified: 2016-02-11 12:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
conftest (232 bytes, text/x-csrc)
2016-02-10 14:48 UTC, Hanmac
  Details
mir: Add C++ guards (1007 bytes, patch)
2016-02-11 12:01 UTC, Emmanuele Bassi (:ebassi)
none Details | Review

Description Hanmac 2016-02-10 14:48:39 UTC
Created attachment 320804 [details]
conftest

in some other project i got problems with GDK MIR that the "gdk_mir_display_get_type" function is not found.

a readelf does show that libgdk-3.so should have that function:
readelf -a /usr/lib/x86_64-linux-gnu/libgdk-3.so | grep gdk_mir  1128: 0000000000083470    89 FUNC    GLOBAL DEFAULT   11 gdk_mir_display_get_mir_c
  1186: 0000000000088b40    90 FUNC    GLOBAL DEFAULT   11 gdk_mir_window_get_mir_su
  1225: 0000000000087200   129 FUNC    GLOBAL DEFAULT   11 gdk_mir_window_get_type
  1232: 0000000000084d60   129 FUNC    GLOBAL DEFAULT   11 gdk_mir_gl_context_get_ty
  1507: 0000000000083210   129 FUNC    GLOBAL DEFAULT   11 gdk_mir_display_get_type


building test:
LANG=C g++ -o conftest `pkg-config --cflags --libs mirclient` `pkg-config --cflags --libs gtk+-mir-3.0` -x c++ conftest.c

conftest.c:(.text+0x38): undefined reference to `gdk_mir_display_get_type()'
collect2: error: ld returned 1 exit status

pkg-config does add -lgdk-3 

but still somehow the conftest does say that it cant find that function (means it renders my other projects useless)

Ubuntu Wily package version: 3.16.7-0ubuntu3.3
Comment 1 Matthias Clasen 2016-02-11 10:48:25 UTC
I don't think there is anything for us to do here. You'll have to debug you build setup yourself, and then take it up with Ubuntu if there is a problem with their GTK+ package.
Comment 2 Hanmac 2016-02-11 11:13:58 UTC

EDIT:
i think i found the solution 
https://github.com/wxWidgets/wxWidgets/commit/1908c41f36880b9b8f55c0abb25d3d80700b2193
it says:
"gdkmir.h header is missing extern "C" wrapper as of GTK+ 3.18.7"


while my conftest still does not work, even with extern "C",
my project where i needed that check does seems to work again.

i don't know if you guys need to change something about it or not.
Comment 3 Emmanuele Bassi (:ebassi) 2016-02-11 12:01:58 UTC
Created attachment 320866 [details] [review]
mir: Add C++ guards

Avoid missing symbols when compiling C++ including the GDK Mir backend
header.
Comment 4 Emmanuele Bassi (:ebassi) 2016-02-11 12:03:16 UTC
Coded blind, but this should work.

Feel free to re-open if it didn't.
Comment 5 Matthias Clasen 2016-02-11 12:30:41 UTC
Ah, good to know. Thanks