./configure --enable-static Not adding required libs? (Mac)
Moderator: OpenTTD Developers
./configure --enable-static Not adding required libs? (Mac)
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! ) 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?
./configure --enable-static
make -j8
make bundle
The game runs very well on my MacBook Pro (and I love the game very much! ) 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?
Re: ./configure --enable-static Not adding required libs? (Mac)
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:
there's two solutions here:
- you can install said library (in the correct version)
- or you can compile a "static" build that already contains its own copy of the library (need to dig through ./configure options for that)
- andythenorth
- Tycoon
- Posts: 5658
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Re: ./configure --enable-static Not adding required libs? (Mac)
You could try
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.
Code: Select all
./configure --without-freetype
This used to be necessary with some older OS X versions where there were issues with freetype.
FIRS Industry Replacement Set (released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (finished)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Re: ./configure --enable-static Not adding required libs? (Mac)
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.
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.
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: ./configure --enable-static Not adding required libs? (Mac)
With the *same* error message as above - or is another library missing in that case?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.
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: ./configure --enable-static Not adding required libs? (Mac)
Thank you for the continued support
Just complains about library missing
I would thought that the needed libraries would be copied to the bundle?
Just complains about library missing
I would thought that the needed libraries would be copied to the bundle?
Re: ./configure --enable-static Not adding required libs? (Mac)
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
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
Who is online
Users browsing this forum: No registered users and 36 guests