Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 369593

Summary: x11-libs/cairo-1.10.2 exports glew symbols
Product: Gentoo Linux Reporter: Vincent Le Ligeour <gentoo>
Component: [OLD] LibraryAssignee: Ben de Groot (RETIRED) <yngwin>
Status: RESOLVED FIXED    
Severity: normal CC: galtgendo, x11
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=34021
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: test.cpp
cairo-1.10.2-export-symbols.patch

Description Vincent Le Ligeour 2011-06-01 00:57:43 UTC
x11-libs/cairo-1.10.2 export glew symbols of an embedded old version of glew leading to problem when linking with external glew and cairo.
Patch from debian git and code showing the problem will follow.

Reproducible: Always




# g++ -W -Wall test.cpp -o test -lSDL -lGLEW -lcairo -lGL -lGLU && ./test

and

# g++ -W -Wall test.cpp -o test -lSDL -lcairo -lGLEW -lGL -lGLU && ./test

are the 2 command lines that should lead to the same result. if the driver supports GL_ARB_viewport_array the bug is exhibited and second compilation display (nil) instead of the correct address.
By adding the following patch behavior is back to normal
Comment 1 Vincent Le Ligeour 2011-06-01 00:58:52 UTC
Created attachment 275425 [details]
test.cpp

sample code
Comment 2 Vincent Le Ligeour 2011-06-01 00:59:51 UTC
Created attachment 275427 [details, diff]
cairo-1.10.2-export-symbols.patch

Patch from debian git
http://anonscm.debian.org/gitweb/?p=collab-maint/cairo.git;a=tree;f=debian/patches;h=44d6d0dada5ce64db15331257a1cc0ce9ec68070;hb=HEAD
Comment 3 Rémi Cardona (RETIRED) gentoo-dev 2011-06-04 15:21:23 UTC
How about setting $(export_symbol) at the top in an '#else' statement instead? That would probably stand a better chance of being accepted upstream.

Thanks
Comment 4 Rafał Mużyło 2011-10-02 16:20:16 UTC
So, it was fixed in the master by removing glew.

But the functions use to substitute are only available in the master.

The answer probably lies in the bit cryptic content of this commit:
http://cgit.freedesktop.org/cairo/commit/configure.ac?id=b101c7dab8cdbf7b9321355a8d2311b2f863f011

Chances are that the solution from comment 2 ain't that bad for 1.10.
Comment 5 Rafał Mużyło 2011-10-02 16:33:47 UTC
What's more, it seems that right now cairo has an automagical dependency on mesa[egl] (as unless opengl-apple provides egl too it the only egl provider (that I know of)).
Comment 6 Doug Goldstein (RETIRED) gentoo-dev 2012-07-14 19:17:27 UTC
spatz maintains this now
Comment 7 Ben de Groot (RETIRED) gentoo-dev 2012-07-25 08:44:14 UTC
Applied in 1.10.2-r3. Thanks!