-
Notifications
You must be signed in to change notification settings - Fork 30
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
Statically build and link the ANTLR4 runtime. #41
Statically build and link the ANTLR4 runtime. #41
Conversation
b670a21
to
124fa7c
Compare
Signed-off-by: Dusty DeWeese <[email protected]>
124fa7c
to
8530708
Compare
This should be a much better solution than f4pga/f4pga-arch-defs#1880 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to make whether to compile statically or dynamically an option? I can see a case for both configurations.
I'm sure it's possible, but it would take time. How useful is this feature? Could it be done in a later PR? |
We've already gotten requests in prjxray to enable unvendored dependencies, see f4pga/prjxray#1376 . While I'm never excited about adding work for packaging, I'm also unexcited about knowingly creating work for the future when it can be avoided.
I don't believe so. |
What would be the advantage of being able to select a shared library in this specific case?
What would be the advantage of being able to select a shared library in this specific case? The ANTLR runtime is not a large dependency. Note that this doesn't include the ANTLR parser generator itself, which is only used at compile time. |
970fac1
to
cc684d0
Compare
Signed-off-by: Dusty DeWeese <[email protected]>
Signed-off-by: Dusty DeWeese <[email protected]>
cc684d0
to
94ea28b
Compare
Signed-off-by: Dusty DeWeese <[email protected]>
Signed-off-by: Dusty DeWeese <[email protected]>
a614d19
to
e030368
Compare
I have added a flag to use an external shared library for the ANTLR runtime:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can GH actions add a matrix option on static/dynamic easily?
|
6c608c7
to
55191b5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current flag approach doesn't appear to work. As a concrete example, how (via pip) can a user install the fasm
package using a system dynamic library instead of the static library?
Signed-off-by: Dusty DeWeese <[email protected]>
I have added this flag to all the relevant commands, and documentation on how to use this with |
I don't believe this works? Maybe I'm missing something?
Outputs:
For clarity, the following does work:
outputs:
|
FYI, I know that whatever PyYAML is doing works with this: https://github.com/yaml/pyyaml/blob/master/setup.py#L120 PyYAML has an option to use libyaml, with a python fallback (kind of like what we are doing). I debugged PyYAML not using the binary parser with the following invocation:
|
Signed-off-by: Dusty DeWeese <[email protected]>
@litghost It looks like a known bug with VCS urls: pypa/pip#5518 |
Fixed in 2019? pypa/pip#6389 ? |
I am testing whether the install from local directory works and the VCS does not. |
Even when I try random flags like |
The flag seems to affect pyyaml's setup.py even when using a Git URL, so that isn't it. |
The presence of |
Signed-off-by: Dusty DeWeese <[email protected]>
Signed-off-by: Dusty DeWeese <[email protected]>
@litghost I found that the |
Weird! Good find. |
fca5006
to
859c618
Compare
Signed-off-by: Dusty DeWeese <[email protected]>
859c618
to
09a7325
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, the --no-pep-517
does appear to fix the problem with the flags. Can you add a comment in both places you mention/use the --no-pep-517
flag with why it is there. Relevant issue: pypa/pip#5771
Signed-off-by: Dusty DeWeese <[email protected]>
Done, and I've added an issue to update when there is a better way to do this: #44 |
Statically link the ANTLR4 runtime to remove the runtime dependency. The source build will automatically pull necessary code from GitHub.