Bug 4683 - __global_image_glyph_cache_mutex not defined
Summary: __global_image_glyph_cache_mutex not defined
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: win32 backend (show other bugs)
Version: 1.0.2
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Owen Taylor
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-04 03:56 UTC by Mathias Hasselmann
Modified: 2005-10-03 19:26 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
A fix for the problem. (1.03 KB, patch)
2005-10-04 03:57 UTC, Mathias Hasselmann
Details | Splinter Review

Description Mathias Hasselmann 2005-10-04 03:56:27 UTC
Building **version 1.0.2** for mingw32 without pthreads support fails:

 i386-mingw32msvc-gcc -shared .libs/libcairo-2.dll.def  .libs/cairo.o
.libs/cairo-arc.o .libs/cairo-array.o .libs/cairo-cache.o .libs/cairo-clip.o
.libs/cairo-color.o .libs/cairo-debug.o .libs/cairo-fixed.o .libs/cairo-font.o
.libs/cairo-font-options.o .libs/cairo-gstate.o .libs/cairo-hash.o
.libs/cairo-hull.o .libs/cairo-image-surface.o .libs/cairo-matrix.o
.libs/cairo-path.o .libs/cairo-path-bounds.o .libs/cairo-path-data.o
.libs/cairo-path-fill.o .libs/cairo-path-stroke.o .libs/cairo-pen.o
.libs/cairo-polygon.o .libs/cairo-region.o .libs/cairo-slope.o
.libs/cairo-spline.o .libs/cairo-surface.o .libs/cairo-traps.o
.libs/cairo-pattern.o .libs/cairo-unicode.o .libs/cairo-output-stream.o
.libs/cairo-wideint.o .libs/cairo-meta-surface.o .libs/cairo-ft-font.o
.libs/cairo-pdf-surface.o .libs/cairo-font-subset.o .libs/cairo-win32-surface.o
.libs/cairo-win32-font.o -Wl,--whole-archive ../pixman/src/.libs/libpixman.a
-Wl,--no-whole-archive  -L/var/tmp/photobuch/runtime/toolkit/lib -lgdi32
-lmsimg32 /var/tmp/photobuch/runtime/toolkit/lib/libfontconfig.dll.a
/var/tmp/photobuch/runtime/toolkit/lib/libfreetype.dll.a -lz -lm  -march=i686 -o
.libs/libcairo-2.dll -Wl,--image-base=0x10000000
-Wl,--out-implib,.libs/libcairo.dll.a
Creating library file: .libs/libcairo.dll.a
.libs/cairo-font.o(.text+0x1289):cairo-font.c: undefined reference to
`__global_image_glyph_cache_mutex'
.libs/cairo-font.o(.text+0x12b2):cairo-font.c: undefined reference to
`__global_image_glyph_cache_mutex'
.libs/cairo-font.o(.text+0x12d5):cairo-font.c: undefined reference to
`__global_image_glyph_cache_mutex'

Fix is to declare "_global_image_glyph_cache_mutex" in "cairo-win32-surface.c"
and to initialize it in "DllMain".

Wondering why that mutex doesn't has a "cairo" prefix like its friends.
Comment 1 Mathias Hasselmann 2005-10-04 03:57:46 UTC
Created attachment 3477 [details] [review]
A fix for the problem.
Comment 2 Carl Worth 2005-10-04 12:26:15 UTC
Thanks for the report. This fix has already been applied to 1.0.3.

(And, FYI, in 1.1.1 where the original DllMain originated, the mutex objects all
have consistent names.)

-Carl


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.