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

ExternalAntlr4Cpp: Mitigate build problems with restricted path lengths and zip files #3200

Closed
wants to merge 1 commit into from

Conversation

skef
Copy link
Contributor

@skef skef commented Jun 8, 2021

This deals with #3189 and fixes a problem with specifying a zip file of the Cpp runtime from the website (e.g. https://www.antlr.org/download/antlr4-cpp-runtime-4.9.2-source.zip ).

Given that you've turned the utfcpp tests off in a more recent commit there may no longer be critical path length problems, but it may be better to be safe than sorry.

Accept or close this as you will -- I'll answer questions and do fixes as requested.

Fix building with external zip file (as supplied by project
  on website)
@mike-lischke
Copy link
Member

a4r is a path provided by the caller of the script? It's only used if the path is too long, so it might cause some grief.

@skef
Copy link
Contributor Author

skef commented Aug 23, 2021

a4r is a path provided by the caller of the script? It's only used if the path is too long, so it might cause some grief.

No I believe the string is only used internal to what is patched.

@mike-lischke
Copy link
Member

I'm still confused where this a4r value comes from. You added that in your patch, so you should know where it is specified. And don't forget to add yourself to contributors.txt, if you are not already there.

@skef
Copy link
Contributor Author

skef commented Oct 12, 2021

I'm still confused where this a4r value comes from.
The only place it comes from line six of this patch. Although the longer "antlr4_runtime" string is used in other places in the repository, the four places it's used in the lines changed in this patch just have to be self-consistent. So this replaces those hard-coded strings with a variable and makes it shorter when path length may be an issue.

And don't forget to add yourself to contributors.txt, if you are not already there.

I was thinking #3192 or especially #3169 (as it's approved) would be integrated first as they seemed more straightforward but if you want me to add myself here I can do that.

@mike-lischke
Copy link
Member

We can merge the other 2 patches first, no problem. But the issue with a4r still exists and I want to know what this is about.

@skef
Copy link
Contributor Author

skef commented Oct 31, 2021

Sorry, my explanation wound up mistakenly quoted so you probably didn't see it. Here is the plain text:

The only place a4r comes from line six of this patch. Although the longer antlr4_runtime string is used in other places in the repository, the four places it's used in the lines changed in this patch just have to be self-consistent. So this replaces those hard-coded strings with a variable and makes it shorter when path length may be an issue.

Note that this PR may not be needed anymore. The ultimate problem was with building the utfcpp test suite, which simply went too deep into sub-directories on Windows if built somewhere not very near the root (by path length). Since that suite has changed there may be no further issue. However, it isn't likely to hurt either.

If you read this could you take a look at and potentially update issue #3280? I'm willing to do a PR along the lines I describe if the other utfcpp issues can be worked out (it seems to be downloaded, compiled, but not used, at least on Linux, related to USE_UTF8_INSTEAD_OF_CODECVT not being defined).

@mike-lischke
Copy link
Member

OK, so what do we want to do with this PR then? Will you make a new PR with the utfcpp changes and close this one? I rather no like to add a PR, just because it doesn't hurt :-)

@skef
Copy link
Contributor Author

skef commented Dec 13, 2021

Now that utf8cpp is no longer a dependency it's much less likely a build will run into the path length problem. Closing.

@skef skef closed this Dec 13, 2021
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

Successfully merging this pull request may close these issues.

3 participants