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

Unable to compile on MacOS #77410

Closed
johannes-graner opened this issue Oct 28, 2024 · 3 comments · Fixed by #77413
Closed

Unable to compile on MacOS #77410

johannes-graner opened this issue Oct 28, 2024 · 3 comments · Fixed by #77413
Labels
(S3 - Duplicate) Bug that is duplicate of another one

Comments

@johannes-graner
Copy link
Contributor

Describe the bug

Both the automatic release process and myself compiling locally fails with the following error:

src/third-party/imgui/imgui_freetype.cpp:38:10: fatal error: 'ft2build.h' file not found
#include <ft2build.h>
         ^~~~~~~~~~~~
1 error generated.

which clearly indicates that libraries are not included and linked properly.

Attach save file

N/A

Steps to reproduce

On MacOS, run e.g. make RELEASE=1 TILES=1 SOUND=1 LOCALIZE=0 CLANG=0 and watch the compilation fail.

Expected behavior

The compilation succeeds.

Screenshots

No response

Versions and configuration

OS: MacOS Sequoia 15.0

Additional context

The following addition to Makefile made the compilation succeed:

@@ -765,6 +765,8 @@ ifeq ($(TILES), 1)
     LDFLAGS += $(shell $(PKG_CONFIG) --libs freetype2)
   endif
 
+  CXXFLAGS += $(shell $(PKG_CONFIG) --cflags freetype2)
+  LDFLAGS += $(shell $(PKG_CONFIG) --libs freetype2)
   DEFINES += -DTILES
 
   ifeq ($(TARGETSYSTEM),WINDOWS)

So the problem is likely that the freetype2 library is not included properly for MacOS. It should probably be quite easy to fix for someone more familiar with the makefile than me.

@johannes-graner johannes-graner added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Oct 28, 2024
@andrei8l
Copy link
Contributor

/duplicate of #77370. We don't have an active MacOS developer at the moment. Feel free to PR your fix

@github-actions github-actions bot added (S3 - Duplicate) Bug that is duplicate of another one and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Oct 28, 2024
@JonathanCLo
Copy link

i've had to use freetype-config --cflag and --lib respectively

@Ivan-Shestakov
Copy link
Contributor

The solution from #77413 allowed me to complete the build. @johannes-graner thanks for the solution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(S3 - Duplicate) Bug that is duplicate of another one
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants