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

subversion: need SWIG 3.x #39929

Closed
wants to merge 1 commit into from
Closed

subversion: need SWIG 3.x #39929

wants to merge 1 commit into from

Conversation

xu-cheng
Copy link
Member

  • Have you followed the guidelines for contributing?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install <formula>)?

Find this issue in https://github.com/Homebrew/linuxbrew-core/pull/13100

@SMillerDev
Copy link
Member

Is swig 3 still officially supported by upstream?

@SMillerDev SMillerDev added the needs response Needs a response from the issue/PR author label Jun 7, 2019
@xu-cheng
Copy link
Member Author

xu-cheng commented Jun 7, 2019

Is swig 3 still officially supported by upstream?

Which upstream? SVN or SWIG?

AFAIK, swig 4.0 is a major update with several breaking changes. And SVN build system only works with SWIG 3.x or below.

@SMillerDev
Copy link
Member

Swig upstream. Otherwise it's not really allowed: https://docs.brew.sh/Versions#acceptable-versioned-formulae

@xu-cheng
Copy link
Member Author

xu-cheng commented Jun 7, 2019

While without SWIG 3.x, current subversion is broken. (You can try: brew install svn -s locally).

Also, there is swig@3.04 formula in homebrew-core.

@golddranks
Copy link
Contributor

golddranks commented Jun 9, 2019

LLDB Python bindings and Rust's LLDB support are also currently broken because they need >= Swig 3.0.11. Making 3.0.x uninstallable through brew after a few days from the release of 4.0 has surely broken other things too. I'm going to ask about the support from SWIG mailing list.

@golddranks
Copy link
Contributor

golddranks commented Jun 9, 2019

Asked. We'll hear the answer hopefully soon. Meanwhile, I'd like to point out that ending support for a major version without any deprecation period is not a good practice. I'd like to see these kinds of situations addressed somehow – for example, making the older major versions being installable at least for some automatic deprecation period such as 6 months or a year.

@golddranks
Copy link
Contributor

Got an answer: https://sourceforge.net/p/swig/mailman/message/36690602/ There is no support for 3.0.x. This also makes the existence of the recipe for `swig@3.04' suspect, according to the standards of Homebrew project.

@SMillerDev
Copy link
Member

Homebrew can't really provide support for software that upstream doesn't support. The best/only way to get support is to convince the software development world that they should maintain old versions longer.

As for the 3.04 version, yeah that should probably be removed

@zbeekman
Copy link
Contributor

Here are my thoughts on the matter:

Given that swig is critical build system infrastructure (e.g., llvm, tbb, scipy), and that the 4.0.0 release had breaking changes, I think it is reasonable to maintain a swig@3 for a brief period while other packages get updated to use the latest 4.0.x.

However, I do not think we should accept dependencies on swig@3 or other packages where upstream has dropped support without evidence of a corresponding bug report to the package that needs the deprecated version.

I also agree that swig@3.0.4 needs to go.

Copy link
Contributor

@zbeekman zbeekman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xu-cheng: Could you please also delete swig@3.0.4 in this PR?

Can someone either find a bug report for this with SVN, or open a new one? Then link to it at least in the commit message, or, better yet, (assuming the URL is not unreasonably long) link to it in a comment next to the dependency so we can assess when it should be upgraded to depend on the latest swig?

Thanks!

@golddranks
Copy link
Contributor

golddranks commented Jun 11, 2019

There seems to be a bug report for supporting SWIG 4: https://issues.apache.org/jira/browse/SVN-4818?jql=project%20%3D%20SVN%20AND%20text%20~%20%22SWIG%22
I'm going to send a patch to LLVM unless it's already done.

@zbeekman
Copy link
Contributor

I'm going to send a patch to LLVM unless it's already done.

Sorry, I'm not following. Are you sending a patch to llvm or a patch (to us) for llvm to use swig@3? Or do you know the work around that lets llvm use swig 4?

@golddranks
Copy link
Contributor

I am going to report a bug and send a patch to LLVM project that allows their Python wrappers to work with SWIG 4.

@zbeekman
Copy link
Contributor

zbeekman commented Jun 11, 2019 via email

@golddranks
Copy link
Contributor

I figured that the Swig changes would be merged faster if I did the needed changes and sent a new PR, so here it is. #40882 After these changes there is still a need to update the SVN package. I'd like to leave that to @xu-cheng since I know little about that package.

@xu-cheng
Copy link
Member Author

Updated PR after #40882

@lembacon lembacon removed the needs response Needs a response from the issue/PR author label Jun 13, 2019
@lembacon
Copy link
Member

Thanks @xu-cheng and everyone else for the effort!

@lembacon lembacon closed this in 8600fd9 Jun 13, 2019
@xu-cheng xu-cheng deleted the svn branch June 13, 2019 11:44
Centril added a commit to Centril/rust that referenced this pull request Jun 14, 2019
Fix rust-lldb wrapper scripts.

Currently the `rust-lldb` wrapper provided by Rust project is broken. The error messages it produces on launch are as follows:
```
warning: ignoring unknown option: --one-line-before-file=command script import "/Users/kon/.rustup/toolchains/nightly-2019-05-02-x86_64-apple-darwin/lib/rustlib/etc/lldb_rust_formatters.py"
warning: ignoring unknown option: --one-line-before-file=type summary add --no-value --python-function lldb_rust_formatters.print_val -x ".*" --category Rust
warning: ignoring unknown option: --one-line-before-file=type category enable Rust
(lldb) target create "target/debug/nagare"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/kon/.rustup/toolchains/nightly-2019-05-02-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/python2.7/site-packages/lldb/__init__.py", line 1481, in <module>
    class SBAddress(object):
  File "/Users/kon/.rustup/toolchains/nightly-2019-05-02-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/python2.7/site-packages/lldb/__init__.py", line 1647, in SBAddress
    __swig_getmethods__["module"] = GetModule
NameError: name '__swig_getmethods__' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
...etc.
```

