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 123082 - directfb build
directfb build
Status: RESOLVED INVALID
Product: gtkmm
Classification: Bindings
Component: build
2.4
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2003-09-24 00:07 UTC by Peter Gasper
Modified: 2005-02-01 19:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Peter Gasper 2003-09-24 00:07:57 UTC
Like Win32, gtk+(2.2.2) compiled with a target of linux-fb or directfb (via
a DirectFB patch) does not have GtkSocket or GtkPlug, because they are
specific to X11. 

If one compiles gtkmm (2.2.x) against gtk+ (made with one of the above
targets), it will error out on "make" with the following:

g++ -g -O2 -Wall -o .libs/generate_extra_defs generate_defs_gtk.o
-Wl,--export-dynamic  ./.libs/libgtkmm_generate_extra_defs-2.0.so
-L/usr/local//lib -L/usr/local/lib /usr/local//lib/libsigc-1.2.so
/usr/local//lib/libgtk-directfb-2.0.so
/usr/local//lib/libgdk-directfb-2.0.so /usr/lib/libatk-1.0.so
/usr/local//lib/libgdk_pixbuf-2.0.so -lm /usr/local/lib/libdirectfb.so
-lpthread /usr/lib/libpangoft2-1.0.so /usr/lib/libpango-1.0.so
/usr/lib/libgobject-2.0.so /usr/lib/libgmodule-2.0.so -ldl
/usr/lib/libglib-2.0.so -Wl,--rpath -Wl,/usr/local//lib -Wl,--rpath
-Wl,/usr/local/lib
generate_defs_gtk.o(.text+0x4f8): In function `main':
/home/pgasper/files/DirectFB-cvs-91803/gtkmm-2.2.3/tools/extra_defs_gen/generate_defs_gtk.cc:49:
undefined reference to `gtk_socket_get_type'
generate_defs_gtk.o(.text+0x61e):/home/pgasper/files/DirectFB-cvs-91803/gtkmm-2.2.3/tools/extra_defs_gen/generate_defs_gtk.cc:49:
undefined reference to `gtk_plug_get_type'
collect2: ld returned 1 exit status
make[3]: *** [generate_extra_defs] Error 1
make[3]: Leaving directory
`/home/pgasper/files/DirectFB-cvs-91803/gtkmm-2.2.3/tools/extra_defs_gen'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/home/pgasper/files/DirectFB-cvs-91803/gtkmm-2.2.3/tools'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/pgasper/files/DirectFB-cvs-91803/gtkmm-2.2.3'
make: *** [all] Error 2


The following mailing list messages also reference this problem:
      http://www.geocrawler.com/mail/msg.php3?msg_id=8355709&list=1110
      http://mail.gnome.org/archives/gtkmm-list/2003-June/msg00182.html

Solution: To successfully compile, the following lines in
gtk/gtkmm/wrapper_init.cc (gtkmm-2.2.7) need to be ifndef'ed for linux-fb
or DirectFB, like they are for WIN32:

       206, 448 (for gtk_socket_get_type) 
       190, 432 (for gtk_plug_get_type)

This worked successfully on my machine under gtkmm-2.2.3 (my devel version)
but I see no reason it won't work under 2.2.7.

I would submit a patch (the fix in wrapper_init.cc is simple enough), but I
have no clue as to where/how the checks happen for detirmining the gtk+
target and doing a #define accordingly.

For certain this needs to be fixed for linux-fb. Not so clear as to how to
accomplish for DirectFB, since it is a patch and won't be officially
supported in Gtk+ till version 2.6. The fix for directfb might be correctly
accomplished by a patch in the DirectFB project or, a gtkmm or DirectFB FAQ
entry.
Comment 1 Murray Cumming 2003-09-24 06:28:31 UTC
> but I
> have no clue as to where/how the checks happen for detirmining the 
> gtk+
> target and doing a #define accordingly.

I would expect there to be a #define in gtk+ already, that we could 
just use. I would like you to investigate this. I think it's a fairly 
generic problem.

For DirectFB, we could have a patch while GTK+ has a patch, and 
support it properly when GTK+ supports it properly.
Comment 2 Peter Gasper 2003-10-04 23:41:49 UTC
I think this is it:

found in gdktypes.h:

/* The system specific file gdkconfig.h contains such configuration
 * settings that are needed not only when compiling GDK (or GTK)
 * itself, but also occasionally when compiling programs that use GDK
 * (or GTK). One such setting is what windowing API backend is in use.
 */

gdkconfig.h is found in lib/gtk-2.0/include/ where lib is in the
prefix directory (usually /usr or /usr/local).

inside gdkconfig.h is a #define which identifies the windowing API
backend. It is #define GDK_WINDOWING_* where * is X11, FB, WIN32 or
(with the directfb patch) DIRECTFB. 

The gtk+/gdk patch for directfb is maintained by the DirectFB project
currently.

Right now I'm not entirly certain if my solution (with respect to
wrapper_init.cc) is correct (I can't replicate it), but its a good
example of what needs to be done.
Comment 3 Murray Cumming 2003-10-06 14:34:03 UTC
Yes, I think  GDK_WINDOWING_FB is what you are looking for.

I think you mean wrap_init.cc, rather than wrapper_init.cc.
wrap_init.cc is a generated file, so you need to create some way to
say, in the .hg source file, that there should be an #ifdef in the
wrap_init.cc file.

This has already been done for Win32. For instance, see the
_GTKMMPROC_WIN32_NO_WRAP macro in gtk/src/socket.hg, and the resultant
#ifdefs in gtk/gtkmm/wrap_init.cc. I don't remember exactly how it's
implemented, but grep should be helpful.
Comment 4 Murray Cumming 2003-11-04 17:31:15 UTC
Do you need more help with this?
Comment 5 Murray Cumming 2003-11-21 14:06:04 UTC
Should I close this bug report?
Comment 6 Peter Gasper 2003-11-25 16:44:10 UTC
I am now using gtkmm under XWindows so this bug no longer affects me
so I am not working on it.

I wouldn't close it though because AFAIK this bug prevents anyone from
compiling gtkmm against a gtk+ which was compiled against linux-fb or
directfb.
Comment 7 Murray Cumming 2005-02-01 19:35:36 UTC
I'm closing this because nobody is actually experiencing this problem. If
anybody needs the clues then they will find this bugzilla bug via search engines.