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

compiling on a mac: library 'stdc++fs' not found #46

Open
mchernos opened this issue May 17, 2024 · 1 comment
Open

compiling on a mac: library 'stdc++fs' not found #46

mchernos opened this issue May 17, 2024 · 1 comment

Comments

@mchernos
Copy link

Hi,

When compiling on MacOS, using make GCC we get the following error (tested on several macs from 2018 onwards):

ld: library 'stdc++fs' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [GCC] Error 1

Following https://stackoverflow.com/questions/74891427/make-error-library-not-found-for-lstdcfs we were able to compile by removing the -lstdc++fs in the makefile. i.e.

GCC:	$(SRC_FILES_CPP) $(SRC_FILES_C)
	g++ -std=c++17 -I$(INCLUDE_DIR) -I$(MPI_MEM_INCLUDE) $(SRC_FILES_CPP) $(MEM_FILES_C) -ldl -o Ostrich
	rm -f *.o
@dloney
Copy link
Collaborator

dloney commented May 22, 2024

I think this is most likely a structural difference between Mac and Linux C++ libraries and compiler versions. I just recompiled again today on Linux, and the flag was necessary to include it on relatively new versions of RedHad and OpenSUSE. @lbearup We could modify the make file with an architecture input that would disable the filesystem flag until all the GCC compilers came standard with it?

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