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: 'stdarg.h' file not found #31

Open
Tracked by #36
certik opened this issue Dec 21, 2023 · 4 comments
Open
Tracked by #36

fatal error: 'stdarg.h' file not found #31

certik opened this issue Dec 21, 2023 · 4 comments

Comments

@certik
Copy link
Contributor

certik commented Dec 21, 2023

I created a new lc environment and built it using the README.

I am getting the following error on macOS:

$ ./src/bin/lc integration_tests/array_09.cpp
Error while trying to load a compilation database:
Could not auto-detect compilation database for file "integration_tests/array_09.cpp"
No compilation database found in /Users/ondrej/repos/lcompilers/lc/integration_tests or any parent directory
fixed-compilation-database: Error while opening fixed database: No such file or directory
json-compilation-database: Error while opening JSON database: No such file or directory
Running without flags.
In file included from /Users/ondrej/repos/lcompilers/lc/integration_tests/array_09.cpp:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/iostream:37:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/ios:214:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/iosfwd:95:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/wchar.h:119:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/wchar.h:89:10: fatal error: 'stdarg.h' file not found
#include <stdarg.h>
         ^~~~~~~~~~
LCOMPILERS_ASSERT failed: /Users/ondrej/repos/lcompilers/lc/src/libasr/../libasr/asr.h
function down_cast(), line number 40 at 
f != nullptr
zsh: abort      ./src/bin/lc integration_tests/array_09.cpp
@czgdp1807
Copy link
Collaborator

I will try to share the zshrc configurations tomorrow morning. Its picking the wrong set of headers. That’s all. Path related issue.

@czgdp1807
Copy link
Collaborator

Oh I see.

@czgdp1807
Copy link
Collaborator

czgdp1807 commented Dec 21, 2023

Use the installed lc and not the one from src/bin/lc. Installed one goes to CONDA_PREFIX/bin. Add it to PATH and everything should work fine. These are all path related issues. Also, pass, -I$CONDA_PREFIX/include in —extra-arg.

@certik
Copy link
Contributor Author

certik commented Dec 21, 2023

I see. When you install it, it works!

lc integration_tests/array_09.cpp

That means one must always install using "make install", until we fix all these path issues (here is another one: #32).

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