The errors stem from two regressions: one caused by an LLVM upgrade and one caused by unintended upgrade to SWIG 4.0 (SWIG is a wrapper generator that is used to generate Python bindings for LLVM and LLDB.)

(Edit: found the exact dates) The SWIG breakage happened because of a Homebrew version upgrade on `nightly-2019-05-01-x86_64-apple-darwin` and the LLVM breakage happened on `nightly-2019-01-27-x86_64-apple-darwin` (likely to have been caused by rust-lang#57675 ).

The fix is to update the LLVM parameter syntax and to "downgrade" to SWIG 3.0.x. SWIG 3.0.x is not going to be supported by Homebrew forever, but should be good for now, until LLDB upgrades to  support SWIG 4.0.0. Here's some more info about Homebrew support: Homebrew/homebrew-core#39929 & Homebrew/homebrew-core#40882 I'm going to send a bug & fix to LLDB about SWIG 4.0.0 to get the situation fixed in the future.

It would be good to also backport this to beta, since it's such a small change, and will fix an obvious regression.
Centril added a commit to Centril/rust that referenced this pull request Jun 14, 2019
Fix rust-lldb wrapper scripts.

Currently the `rust-lldb` wrapper provided by Rust project is broken. The error messages it produces on launch are as follows:
```
warning: ignoring unknown option: --one-line-before-file=command script import "/Users/kon/.rustup/toolchains/nightly-2019-05-02-x86_64-apple-darwin/lib/rustlib/etc/lldb_rust_formatters.py"
warning: ignoring unknown option: --one-line-before-file=type summary add --no-value --python-function lldb_rust_formatters.print_val -x ".*" --category Rust
warning: ignoring unknown option: --one-line-before-file=type category enable Rust
(lldb) target create "target/debug/nagare"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/kon/.rustup/toolchains/nightly-2019-05-02-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/python2.7/site-packages/lldb/__init__.py", line 1481, in <module>
    class SBAddress(object):
  File "/Users/kon/.rustup/toolchains/nightly-2019-05-02-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/python2.7/site-packages/lldb/__init__.py", line 1647, in SBAddress
    __swig_getmethods__["module"] = GetModule
NameError: name '__swig_getmethods__' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
...etc.
```

The errors stem from two regressions: one caused by an LLVM upgrade and one caused by unintended upgrade to SWIG 4.0 (SWIG is a wrapper generator that is used to generate Python bindings for LLVM and LLDB.)

(Edit: found the exact dates) The SWIG breakage happened because of a Homebrew version upgrade on `nightly-2019-05-01-x86_64-apple-darwin` and the LLVM breakage happened on `nightly-2019-01-27-x86_64-apple-darwin` (likely to have been caused by rust-lang#57675 ).

The fix is to update the LLVM parameter syntax and to "downgrade" to SWIG 3.0.x. SWIG 3.0.x is not going to be supported by Homebrew forever, but should be good for now, until LLDB upgrades to  support SWIG 4.0.0. Here's some more info about Homebrew support: Homebrew/homebrew-core#39929 & Homebrew/homebrew-core#40882 I'm going to send a bug & fix to LLDB about SWIG 4.0.0 to get the situation fixed in the future.

It would be good to also backport this to beta, since it's such a small change, and will fix an obvious regression.
bors added a commit to rust-lang/rust that referenced this pull request Jun 20, 2019
Fix rust-lldb wrapper scripts.

Currently the `rust-lldb` wrapper provided by Rust project is broken. The error messages it produces on launch are as follows:
```
warning: ignoring unknown option: --one-line-before-file=command script import "/Users/kon/.rustup/toolchains/nightly-2019-05-02-x86_64-apple-darwin/lib/rustlib/etc/lldb_rust_formatters.py"
warning: ignoring unknown option: --one-line-before-file=type summary add --no-value --python-function lldb_rust_formatters.print_val -x ".*" --category Rust
warning: ignoring unknown option: --one-line-before-file=type category enable Rust
(lldb) target create "target/debug/nagare"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/kon/.rustup/toolchains/nightly-2019-05-02-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/python2.7/site-packages/lldb/__init__.py", line 1481, in <module>
    class SBAddress(object):
  File "/Users/kon/.rustup/toolchains/nightly-2019-05-02-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/python2.7/site-packages/lldb/__init__.py", line 1647, in SBAddress
    __swig_getmethods__["module"] = GetModule
NameError: name '__swig_getmethods__' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
...etc.
```

The errors stem from two regressions: one caused by an LLVM upgrade and one caused by unintended upgrade to SWIG 4.0 (SWIG is a wrapper generator that is used to generate Python bindings for LLVM and LLDB.)

(Edit: found the exact dates) The SWIG breakage happened because of a Homebrew version upgrade on `nightly-2019-05-01-x86_64-apple-darwin` and the LLVM breakage happened on `nightly-2019-01-27-x86_64-apple-darwin` (likely to have been caused by #57675 ).

The fix is to update the LLVM parameter syntax and to "downgrade" to SWIG 3.0.x. SWIG 3.0.x is not going to be supported by Homebrew forever, but should be good for now, until LLDB upgrades to  support SWIG 4.0.0. Here's some more info about Homebrew support: Homebrew/homebrew-core#39929 & Homebrew/homebrew-core#40882 I'm going to send a bug & fix to LLDB about SWIG 4.0.0 to get the situation fixed in the future.

It would be good to also backport this to beta, since it's such a small change, and will fix an obvious regression.
@lock lock bot added the outdated PR was locked due to age label Feb 3, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Feb 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants