Won't link when using ftglGetLayoutBBox

Bug #485225 reported by Flamey on 2009-11-19
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ftgl (Debian)
Fix Released
ftgl (Ubuntu)

Bug Description

Description: Ubuntu 9.10
Release: 9.10
  Installed: 2.1.3~rc5-2
  Candidate: 2.1.3~rc5-2
  Version table:
 *** 2.1.3~rc5-2 0
        500 http://us.archive.ubuntu.com karmic/universe Packages
        100 /var/lib/dpkg/status

When it try to compile an example that tries to call ftglGetLayoutBBox I get a link error.

$ cat example.c
#include <FTGL/ftgl.h>
int main(int argc, char **argv) {
    float bbox[6];
    ftglGetLayoutBBox(NULL, "Hello, world!", bbox);
    return 0;
$ gcc $(pkg-config --cflags --libs ftgl freetype2) -lglut example.c &&./a.out
/tmp/cc8b7sZG.o: In function `main':
example.c:(.text+0x21): undefined reference to `ftglGetLayoutBBox'
collect2: ld returned 1 exit status

However the expected result is
$ gcc $(pkg-config --cflags --libs ftgl freetype2) -lglut example.c &&./a.out
FTGL warning: NULL pointer in _ftglGetLayoutBBox

The bug is caused by a discrepancy between the function name in the header and library.

    $ readelf -s /usr/lib/libftgl.so|grep LayoutBBox
       579: 0000000000023bf0 313 FUNC GLOBAL DEFAULT 11 ftgGetlLayoutBBox

    $ grep GetLayoutBBox /usr/include/FTGL/FTLayout.h
    FTGL_EXPORT void ftglGetLayoutBBox(FTGLlayout *layout, const char* string,

Readelf shows that the function is named incorrectly (ftgGetlLayoutBBox), but the header FTLayout.h declared the function as ftglGetLayoutBBox.

Flamey (enzalx) on 2009-11-21
description: updated
Flamey (enzalx) wrote :

Added patch to be added to debian/patches for quilt to read.

Flamey (enzalx) on 2010-04-13
Changed in ftgl (Ubuntu):
assignee: nobody → MOTU (motu)
Changed in ftgl (Ubuntu):
status: New → Confirmed

I confirm both that the bug exists, and that the proposed fix solves this bug. It's been almost 2 years since the developer has updated the source, (2008-06-12) and this bug was originally reported as http://sourceforge.net/tracker/?func=detail&aid=2121813&group_id=202130&atid=980349 (2008-09-21). Due to it being unlikely that the original developer is going to respond, can we patch inside of ubuntu and hope that someone is able to pick it up upstream?

Emmet Hikory (persia) on 2010-05-06
Changed in ftgl (Ubuntu):
assignee: MOTU (motu) → nobody
tags: added: patch
Emmet Hikory (persia) on 2010-05-06
tags: added: patch-forwarded-debian patch-forwarded-upstream
Changed in ftgl (Debian):
status: Unknown → New
Changed in ftgl (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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