Build issues / FTGL

129 views
Skip to first unread message

Charles Goodwin

unread,
Jan 22, 2010, 12:40:27 PM1/22/10
to race...@googlegroups.com
I updated and tried to build.

I was getting this error from autogen.sh:

undefined macro: AC_PROG_LIBTOOL

Fixed by installing libtool.

Then I was getting this:

configure.in: required file `build-aux/ltmain.sh' not found

Fixed by doing this:

autoreconf -vfi

Now I get an FTGL error when running 'make' and compiling (see end of
email) - this is something that I have seen before, with
OpenWorldSoccer, and it is is apparently Fedora-related. With OWS,
the dev originally handled it by maintaining a different branch* for
Fedora but somehow got around it when he switched from Autotools to
Scons.

* https://openworldsoccer.svn.sourceforge.net/svnroot/openworldsoccer/branches/ftgl/

Anyway, help or fixes so it compiles for me (on Fedora 11) are appreciated.

- C

libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -DNDEBUG -O3 -Wall
-I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
-I/usr/include/freetype2 -I/usr/include/drm -I/usr/include/bullet
-I../.. -DNDEBUG -O3 -Wall -I/usr/include/SDL -D_GNU_SOURCE=1
-D_REENTRANT -I/usr/include/freetype2 -I/usr/include/drm
-I/usr/include/bullet -g -O2 -MT libui_la-BasicFonts.lo -MD -MP -MF
.deps/libui_la-BasicFonts.Tpo -c BasicFonts.cpp -fPIC -DPIC -o
.libs/libui_la-BasicFonts.o
In file included from BasicFonts.cpp:11:
BasicFonts.h:17:23: error: FTGL/ftgl.h: No such file or directory
In file included from BasicFonts.cpp:11:
BasicFonts.h:32: error: ‘FTTextureFont’ does not name a type
BasicFonts.h:33: error: ‘FTTextureFont’ does not name a type
BasicFonts.cpp: In constructor ‘UI::BasicFonts::BasicFonts()’:
BasicFonts.cpp:23: error: class ‘UI::BasicFonts’ does not have any
field named ‘small_font’
BasicFonts.cpp:24: error: class ‘UI::BasicFonts’ does not have any
field named ‘big_font’
BasicFonts.cpp:26: error: ‘small_font’ was not declared in this scope
BasicFonts.cpp:26: error: ‘big_font’ was not declared in this scope
BasicFonts.cpp:32: error: ‘small_font’ was not declared in this scope
BasicFonts.cpp:34: error: ‘ft_encoding_unicode’ was not declared in this scope
BasicFonts.cpp:36: error: ‘big_font’ was not declared in this scope
make[3]: *** [libui_la-BasicFonts.lo] Error 1
make[3]: Leaving directory `/home/charles/Games/racer/racer/UI'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/charles/Games/racer/racer'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/charles/Games/racer'
make: *** [all] Error 2

Charles Goodwin

unread,
Jan 22, 2010, 12:53:29 PM1/22/10
to race...@googlegroups.com
Ah... it's a case issue. It's FTGL.h in Fedora but the build process
is looking for ftgl.h which is obviously lowercase and thus can not be
found.

ls /usr/include/FTGL/FTGL.h
/usr/include/FTGL/FTGL.h

Apparently configure.in (or .ac?) needs some kind of check like this:

