Basic clutter example program fails in clutter_init(); is the clutter port working for anyone?
Rainer Müller
raimue at macports.org
Fri Jan 25 03:46:14 PST 2013
On 2013-01-24 07:04, Leo Singer wrote:
> Is anyone using the 'clutter' port provided by MacPorts, either alone or as a dependency of another port? I am just trying to show myself that it works by running one of the example programs that come with Clutter. I've boiled it down to a pretty minimal example that just calls clutter_init(), the first call of any Clutter program.
>
> /* main.c */
> /* compile with 'clang $(pkg-config --cflags --libs clutter-1.0) main.c -o main' */
> #include <stdlib.h>
> #include <clutter/clutter.h>
>
> int main(int argc, char *argv[])
> {
> if (clutter_init(&argc, &argv) == CLUTTER_INIT_SUCCESS)
> return EXIT_SUCCESS;
> else
> return EXIT_FAILURE;
> }
>
> This program compiles. However, the program returns unsuccessfully with this error message:
>
> (main:51838): Clutter-CRITICAL **: Unable to initialize Clutter: Failed to connected to any renderer due to constraints
>
> This is on Mountain Lion with clutter @1.12.2_0+x11 and cogl @1.12.2_0+x11.
At least I can reproduce the problem with the same versions. Note that
clutter can give you more debug output using the right arguments:
$ ./clutter --clutter-debug=backend
Clutter-Message:
[1359114022718622]:[BACKEND]:./x11/clutter-backend-x11.c:369:
XOpenDisplay on '/tmp/launch-CzQrr3/org.macosforge.xquartz:0'
Clutter-Message: [
+893]:[BACKEND]:./x11/clutter-backend-x11.c:394: Getting the X screen
Clutter-Message: [ +967]:[BACKEND]:./clutter-settings.c:201:
New resolution: 97.00
Clutter-Message: [ +1482]:[BACKEND]:./clutter-backend.c:244:
Units per em: 19.60
Clutter-Message: [
+2211]:[BACKEND]:./x11/clutter-backend-x11.c:463: X Display
'/tmp/launch-CzQrr3/org.macosforge.xquartz:0'[0x7faeb3031800] opened
(screen:0, root:321, dpi:97.000000)
Clutter-Message: [ +2712]:[BACKEND]:./clutter-backend.c:274:
Creating Cogl renderer
Clutter-Message: [
+2726]:[BACKEND]:./x11/clutter-backend-x11.c:706: Creating a new Xlib
renderer
Clutter-Message: [ +2746]:[BACKEND]:./clutter-backend.c:291:
Connecting the renderer
(clutter:89802): Clutter-CRITICAL **: Unable to initialize Clutter:
Failed to connected to any renderer due to constraints
I also added the following lines to the Portfile to run the included
test-suite with 'sudo port -vo test clutter':
test.run yes
test.dir ${worksrcpath}/tests/conform
test.env CLUTTER_DEBUG=backend
This fails early on a first test involving XOpenDisplay():
---> Testing clutter
TEST: wrappers/verify-failure... (pid=90157)
PASS: wrappers/verify-failure
TEST: wrappers/actor-add-child... (pid=90171)
Clutter-Message:
[1359114254914012]:[BACKEND]:./x11/clutter-backend-x11.c:369:
XOpenDisplay on '/tmp/launch-CzQrr3/org.macosforge.xquartz:0'
(/opt/local/var/macports/build/_Users_raimue_src_macports_trunk_dports_graphics_clutter/clutter/work/clutter-1.12.2/tests/conform/.libs/test-conformance:90171):
Clutter-CRITICAL **: Unable to initialize Clutter: Unable to open
display '/tmp/launch-CzQrr3/org.macosforge.xquartz:0'
GTester: last random seed: R02S58286b1d3ea95cfbcad3c53153ccbe3b
../../tests/conform/run-tests.sh: line 12: 90156 Terminated: 15
G_DEBUG=gc-friendly MALLOC_CHECK_=2 MALLOC_PERTURB_=$((${RANDOM:-256} %
256)) gtester "$@" $TESTS
make: *** [test] Error 143
Rainer
More information about the macports-users
mailing list