OpenMW / openmw-deps-mac

13 stars 11 forks source link

MyGUIEngine build fails: framework not found FREETYPE #13

Closed emlai closed 7 years ago

emlai commented 8 years ago

Followed the instructions in the readme and got the following error when running make:

[ 97%] Linking CXX shared library ../lib/libMyGUIEngine.dylib
ld: framework not found FREETYPE
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[5]: *** [lib/libMyGUIEngine.3.2.3.dylib] Error 1
make[4]: *** [MyGUIEngine/CMakeFiles/MyGUIEngine.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [src/mygui-prefix/src/mygui-stamp/mygui-build] Error 2
make[1]: *** [src/CMakeFiles/mygui.dir/all] Error 2
make: *** [all] Error 2
make  1355.52s user 127.88s system 93% cpu 26:28.86 total

I have freetype installed via homebrew.

nikolaykasyanov commented 8 years ago

Thanks for the report!

Freetype is supposed to be built before MyGUI, you don't have to install it separately.

I'll try to figure out what's happening when there's Freetype from Homebrew.

nikolaykasyanov commented 8 years ago

By the way, do you use sandboxed calls to cmake and make? Please refer to "Caveats" section of the readme for details.

emlai commented 8 years ago

Yeah, I tried the sandboxed way after this failed, but it failed with the same error as well.

emlai commented 8 years ago

Hmm, I now uninstalled the homebrew freetype and got a different error:

[ 92%] Building CXX object src/osgPlugins/freetype/CMakeFiles/osgdb_freetype.dir/FreeTypeFont.cpp.o
In file included from /Users/emlai/Documents/Code/openmw-deps-mac/src/openscenegraph/src/osgPlugins/freetype/FreeTypeFont.cpp:14:
In file included from /Users/emlai/Documents/Code/openmw-deps-mac/src/openscenegraph/src/osgPlugins/freetype/FreeTypeFont.h:19:
/Library/Frameworks/Mono.framework/Headers/ft2build.h:56:10: fatal error: 'freetype/config/ftheader.h' file not
      found
#include <freetype/config/ftheader.h>
         ^
nikolaykasyanov commented 8 years ago

@emlai are you rebuilding from scratch, i.e. purging build dir completely?

emlai commented 8 years ago

Yes.

emlai commented 8 years ago

This seems to be the same issue as (or related to) https://github.com/rougier/freetype-gl/issues/76.

nikolaykasyanov commented 8 years ago

Thanks for the update. Does downgrading to 7.3.1 help?

emlai commented 8 years ago

No, same error. Also tried with Xcode 8 GM seed, no luck.

emlai commented 8 years ago

It works if I remove freetype.framework from /Library/Frameworks.

nikolaykasyanov commented 8 years ago

@emlai: thanks for the update! I'll check if I can modify sandbox config to avoid that in the future.