glew compiled without -fPIC flag

Bug #811789 reported by Miłosz Kosobucki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
glew (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I'm developing a shared library that uses GLEW. When I'm trying to link it I get the following error:

/usr/bin/ld: /usr/lib64/libGLEW.a(glew.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/lib64/libGLEW.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

It seems that GLEW in ubuntu is compiled without -fPIC flag.
When I compile my library as static I get no errors.

Revision history for this message
Miłosz Kosobucki (mikom) wrote :

Adding simple testcase.

This wiki page has valid points about why static libraries should be compiled with PIC
http://fedoraproject.org/wiki/User:Tibbs/Text_Relocation_Guidelines

Revision history for this message
Nigel Stewart (nigels) wrote :

I've put a fix into GLEW which will appear in the release after 1.9.0.

- Nigel

Revision history for this message
Matthias Klose (doko) wrote :

according to the build logs this is at least fixed in 14.04 LTS

Changed in glew (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.