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

Compilation failure on Intel Mac of recent builds #77370

Open
Ivan-Shestakov opened this issue Oct 27, 2024 · 6 comments
Open

Compilation failure on Intel Mac of recent builds #77370

Ivan-Shestakov opened this issue Oct 27, 2024 · 6 comments
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility

Comments

@Ivan-Shestakov
Copy link
Contributor

Ivan-Shestakov commented Oct 27, 2024

Describe the bug

When trying to compile the game using latest master, I'm getting this error:

src/third-party/imgui/imgui_freetype.cpp:38:10: fatal error: 'ft2build.h' file not found

Here is my compile command

gmake -j 12 RELEASE=1 TILES=1 LOCALIZE=1 SOUND=1 CLANG=1 ASTYLE=0 RUNTESTS=0 LINTJSON=0

System information (from uname -a)
Darwin 23.6.0 Darwin Kernel Version 23.6.0: Wed Jul 31 20:48:44 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_X86_64 x86_64

Since I ain't good in git bisect command, I can't pinpoint which commit has broken this. But going back a few days, allows for successful build.

Looking on recently merged pull requests, I found this one https://github.com/CleverRaven/Cataclysm-DDA/pull/77289/files
When looking at it's affected files, it shows exactly the error I'm having
Uploading Screenshot 2024-10-27 at 9.47.53.png…

@katemonster33 - any idea how to fix on Mac?

Attach save file

N/A

Steps to reproduce

  1. Try to compile the game

Expected behavior

Compilation should end successfully.

Screenshots

No response

Versions and configuration

OS: MacOS Sonoma 14.7 (Intel)
GCC version: Apple clang version 15.0.0 (clang-1500.3.9.4) (but the bug reproduces with CLANG=0 and CLANG=1).

Additional context

No response

@Ivan-Shestakov Ivan-Shestakov added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Oct 27, 2024
@andrei8l
Copy link
Contributor

We are aware of this. If you're using homebrew, try installing freetype with brew install freetype

@Ivan-Shestakov
Copy link
Contributor Author

Found the reference to freetype in Linux sections in https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/COMPILING/COMPILING.md - but having freetype 2.13.3 installed doesn't help.
BTW, I do have ft2build.h in the freetype install location at /usr/local/Cellar/freetype/2.13.3/include/freetype2/ft2build.h

@LyleSY
Copy link
Contributor

LyleSY commented Nov 5, 2024

Hello, did #77360 fix this?

@perryprog
Copy link
Contributor

perryprog commented Nov 26, 2024

This is still an issue for Apple Silicon as Homebrew on macOS Apple Silicon installs headers to /opt/homebrew/include not /usr/include.
Example patch that would fix it for Apple Silicon (and break it for Intel):

diff --git a/src/third-party/CMakeLists.txt b/src/third-party/CMakeLists.txt
index 0ff648748b..71525ea0db 100644
--- a/src/third-party/CMakeLists.txt
+++ b/src/third-party/CMakeLists.txt
@@ -98,7 +98,7 @@ if (TILES)
                 SYSTEM
                 PRIVATE
                 ${SDL2_INCLUDE_DIR}/..
-                /usr/include/freetype2
+                /opt/homebrew/include/freetype2/
                 )

         target_compile_options(

(Though this still leaves a linking error... it seems like the target_link_libraries call isn't finding freetype at /opt/homebrew/lib/libfreetype.dylib for me, though manually specifying that gets it to work for me.)

@akrieger
Copy link
Member

#77818 fixed CI, #77413 fixed make builds.

@akrieger akrieger reopened this Nov 26, 2024
@akrieger
Copy link
Member

Whups, didn't mean to close, cmake is still busted. But cmake is lower tier supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility
Projects
None yet
Development

No branches or pull requests

5 participants