Skip to content

Conversation

ArthurSonzogni
Copy link
Contributor

On linux. Most users haven't installed libc++-dev, but ANTLR is passing
the "--stdlib=libc++" argument. As a result, this won't compile. Users
will see:

/tmp/antlr4/runtime/Cpp/runtime/src/antlr4-common.h:8:10: fatal error:
'algorithm' file not found

This is caused by the "WITH_LIBCXX" option.
It was introduced by:
d46ef90

It causes the option "--stdlib=libc++" to be appended by default.

I believe its default value should have been left as "Off".

With "off" by default, clang will use its default C++ library, which is
always available.

The WITH_LIBCXX option is kept, being able to change the C++ library
might be useful?

BUG=#2898

On linux. Most users haven't installed libc++-dev, but ANTLR is passing
the "--stdlib=libc++" argument. As a result, this won't compile. Users
will see:
```
/tmp/antlr4/runtime/Cpp/runtime/src/antlr4-common.h:8:10: fatal error:
'algorithm' file not found
```

This is caused by the "WITH_LIBCXX" option.
It was introduced by:
antlr@d46ef90

It causes the option "--stdlib=libc++" to be appended by default.

I believe its default value should have been left as "Off".

With "off" by default, clang will use its default C++ library, which is
always available.

The WITH_LIBCXX option is kept, being able to change the C++ library
might be useful?

BUG=antlr#2898
@ArthurSonzogni
Copy link
Contributor Author

Hi everyone,

Could you please take a look?
@mike-lischke FYI (original author of the WITH_LIBCXX option)

@mike-lischke
Copy link
Member

@parrt This is a small C++ build patch and can be merged.

@parrt parrt merged commit 40df0c1 into antlr:master Sep 10, 2020
@parrt parrt added this to the 4.9 milestone Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants