build for mac os

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
Blood Angel
Engineer
Engineer
Posts: 63
Joined: 19 Mar 2004 12:35
Contact:

build for mac os

Post by Blood Angel »

I couldn't build for mac os 10.4.8 (intel)

Code: Select all

make OSX=1 PREFIX=/Users/blood/games/ottd BINARY_DIR=/Users/blood/games/ottd DATA_DIR=/Users/blood/games/ottd/data                   
make: freetype-config: Command not found
make: freetype-config: Command not found
[i386] Linking openttd
/usr/bin/ld: Undefined symbols:
_FT_Done_Face
_FT_Init_FreeType
_FT_Load_Char
_FT_New_Face
_FT_Render_Glyph
_FT_Select_Charmap
_FT_Set_Charmap
_FT_Set_Pixel_Sizes
collect2: ld returned 1 exit status
make: *** [.OSX/openttd.i386] Error 1
User avatar
XeryusTC
Tycoon
Tycoon
Posts: 15415
Joined: 02 May 2005 11:05
Skype: XeryusTC
Location: localhost

Post by XeryusTC »

It seems to me that you don't have freetype installed.
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
Image
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
Image Image Image Image Image Image Image
Blood Angel
Engineer
Engineer
Posts: 63
Joined: 19 Mar 2004 12:35
Contact:

Post by Blood Angel »

XeryusTC wrote:It seems to me that you don't have freetype installed.
Now I install freetype(2.3.1), but:

Code: Select all

# make OSX=1 PREFIX=/Users/blood/games/ottd BINARY_DIR=/Users/blood/games/ottd DATA_DIR=/Users/blood/games/ottd/data
make: freetype-config: Command not found
make: freetype-config: Command not found
[i386] Compiling fontcache.c
In file included from fontcache.c:17:
/usr/local/include/ft2build.h:56:38: error: freetype/config/ftheader.h: No such file or directory
fontcache.c:18:10: error: #include expects "FILENAME" or <FILENAME>
fontcache.c:19:10: error: #include expects "FILENAME" or <FILENAME>
fontcache.c:25: error: parse error before '_library'
fontcache.c:25: warning: type defaults to 'int' in declaration of '_library'
fontcache.c:25: warning: initialization makes integer from pointer without a cast
fontcache.c:25: warning: data definition has no type or storage class
fontcache.c:26: error: parse error before '_face_small'
fontcache.c:26: warning: type defaults to 'int' in declaration of '_face_small'
fontcache.c:26: warning: initialization makes integer from pointer without a cast
fontcache.c:26: warning: data definition has no type or storage class
fontcache.c:27: error: parse error before '_face_medium'
fontcache.c:27: warning: type defaults to 'int' in declaration of '_face_medium'
fontcache.c:27: warning: initialization makes integer from pointer without a cast
fontcache.c:27: warning: data definition has no type or storage class
fontcache.c:28: error: parse error before '_face_large'
fontcache.c:28: warning: type defaults to 'int' in declaration of '_face_large'
fontcache.c:28: warning: initialization makes integer from pointer without a cast
fontcache.c:28: warning: data definition has no type or storage class
fontcache.c:222: error: parse error before 'GetFontByFaceName'
fontcache.c:222: error: parse error before 'FT_Face'
fontcache.c:222: warning: return type defaults to 'int'
fontcache.c:222: warning: function declaration isn't a prototype
fontcache.c: In function 'GetFontByFaceName':
fontcache.c:222: warning: old-style function definition
fontcache.c:222: error: 'FT_Err_Cannot_Open_Resource' undeclared (first use in this function)
fontcache.c:222: error: (Each undeclared identifier is reported only once
fontcache.c:222: error: for each function it appears in.)
fontcache.c: At top level:
fontcache.c:233: error: parse error before 'FT_Face'
fontcache.c:234: warning: function declaration isn't a prototype
fontcache.c: In function 'LoadFreeTypeFont':
fontcache.c:234: warning: old-style function definition
fontcache.c:235: error: 'FT_Error' undeclared (first use in this function)
fontcache.c:235: error: parse error before 'error'
fontcache.c:237: error: 'font_name' undeclared (first use in this function)
fontcache.c:239: warning: implicit declaration of function 'FT_New_Face'
fontcache.c:239: error: 'face' undeclared (first use in this function)
fontcache.c:239: error: invalid lvalue in assignment
fontcache.c:241: error: 'FT_Err_Ok' undeclared (first use in this function)
fontcache.c:241: error: invalid lvalue in assignment
fontcache.c:247: warning: implicit declaration of function 'FT_Select_Charmap'
fontcache.c:247: error: 'ft_encoding_unicode' undeclared (first use in this function)
fontcache.c:247: error: invalid lvalue in assignment
fontcache.c:250: error: 'FT_Err_Invalid_CharMap_Handle' undeclared (first use in this function)
fontcache.c:254: error: 'FT_CharMap' undeclared (first use in this function)
fontcache.c:254: error: parse error before 'found'
fontcache.c:258: error: parse error before 'charmap'
fontcache.c:259: error: 'charmap' undeclared (first use in this function)
fontcache.c:260: error: 'found' undeclared (first use in this function)
fontcache.c:265: warning: implicit declaration of function 'FT_Set_Charmap'
fontcache.c:265: error: invalid lvalue in assignment
fontcache.c:271: warning: implicit declaration of function 'FT_Done_Face'
fontcache.c:274: error: 'type' undeclared (first use in this function)
fontcache.c: In function 'InitFreeType':
fontcache.c:285: warning: implicit declaration of function 'FT_Init_FreeType'
fontcache.c:285: error: 'FT_Err_Ok' undeclared (first use in this function)
fontcache.c:298: warning: comparison between pointer and integer
fontcache.c:298: warning: implicit declaration of function 'FT_Set_Pixel_Sizes'
fontcache.c:299: warning: comparison between pointer and integer
fontcache.c:300: warning: comparison between pointer and integer
fontcache.c: At top level:
fontcache.c:304: error: parse error before 'GetFontFace'
fontcache.c:305: warning: return type defaults to 'int'
fontcache.c: In function 'GetGlyph':
fontcache.c:364: error: 'FT_Face' undeclared (first use in this function)
fontcache.c:364: error: parse error before 'face'
fontcache.c:365: error: 'FT_GlyphSlot' undeclared (first use in this function)
fontcache.c:378: error: 'face' undeclared (first use in this function)
fontcache.c:388: error: 'slot' undeclared (first use in this function)
fontcache.c:390: warning: implicit declaration of function 'FT_Load_Char'
fontcache.c:390: error: 'FT_LOAD_DEFAULT' undeclared (first use in this function)
fontcache.c:391: warning: implicit declaration of function 'FT_Render_Glyph'
fontcache.c:391: error: 'FT_RENDER_MODE_MONO' undeclared (first use in this function)
fontcache.c: In function 'GetGlyphWidth':
fontcache.c:437: error: 'FT_Face' undeclared (first use in this function)
fontcache.c:437: error: parse error before 'face'
fontcache.c:440: error: 'face' undeclared (first use in this function)
make: *** [.OSX/fontcache.o.i386] Error 1
User avatar
Valance
Engineer
Engineer
Posts: 28
Joined: 06 Feb 2007 07:17

