./configure --enable-static Not adding required libs? (Mac)

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
UKSparkle
Engineer
Engineer
Posts: 3
Joined: 19 Oct 2018 03:04

./configure --enable-static Not adding required libs? (Mac)

Post by UKSparkle »

I have tried to compile OpenTTD (1.8.0) on my MacBook Pro Mojave and 'succeeded' using the following commands

./configure --enable-static
make -j8
make bundle

The game runs very well on my MacBook Pro (and I love the game very much! :bow: ) However, when I zip the bundle directory and copy the file to my iMac. It complains that the libs can not be found.
>
Dyld Error Message:
Library not loaded: /usr/local/lib/libfreetype.6.dylib
Referenced from: /User/<name>/Download/OpenTTD/OpenTTD.app/Contents/MacOS/openttd
Reason: image not found
>

Did I do something wrong? :o
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: ./configure --enable-static Not adding required libs? (Mac)

Post by Eddi »

i'm going to go on a limb here and assume that you didn't install the library on the other computer, and that's why it can't find it.

there's two solutions here:
  1. you can install said library (in the correct version)
  2. or you can compile a "static" build that already contains its own copy of the library (need to dig through ./configure options for that)
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5656
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: ./configure --enable-static Not adding required libs? (Mac)

Post by andythenorth »

You could try

Code: Select all

./configure --without-freetype
But I haven't actually tried that, so I don't know if it will help, sorry :)

This used to be necessary with some older OS X versions where there were issues with freetype.
UKSparkle
Engineer
Engineer
Posts: 3
Joined: 19 Oct 2018 03:04

Re: ./configure --enable-static Not adding required libs? (Mac)

Post by UKSparkle »

Thank you for your response:

Eddi: I have tried the static option enabled (with results in a successful build but unable to run on other computers)

andythenorth: Out of interest, I tried "./configure --enable-static --without-freetype" and again, no luck.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: ./configure --enable-static Not adding required libs? (Mac)

Post by planetmaker »

UKSparkle wrote:Thank you for your response:

Eddi: I have tried the static option enabled (with results in a successful build but unable to run on other computers)

andythenorth: Out of interest, I tried "./configure --enable-static --without-freetype" and again, no luck.
With the *same* error message as above - or is another library missing in that case?
UKSparkle
Engineer
Engineer
Posts: 3
Joined: 19 Oct 2018 03:04

Re: ./configure --enable-static Not adding required libs? (Mac)

Post by UKSparkle »

Thank you for the continued support

Just complains about library missing

I would thought that the needed libraries would be copied to the bundle?
Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 619
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: ./configure --enable-static Not adding required libs? (Mac)

Post by Michi_cc »

No, static means that the library code will be included in the app file itself, not that the normal lib will be copied.
For that to work the libraries itself also need to be present in a special static lib version. I guess that either configure picks the wrong lib file or that you don't have a static lib and the linker silently uses the dynamic lib anyway.

-- Michael Lutz
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 14 guests