Bug 43228 - build (linking): many multiple definitions of symbols - cairo-gl only (GCC 4.6.2)
Summary: build (linking): many multiple definitions of symbols - cairo-gl only (GCC 4....
Status: RESOLVED WORKSFORME
Alias: None
Product: cairo
Classification: Unclassified
Component: gl backend (show other bugs)
Version: 1.10.3
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: cairo-bugs mailing list
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-24 10:37 UTC by Daniel Housar
Modified: 2013-08-30 14:54 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Daniel Housar 2011-11-24 10:37:31 UTC
Compilation went fine, but when it tried link *.o objects to libcairo.la file, there apeared errors about multiple definitions of symbols in cairo-gl-*.o files.

Cairo sources: 1.11.3 (GIT master 24.11.2011) - git.freedesktop.org

System:
GCC 4.6.2 (ArchLinux package repository)
glibc 2.14.1 (ArchLinux package repository)
Mesa: 7.12.0 GIT master (11. Nov. 2011)
Linux 3.2.0-rc2+ (nouveau GIT tree)
arch: x86 (32-bit) - 1 CPU core (not SMP)

I have not access to other Linux machines, so I can't try to reproduce this bug in another environment.

Partial output of 'make':

make[4]: Leaving directory `/src/freedesktop.org/cairo'
  CCLD   libcairo.la
.libs/cairo-gl-composite.o: In function `_cairo_gl_composite_set_source':
/src/freedesktop.org/cairo/src/cairo-gl-composite.c:60: multiple definition of `_cairo_gl_composite_set_source'
.libs/cairo-gl-composite.o:/src/freedesktop.org/cairo/src/cairo-gl-composite.c:60: first defined here
...
...
...
.libs/cairo-gl-surface.o: In function `INT_cairo_gl_surface_create_for_texture':
/src/freedesktop.org/cairo/src/cairo-gl-surface.c:586: multiple definition of `cairo_gl_surface_create_for_texture'
.libs/cairo-gl-surface.o:/src/freedesktop.org/cairo/src/cairo-gl-surface.c:586: first defined here
collect2: ld returned 1 exit status
make[3]: *** [libcairo.la] Error 1
Comment 1 Daniel Housar 2011-11-25 08:58:40 UTC
Today (25th November 2011 16:52 UTC), after 'git pull', multiple definition bug still appears. When I removed definition of function from header or commented its 'slim_hidden_def()', the output line about this symbol disappeared from 'make' output (wasn't duplicated). Changing declaration from cairo_private to extern doesn't help.
Comment 2 Chris Wilson 2012-10-21 16:41:55 UTC
I'm not away of anyone else hitting this issue so I presume it was either a transient issue in the sources, or something went very wrong with the build.
Comment 3 Stirling Westrup 2013-08-30 14:54:26 UTC
I've just hit this exact same bug. This is when compiling Cairo under CentOS 6.

I suspect its due to the fact that I have enabled a number of the experimental interfaces, as I have some projects planned that might have a use for them.

My configure invokation was:

./configure --enable-gl --enable-glesv2 --enable-directfb --enable-xlib-xcb --enable-test-surfaces --enable-tee --enable-xml

I suspect the issue is that I have both --enable-gl and --enable-glesv2 at the same time, as other folks have reported issues when doing that.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.