Post by Valance »

freetype-config: Command not found
Have you done "./configure" before calling "make"? Or even better "./configure --with-freetype=<path-to-your-freetype-config>"? (e.g. "./configure --with-freetype=/usr/local/bin/freetype-config")
Blood Angel
Engineer
Engineer
Posts: 63
Joined: 19 Mar 2004 12:35
Contact:

Post by Blood Angel »

I try to build 0.5.rc5

Code: Select all

# ./configure --with-freetype=/usr/local/bin/freetype-config 
Unknown switch --with-freetype=/usr/local/bin/freetype-config
User avatar
Valance
Engineer
Engineer
Posts: 28
Joined: 06 Feb 2007 07:17

Post by Valance »

Hm, there is another way, too. But first, you know where your freetype-config is? (just taking my given example would only work if yours is in /usr/local/bin, and I have absolutely no idea how the filesystem hierarchy looks like on mac os).

You can append the path to your freetype-config to your path environmental var like this: "export PATH=$PATH:/usr/local/bin" (I hope this works under mac os...)

Now, calling "make" should work.
Bjarni
Tycoon
Tycoon
Posts: 2088
Joined: 08 Mar 2004 13:10

Post by Bjarni »

for 0.5.0rc5 (not trunk), you will need to set the path to freetype-config manually (it tries to do it by itself, but fails).

To do this, you will need to call make like this:

Code: Select all

make FREETYPE_CONFIG:=path/freetype-config
(path is the absolute path)
If you already has a Makefile.config, either delete it or edit it and set FREETYPE_CONFIG to the absolute path.

Note: the trunk has a totally different configure and any makefile issues in 0.5.0rc5 are likely totally unrelated to the trunk.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Ahrefs [Bot] and 22 guests