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

Standard C++ header names may conflict with target names #4414

Open
mwichmann opened this issue Sep 15, 2023 · 0 comments
Open

Standard C++ header names may conflict with target names #4414

mwichmann opened this issue Sep 15, 2023 · 0 comments
Labels

Comments

@mwichmann
Copy link
Collaborator

mwichmann commented Sep 15, 2023

The C++ standard defines a number of headers which do not have filename suffixes. This seems to cause problems when the scanner detects usage of such a header and a target has the same name. For reference, here's an informal listing: https://en.cppreference.com/w/cpp/header

A very simple example (similar to one in the email thread) shows this:

#include <map>

int main(int, char **) { }

SConstruct:

Program("map", "map.cc")

Results:

scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: done building targets.

scons: *** Found dependency cycle(s):
  map -> map.o -> map

File "/home/mats/github/scons/SCons/Taskmaster/__init__.py", line 1128, in cleanup

Since <map> is not in the build directory (on this particular system, it lives in /usr/include/c++/13/debug/map) this shouldn't be any conflict, but I'm guessing we don't know that in the place it's being looked at. At the very least, docs need to provide some guidance about this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant