Bug 5136 - fbpict.c doesn't compile with gcc-4.* (symbol `_cairo_pixman_composite' is already defined)
fbpict.c doesn't compile with gcc-4.* (symbol `_cairo_pixman_composite' is al...
Product: pixman
Classification: Unclassified
Component: pixman
x86 (IA32) Linux (All)
: high major
Assigned To: Carl Worth
cairo-bugs mailing list
Depends on:
  Show dependency treegraph
Reported: 2005-11-23 21:31 UTC by Ervin Németh
Modified: 2006-03-15 07:45 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Ervin Németh 2005-11-23 21:31:03 UTC
Using gcc version 4.0.2 on my i686-pc-linux-gnu I get the following error
compiling fbpict.c:

i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I.
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -march=pentium-m -mmmx -msse
-msse2 -mfpmath=sse -O2 -maccumulate-outgoing-args -minline-all-stringops
-funroll-loops -fpeel-loops -funswitch-loops -fprefetch-loop-arrays
-finline-functions -finline-limit=24 -fmodulo-sched -fgcse-sm -fgcse-las
-fgcse-after-reload -floop-optimize2 -fvariable-expansion-in-unroller -ftracer
--param=max-unrolled-insns=16 --param=max-unswitch-insns=24
--param=max-reload-search-insns=256 -MT fbpict.lo -MD -MP -MF .deps/fbpict.Tpo
-c fbpict.c  -fPIC -DPIC -o .libs/fbpict.o
{standard input}: Assembler messages:
{standard input}:6373: Error: symbol `_cairo_pixman_composite' is already defined
Comment 1 Carl Worth 2005-11-24 01:33:22 UTC
Can you look at the ChangeLog to see what the most recent change is in the code
you are trying to compile?

In particular, I'd like to know if the following change is present or not:

2005-11-21  Carl Worth  <cworth@cworth.org>

        * src/pixman-remap.h: Remove duplicate definitions of
        pixman_color_to_pixel and pixman_composite.
Comment 2 Ervin Németh 2005-11-24 02:00:18 UTC
No, the newest entry in ChangeLog is of 2005-09-18.

I was compiling cairo-1.0.2. Sorry if you have fixed this already in the CVS.
Comment 3 Carl Worth 2005-11-24 02:25:51 UTC
Yes, this is a known bug in 0.1.2, which should be fixed in CVS already.

The fix is also quite easy to apply yourself if desired:

Index: pixman/src/pixman-remap.h
RCS file: /mirrors/freedesktop/cairo/cairo/pixman/src/pixman-remap.h,v
retrieving revision 1.5
retrieving revision 1.7
diff -u -p -r1.5 -r1.7
--- pixman/src/pixman-remap.h   22 Aug 2005 04:02:33 -0000      1.5
+++ pixman/src/pixman-remap.h   21 Nov 2005 19:46:40 -0000      1.7
@@ -1,9 +1,7 @@
 #define pixman_add_trapezoids _cairo_pixman_add_trapezoids
-#define INT_pixman_color_to_pixel _cairo_pixman_color_to_pixel
 #define pixman_color_to_pixel _cairo_pixman_color_to_pixel
 #define composeFunctions _cairo_pixman_compose_functions
 #define fbComposeSetupMMX _cairo_pixman_compose_setup_mmx
-#define INT_pixman_composite _cairo_pixman_composite
 #define pixman_composite _cairo_pixman_composite
 #define fbCompositeCopyAreammx _cairo_pixman_composite_copy_area_mmx
 #define fbCompositeSolidMask_nx8888x0565Cmmx
Comment 4 Carl Worth 2005-11-24 02:26:22 UTC
Mark as fixed (in CVS).
Comment 5 Ervin Németh 2005-11-24 02:45:40 UTC
Confirmed. After applying the patch the compiling succeeds. Thank you very much.
Comment 6 Behdad Esfahbod 2006-03-16 02:45:42 UTC
Is in 1.0 branch now.  Will be in 1.0.4 in an hour.