AC_CHECK_HEADERS([FTGL/ftgl.h ftgl.h], break, [
AC_CHECK_HEADERS([FTGL/FTGL.h FTGL.h], [

I'm a bit lost with autotools so I'll leave it there.

- C

2010/1/22 Charles Goodwin <cha...@webenableit.com>

James Legg

unread,
Jan 22, 2010, 5:05:35 PM1/22/10
to race...@googlegroups.com
On Fri, 2010-01-22 at 17:53 +0000, Charles Goodwin wrote:
> Ah... it's a case issue. It's FTGL.h in Fedora but the build process
> is looking for ftgl.h which is obviously lowercase and thus can not be
> found.

I've had a look at ftgl's version control system, and the header file
got renamed from FTGL.h to ftgl.h during some refactoring. I'm guessing
the version Fedora 11 has (2.1.2) is before this, and the version I have
(2.1.3-rc5) was after it. Fedora 12 has version 2.1.3-rc5 too by the
looks of it.

> Apparently configure.in (or .ac?) needs some kind of check like this:
>
> AC_CHECK_HEADERS([FTGL/ftgl.h ftgl.h], break, [
> AC_CHECK_HEADERS([FTGL/FTGL.h FTGL.h], [
>
> I'm a bit lost with autotools so I'll leave it there.

I think I've got autoconf to determine the header file based on the
version of ftgl it finds. However, there may have been important changes
to the way ftgl works other than the name of that file, so you could
still get build errors. (Though FTGL/ftgl.h: No such file or directory
shouldn't be one of them).

Can you try again with the latest trunk version and tell me how you get
on?

-James

Charlie

unread,
Jan 22, 2010, 8:03:45 PM1/22/10
to race...@googlegroups.com
On 22 January 2010 22:05, James Legg <lanky...@gmail.com> wrote:
> I think I've got autoconf to determine the header file based on the
> version of ftgl it finds. However, there may have been important changes
> to the way ftgl works other than the name of that file, so you could
> still get build errors. (Though FTGL/ftgl.h: No such file or directory
> shouldn't be one of them).
>
> Can you try again with the latest trunk version and tell me how you get
> on?
>
> -James

Right you are, different error now.

- C

libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -DNDEBUG -O3 -Wall
-I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
-I/usr/include/freetype2 -I/usr/include/drm -I/usr/include/bullet
-I../.. -DNDEBUG -O3 -Wall -I/usr/include/SDL -D_GNU_SOURCE=1
-D_REENTRANT -I/usr/include/freetype2 -I/usr/include/drm
-I/usr/include/bullet -g -O2 -MT libui_la-BasicFonts.lo -MD -MP -MF
.deps/libui_la-BasicFonts.Tpo -c BasicFonts.cpp -fPIC -DPIC -o
.libs/libui_la-BasicFonts.o
In file included from BasicFonts.cpp:11:

BasicFonts.h:34: error: ‘FTTextureFont’ does not name a type
BasicFonts.h:35: error: ‘FTTextureFont’ does not name a type

James Legg

unread,
Jan 23, 2010, 10:34:57 PM1/23/10
to race...@googlegroups.com
2010/1/23 Charlie <charles...@gmail.com>:

> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -DNDEBUG -O3 -Wall
> -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
> -I/usr/include/freetype2 -I/usr/include/drm -I/usr/include/bullet
> -I../.. -DNDEBUG -O3 -Wall -I/usr/include/SDL -D_GNU_SOURCE=1
> -D_REENTRANT -I/usr/include/freetype2 -I/usr/include/drm
> -I/usr/include/bullet -g -O2 -MT libui_la-BasicFonts.lo -MD -MP -MF
> .deps/libui_la-BasicFonts.Tpo -c BasicFonts.cpp  -fPIC -DPIC -o
> .libs/libui_la-BasicFonts.o
> In file included from BasicFonts.cpp:11:
> BasicFonts.h:34: error: ‘FTTextureFont’ does not name a type

I installed ftgl 2.1.2 to reproduce this. I fixed the compile errors
and bugs I spotted due to the changes in FTGL.
Update again and you should have it working. :-)
-James

Charlie

unread,
Jan 24, 2010, 6:54:17 PM1/24/10
to race...@googlegroups.com
Getting closer. Probably another Fedora-specific thing, can't find bullet.

libtool: link: g++ -g -O2 -o racer racer-main.o racer-MainLoop.o
racer-RacerApp.o UI/.libs/libui.a Engine/.libs/libengine.a
Graphics/.libs/libgraphics.a ../libtrack/.libs/libtrack.a -lSDL
-lpthread -lGLU -lftgl -lfreetype -lGL -lbulletdynamics
-lbulletcollision -lbulletmath -lSDL_image -lGLEW
/usr/bin/ld: cannot find -lbulletdynamics
collect2: ld returned 1 exit status
make[3]: *** [racer] Error 1
make[3]: Leaving directory `/home/charles/Games/racer/racer'


make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/charles/Games/racer/racer'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/charles/Games/racer'
make: *** [all] Error 2

I did double check that I have it:

yum install bullet-devel
...
Package bullet-devel-2.75-1.fc11.i586 already installed and latest version
Nothing to do

Hope that helps.

- C

James Legg

unread,
Jan 25, 2010, 2:54:50 PM1/25/10
to race...@googlegroups.com
On Sun, 2010-01-24 at 23:54 +0000, Charlie wrote:
> Getting closer. Probably another Fedora-specific thing, can't find bullet.
>
> libtool: link: g++ -g -O2 -o racer racer-main.o racer-MainLoop.o
> racer-RacerApp.o UI/.libs/libui.a Engine/.libs/libengine.a
> Graphics/.libs/libgraphics.a ../libtrack/.libs/libtrack.a -lSDL
> -lpthread -lGLU -lftgl -lfreetype -lGL -lbulletdynamics
> -lbulletcollision -lbulletmath -lSDL_image -lGLEW
> /usr/bin/ld: cannot find -lbulletdynamics

> Package bullet-devel-2.75-1.fc11.i586 already installed and latest version

It looks like it is trying to link bullet statically, but, looking at
http://cvs.fedoraproject.org/viewvc/rpms/bullet/F-11/bullet.spec?revision=1.2&view=markup
There are no static libraries provided, and no pkg-config configuration
either. I'm guessing you wrote your own pkg-config file from this:
http://groups.google.co.uk/group/racer-dev/browse_thread/thread/c81479e515962ad2
However it doesn't seem like you used the correct instructions to link
against the files provided by the Fedora package.

If so, can you replace the linker instructions:
-lbulletdynamics -lbulletcollision -lbulletmath
with something giving the full path to the .so files Fedora installs.

This might be:
/usr/lib/libbulletdynamics.so.0 /usr/lib/libbulletcollision.so.0 /usr/lib/libbulletmath.so.0
but check these files exist first. (They may have a different version
number or be in /usr/lib64/.

You can then recompile, but you may need to run ./configure again.

-James

Charlie

unread,
Jan 25, 2010, 4:40:58 PM1/25/10
to race...@googlegroups.com
That worked!

Final linker instructions are:
Libs: -L${libdir} /usr/lib/libBulletDynamics.so /usr/lib/libBulletCollision.so

(No bulletmath)

- C

2010/1/25 James Legg <lanky...@gmail.com>:

stph...@googlemail.com

unread,
Jan 25, 2010, 3:37:25 PM1/25/10
to Racer Development
Hi,
i tried to build the latest SVN and i'm having building problems too:

make all-recursive
make[1]: Entering directory `racer'
Making all in libtrack
make[2]: Entering directory `racer/libtrack'
Making all in document
make[3]: Entering directory `racer/libtrack/document'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `racer/libtrack/document'
Making all in edit_base
make[3]: Entering directory `racer/libtrack/edit_base'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `racer/libtrack/edit_base'
Making all in path
make[3]: Entering directory `racer/libtrack/path'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `racer/libtrack/path'
Making all in Mesh
make[3]: Entering directory `racer/libtrack/Mesh'
make[3]: *** No rule to make target `all'. Stop.
make[3]: Leaving directory `racer/libtrack/Mesh'


make[2]: *** [all-recursive] Error 1

make[2]: Leaving directory `racer/libtrack'


make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `racer'


make: *** [all] Error 2

I've tried autogen.sh, autoreconf -fi and just make.

When I start make in the racer/racer directory I'll end up with the
following error:


Making all in
UI
make[1]: Entering directory `racer/racer/
UI'
make[1]: Nothing to be done for
`all'.
make[1]: Leaving directory `racer/racer/
UI'
Making all in
Graphics
make[1]: Entering directory `racer/racer/
Graphics'
make[1]: Nothing to be done for
`all'.
make[1]: Leaving directory `racer/racer/
Graphics'
Making all in
Engine
make[1]: Entering directory `racer/racer/
Engine'
Making all in
GameObjects
make[2]: Entering directory `racer/racer/Engine/
GameObjects'
make[2]: Nothing to be done for
`all'.
make[2]: Leaving directory `racer/racer/Engine/
GameObjects'
Making all in
Physics
make[2]: Entering directory `racer/racer/Engine/
Physics'
make[2]: Nothing to be done for
`all'.
make[2]: Leaving directory `racer/racer/Engine/
Physics'
make[2]: Entering directory `racer/racer/
Engine'
make[2]: Nothing to be done for `all-
am'.
make[2]: Leaving directory `racer/racer/
Engine'
make[1]: Leaving directory `racer/racer/
Engine'
Making all in
data
make[1]: Entering directory `racer/racer/
data'
make[1]: Nothing to be done for
`all'.
make[1]: Leaving directory `racer/racer/
data'
make[1]: Entering directory `racer/
racer'
/bin/sh ../libtool --tag=CXX --mode=link g++ -g -O2 -o racer
racer-main.o racer-MainLoop.o racer-RacerApp.o UI/libui.la Engine/
libengine.la Graphics/libgraphics.la ../libtrack/libtrack.la -lSDL -
lpthread -lfreetype -lftgl -lGL -lBulletDynamics -lBulletCollision -
lLinearMath -lBulletSoftBody -lSDL_image -
lGLEW


libtool: link: g++ -g -O2 -o racer racer-main.o racer-MainLoop.o racer-
RacerApp.o UI/.libs/libui.a Engine/.libs/libengine.a Graphics/.libs/

libgraphics.a ../libtrack/.libs/libtrack.a /usr/lib/libftgl.so -L/usr/
lib /usr/lib/libfreetype.so -lz /usr/lib/libGLU.so -lstdc++ /usr/lib/
libGL.so /usr/lib/libXmu.so /usr/lib/libXt.so /usr/lib/libSM.so -
luuid /usr/lib/libICE.so /usr/lib/libXi.so /usr/lib/libXext.so /usr/
lib/libX11.so /usr/lib/libxcb.so /usr/lib/libXau.so /usr/lib/
libXdmcp.so -lBulletDynamics -lBulletCollision -lLinearMath -
lBulletSoftBody /usr/lib/libSDL_image.so /usr/lib/libSDL.so -lm -ldl -
lpthread -
lGLEW
racer-RacerApp.o: In function
`RacerApp':
racer/racer/RacerApp.cpp:36: undefined reference to
`Track::DataCheck::DataCheck()'
racer/racer/RacerApp.cpp:36: undefined reference to
`Track::DataCheck::DataCheck()'
Engine/.libs/libengine.a(libengine_la-GameScene.o): In function
`GameScene':
racer/racer/Engine/GameScene.cpp:42: undefined reference to
`Track::OcclusionTester::OcclusionTester
()'
racer/racer/Engine/GameScene.cpp:83: undefined reference to
`Track::OcclusionTester::~OcclusionTester
()'
Engine/.libs/libengine.a(libengine_la-GameScene.o): In function
`~GameScene':
racer/racer/Engine/GameScene.cpp:111: undefined reference to
`Track::OcclusionTester::~OcclusionTester
()'
racer/racer/Engine/GameScene.cpp:111: undefined reference to
`Track::OcclusionTester::~OcclusionTester
()'
racer/racer/Engine/GameScene.cpp:111: undefined reference to
`Track::OcclusionTester::~OcclusionTester()'
racer/racer/Engine/GameScene.cpp:111: undefined reference to
`Track::OcclusionTester::~OcclusionTester()'
Engine/.libs/libengine.a(libengine_la-GameScene.o):racer/racer/Engine/
GameScene.cpp:111: more undefined references to
`Track::OcclusionTester::~OcclusionTester()' follow
Engine/.libs/libengine.a(libengine_la-GameScene.o): In function
`GameScene':
racer/racer/Engine/GameScene.cpp:42: undefined reference to
`Track::OcclusionTester::OcclusionTester()'
racer/racer/Engine/GameScene.cpp:83: undefined reference to
`Track::OcclusionTester::~OcclusionTester()'
Engine/.libs/libengine.a(libgameobjects_la-Car.o): In function
`Track::AABBDrawable::~AABBDrawable()':
Car.cpp:(.text._ZN5Track12AABBDrawableD1Ev
[Track::AABBDrawable::~AABBDrawable()]+0x27): undefined reference to
`vtable for Track::AABBDrawable'
Engine/.libs/libengine.a(libgameobjects_la-Car.o): In function
`Track::AABBDrawable::~AABBDrawable()':
Car.cpp:(.text._ZN5Track12AABBDrawableD0Ev
[Track::AABBDrawable::~AABBDrawable()]+0x2c): undefined reference to
`vtable for Track::AABBDrawable'
Engine/.libs/libengine.a(libgameobjects_la-Car.o):
(.data.rel.ro._ZTVN6Engine11GameObjects3CarE[vtable for
Engine::GameObjects::Car]+0x28): undefined reference to
`Track::AABBDrawable::conditional_draw(Track::OcclusionTester const&)
const'
Engine/.libs/libengine.a(libgameobjects_la-Car.o):
(.data.rel.ro._ZTCN6Engine11GameObjects3CarE0_N5Track12AABBDrawableE
[vtable for Engine::GameObjects::Car]+0x18): undefined reference to
`typeinfo for Track::AABBDrawable'
Engine/.libs/libengine.a(libgameobjects_la-Car.o):
(.data.rel.ro._ZTCN6Engine11GameObjects3CarE0_N5Track12AABBDrawableE
[vtable for Engine::GameObjects::Car]+0x28): undefined reference to
`Track::AABBDrawable::conditional_draw(Track::OcclusionTester const&)
const'
Engine/.libs/libengine.a(libgameobjects_la-Car.o):
(.data.rel.ro._ZTCN6Engine11GameObjects3CarE0_N5Track12AABBDrawableE
[vtable for Engine::GameObjects::Car]+0x34): undefined reference to
`typeinfo for Track::AABBDrawable'
Engine/.libs/libengine.a(libgameobjects_la-Car.o):
(.data.rel.ro._ZTIN6Engine11GameObjects3CarE[typeinfo for
Engine::GameObjects::Car]+0x10): undefined reference to `typeinfo for
Track::AABBDrawable'


collect2: ld returned 1 exit status

make[1]: *** [racer] Error 1
make[1]: Leaving directory `racer/racer'
make: *** [all-recursive] Error 1


Any hints?

James Legg

unread,
Jan 25, 2010, 6:44:55 PM1/25/10
to race...@googlegroups.com
On Mon, 2010-01-25 at 12:37 -0800, stph...@googlemail.com wrote:
> Hi,
> i tried to build the latest SVN and i'm having building problems too:
>

> Making all in Mesh


> make[3]: Entering directory `racer/libtrack/Mesh'
> make[3]: *** No rule to make target `all'. Stop.

This is strange. If the makefile racer/libtrack/Mesh/Makefile exists, it
is broken. I would suggest deleting it, then making it again by
using ./configure.

If configure reports any errors or warnings, report it here so I can try
to identify what is going wrong.

It should say:
config.status: creating libtrack/Mesh/Makefile
in a list of similar lines near the end of its output.

If configure goes without error, make should work again.

> When I start make in the racer/racer directory I'll end up with the
> following error:

Most of the files in racer (and racer_editor) need to link against the
library built in libtrack, so that must compile successfully first.

-James

Reply all
Reply to author
Forward
0 new messages