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

fatal error: 'filesystem' file not found #1065

Open
ryandesign opened this issue Nov 20, 2024 · 1 comment
Open

fatal error: 'filesystem' file not found #1065

ryandesign opened this issue Nov 20, 2024 · 1 comment

Comments

@ryandesign
Copy link

openal-soft 1.24.0 doesn't build on macOS 10.14 or earlier:

utils/makemhr/loaddef.cpp:33:10: fatal error: 'filesystem' file not found
#include <filesystem>
         ^~~~~~~~~~~~

Full build log: https://build.macports.org/builders/ports-10.14_x86_64-builder/builds/223612/steps/install-port/logs/stdio

It builds on macOS 12 and later.

This is a regression; 1.23.1 didn't have this problem.

std::filesystem is part of C++17 but the version of libc++ included with macOS 10.14 and earlier doesn't support it. Compiling with a newer version of clang that supports C++17 is not sufficient.

@kcat
Copy link
Owner

kcat commented Nov 20, 2024

std::filesystem is part of C++17 but the version of libc++ included with macOS 10.14 and earlier doesn't support it. Compiling with a newer version of clang that supports C++17 is not sufficient.

You should be able to static-link libc++. There is the ALSOFT_STATIC_STDCXX cmake option to link with -static-libstdc++, which the prebuilt Windows binaries use to avoid needing libstdc++.dll. According to this stackoverflow comment, it should work with Clang when using libc++ too (for Clang 14 at least; older versions may need to use a more esoteric command like -Wl,--push-state,-Bstatic,-lc++,-lc++abi,-Wl,--pop-state or something).

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