Package: libgtkglextmm-x11-1.2-0
Version: 1.2.0-1
Severity: normal
I tried modifying simple-mixed.cc to do some Cairo drawing.
The first step was to create one.
I did this, reasonably enough, in SimpleGLScene::on_expose_event().
So, right after
Glib::RefPtr<Gdk::GL::Window> glwindow = get_gl_window();
I added
Cairo::RefPtr<Cairo::Context> cr = glwindow->create_cairo_context();
Compiling and linking are done with the attached Makefile.
Adding the line causes a segfault in simple-mixed that I caught with kdbg.
?? ()
IA__gdk_cairo_create() at /build/buildd/gtk+2.0-2.12.12/gdk/gdkcairo.c:45
Gdk::Drawable::create_cairo_context() at drawable.cc:376
SimpleGLScene::on_expose_event() at simple-mixed.cc ...
Some notes:
1. The gtkmm debugging symbols seem to indicate that the source drawable.cc
is in the current directory - it isn't.
2. Some debugging symbols want their sources installed under /buildd, others
(like gtk+2.0 above) want them in /build/buildd - is there a convention
for the location for source files in debian?
3. The debugging symbols packages (<base name>-dbg) don't depend on the
source package - they should, but since there seems to be no standard
source installation location I guess it's fscked.
-- System Information:
Debian Release: 5.0.1
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.26-2-vserver-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages libgtkglextmm-x11-1.2-0 depends on:
ii libc6 2.7-18 GNU C Library: Shared libraries
ii libgcc1 1:4.3.2-1.1 GCC support library
ii libglib2.0-0 2.16.6-1+lenny1 The GLib library of C routines
ii libglibmm-2.4-1c2a 2.16.4-1 C++ wrapper for the GLib toolkit (
ii libgtkglext1 1.2.0-1 OpenGL Extension to GTK+ (shared l
ii libgtkmm-2.4-1c2a 1:2.12.7-1 C++ wrappers for GTK+ 2.4 (shared
ii libsigc++-2.0-0c2a 2.0.18-2 type-safe Signal Framework for C++
ii libstdc++6 4.3.2-1.1 The GNU Standard C++ Library v3
libgtkglextmm-x11-1.2-0 recommends no packages.
libgtkglextmm-x11-1.2-0 suggests no packages.
-- no debconf information
SRC_EXT:=cc
cc:=dont_use_default_cc
PROGRAMS:=
FLAGS:=
$(foreach pkg,gtkglextmm-x11,\
$(eval FLAGS+=$(shell pkg-config $(pkg)-1.2 --cflags --libs)))
C_SRCS:=logo-model.c trackball.c
SIMPLE_SRCS:=$(filter-out $(foreach prg,$(PROGRAMS),$($(prg)_SRCS)),\
$(shell ls *.$(SRC_EXT)))
SIMPLE_PROGRAMS:=$(SIMPLE_SRCS:%.$(SRC_EXT)=%)
logo_EXTRA_OBJS:=$(C_SRCS:.c=.o)
shapes_EXTRA_OBJS:=trackball.o
all: $(PROGRAMS) $(SIMPLE_PROGRAMS)
define make_simple_program
$$(warning $0 $1)
$1_EXTRA_OBJS?=
$1: $1.$(SRC_EXT) Makefile $$($1_OBJS) $$($1_EXTRA_OBJS)
@echo "Building $1"
@g++ -O0 -ggdb -o $$@ $1.$(SRC_EXT) $$($1_EXTRA_OBJS) $(FLAGS)
endef
define compile
$$(warning $0 $1.$(SRC_EXT))
$1.o: $1.$(SRC_EXT) Makefile
@echo "Compiling $1.$(SRC_EXT)"
@g++ -O0 -ggdb -c -o $$@ $1.$(SRC_EXT) $(FLAGS)
endef
define c_compile
$$(warning $0 $1.c)
$1.o: $1.c Makefile
@echo "C Compiling $1.c"
@gcc -O0 -ggdb -c -o $$@ $1.c $(FLAGS)
endef
define make_program
$$(warning $0 $1)
$1_BASENAMES:=$$($1_SRCS:%.$(SRC_EXT)=%)
$$(foreach item,$$($1_BASENAMES),$$(eval $$(call compile,$$(item))))
$1_C_BASENAMES:=$$($1_CSRCS:%.c=%)
$$(foreach item,$$($1_C_BASENAMES),$$(eval $$(call c_compile,$$(item))))
$1_OBJS:=$$($1_SRCS:%.$(SRC_EXT)=%.o) $$($1_CSRCS:%.c=%.o)
$1_EXTRA_OBJS?=
$1: $$($1_OBJS) $$($1_EXTRA_OBJS) Makefile
@echo "Linking $1 from $$($1_SRCS) $$($1_CSRCS)"
@g++ -O0 -ggdb -o $$@ $$($1_OBJS) $$($1_EXTRA_OBJS) $(FLAGS)
endef
$(foreach prog,$(SIMPLE_PROGRAMS),$(eval $(call make_simple_program,$(prog))))
$(foreach prog,$(PROGRAMS),$(eval $(call make_program,$(prog))))
$(foreach src,$(C_SRCS),$(eval $(call c_compile,$(src:%.c=%))))
toclean=$(strip $(wildcard $(SIMPLE_PROGRAMS) $(SIMPLE_PROGRAMS:%=%.o)))
clean:
ifneq ($(toclean),)
rm $(toclean)
endif