Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS apple silicon m1 arm64 build fail #3122

Open
naymapl opened this issue Mar 12, 2022 · 1 comment
Open

macOS apple silicon m1 arm64 build fail #3122

naymapl opened this issue Mar 12, 2022 · 1 comment

Comments

@naymapl
Copy link

naymapl commented Mar 12, 2022

Hello. Like in topic I try to build in on macOS on arm64 and fail:

[100%] Linking CXX executable teeworlds
ld: warning: dylib (/opt/local/lib/libcrypto.dylib) was built for newer macOS version (12.0) than being linked (11.0)
ld: warning: dylib (/opt/homebrew/Cellar/sdl2/2.0.20/lib/libSDL2.dylib) was built for newer macOS version (12.0) than being linked (11.0)
ld: warning: ignoring file /Library/Frameworks/freetype.framework/freetype, missing required architecture arm64 in file /Library/Frameworks/freetype.framework/freetype (2 slices)
Undefined symbols for architecture arm64:
  "_FT_Done_Face", referenced from:
      CTextRender::LoadFontCollection(void const*, void const*, long) in textrender.cpp.o
  "_FT_Done_FreeType", referenced from:
      CTextRender::Shutdown() in textrender.cpp.o
  "_FT_Done_Glyph", referenced from:
      CGlyphMap::RenderGlyph(CGlyph*, bool) in textrender.cpp.o
  "_FT_Get_Char_Index", referenced from:
      CGlyphMap::GetCharGlyph(int, FT_FaceRec_**) in textrender.cpp.o
      CGlyphMap::RenderGlyph(CGlyph*, bool) in textrender.cpp.o
  "_FT_Get_Glyph", referenced from:
      CGlyphMap::RenderGlyph(CGlyph*, bool) in textrender.cpp.o
  "_FT_Get_Kerning", referenced from:
      CGlyphMap::Kerning(CGlyph*, CGlyph*, int) in textrender.cpp.o
      CTextRender::MakeWord(CTextCursor*, char const*, char const*, int, float, int, vector2_base<float>) in textrender.cpp.o
  "_FT_Glyph_Stroke", referenced from:
      CGlyphMap::RenderGlyph(CGlyph*, bool) in textrender.cpp.o
  "_FT_Glyph_To_Bitmap", referenced from:
      CGlyphMap::RenderGlyph(CGlyph*, bool) in textrender.cpp.o
  "_FT_Init_FreeType", referenced from:
      CTextRender::Init() in textrender.cpp.o
  "_FT_Load_Glyph", referenced from:
      CGlyphMap::RenderGlyph(CGlyph*, bool) in textrender.cpp.o
  "_FT_New_Memory_Face", referenced from:
      CTextRender::LoadFontCollection(void const*, void const*, long) in textrender.cpp.o
  "_FT_Set_Pixel_Sizes", referenced from:
      CGlyphMap::RenderGlyph(CGlyph*, bool) in textrender.cpp.o
      CGlyphMap::Kerning(CGlyph*, CGlyph*, int) in textrender.cpp.o
      CTextRender::MakeWord(CTextCursor*, char const*, char const*, int, float, int, vector2_base<float>) in textrender.cpp.o
  "_FT_Stroker_Done", referenced from:
      CGlyphMap::~CGlyphMap() in textrender.cpp.o
  "_FT_Stroker_New", referenced from:
      CGlyphMap::CGlyphMap(IGraphics*, FT_LibraryRec_*) in textrender.cpp.o
  "_FT_Stroker_Set", referenced from:
      CGlyphMap::RenderGlyph(CGlyph*, bool) in textrender.cpp.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [teeworlds] Error 1
make[1]: *** [CMakeFiles/teeworlds.dir/all] Error 2
make: *** [all] Error 2

Any idea how to fix this issue ?

@d3m3t3r
Copy link

d3m3t3r commented Apr 28, 2022

Cmake is using (and ignoring) your system freetype library which is not arm64. I would try to install freetype from Homebrew and delete/disable /Library/Frameworks/freetype.framework/ before running cmake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants