[MacPorts] #38279: rust @0.5: multiple issues
#38279: rust @0.5: multiple issues ---------------------+-------------------------------- Reporter: egall@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Keywords: | Port: rust ---------------------+-------------------------------- 1. Rust currently doesn't work on 10.5 and lower: https://github.com/mozilla/rust/issues/4232 Something like the following could be added to fix this: {{{ pre-fetch { if {${os.platform} == "darwin" && ${os.major} < 10} { ui_error "${name} only works with OS X 10.6 Snow Leopard or later." return -code error "incompatible OS X version" } } }}} 2. Rust does not support universal binaries: https://github.com/mozilla/rust/issues/2024 Something like the following could be added to fix this: {{{ supported_archs i386 x86_64 universal_variant no }}} 3. Rust's configure script doesn't recognize the `--disable-dependency- tracking` flag. This could be solve by either removing the universal variant as per !#2 above, or by adding something like this to the portfile: {{{ configure.universal_args-delete --disable-dependency-tracking }}} 4. Seeing as Rust basically builds its own copy of llvm, it should use the same dependencies as llvm (i.e. `libffi`, `llvm_select`, and `perl5`). 5. Besides the dependencies listed in !#4 above, it should also include the dependencies listed in the [http://static.rust- lang.org/doc/0.5/tutorial.html#getting-started Rust Language Tutorial], i.e. it should: - blacklist gcc versions lower than 4.4, and clang versions lower than 3 - depend on either python26 or python27 (maybe just python_select as a placeholder) - use `build.type gnu` and depend on gmake - depend on curl -- Ticket URL: <https://trac.macports.org/ticket/38279> MacPorts <http://www.macports.org/> Ports system for OS X
#38279: rust @0.5: multiple issues ----------------------+---------------------- Reporter: egall@… | Owner: g5pw@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: rust | ----------------------+---------------------- Changes (by g5pw@…): * owner: macports-tickets@… => g5pw@… * status: new => assigned Comment: Thank you for this. Will fix tomorrow. -- Ticket URL: <https://trac.macports.org/ticket/38279#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#38279: rust @0.5: multiple issues ----------------------+---------------------- Reporter: egall@… | Owner: g5pw@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: rust | ----------------------+---------------------- Comment (by egall@…): Oh also, one more thing: it needs its license set. I'd put: {{{ license {MIT Apache-2} }}} but I'm not sure if it should have the brackets or not... -- Ticket URL: <https://trac.macports.org/ticket/38279#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#38279: rust @0.5: multiple issues ----------------------+---------------------- Reporter: egall@… | Owner: g5pw@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: rust | ----------------------+---------------------- Changes (by larryv@…): * cc: g5pw@… (removed) Comment: Replying to [ticket:38279 egall@…]:
``1. Rust currently doesn't work on 10.5 and lower: https://github.com/mozilla/rust/issues/4232
Does that mean it doesn’t work on 10.5, or that it doesn’t work with 10.5’s compilers? There’s a difference.
``2. Rust does not support universal binaries: https://github.com/mozilla/rust/issues/2024
Something like the following could be added to fix this: {{{ supported_archs i386 x86_64 universal_variant no }}}
This doesn’t “fix” anything; it just codifies the restriction. And does Rust not support being built on PowerPC?
``3. Rust's configure script doesn't recognize the `--disable-dependency-tracking` flag. This could be solve by either removing the universal variant as per !#2 above, or by adding something like this to the portfile: {{{ configure.universal_args-delete --disable-dependency-tracking }}}
If Rust doesn’t support being build universal, this is a moot point.
``4. Seeing as Rust basically builds its own copy of llvm, it should use the same dependencies as llvm (i.e. `libffi`, `llvm_select`, and `perl5`).
It builds its own copy of LLVM? Why? Can we make it use ours?
``5. Besides the dependencies listed in !#4 above, it should also include the dependencies listed in the [http://static.rust-lang.org/doc/0.5/tutorial.html#getting-started Rust Language Tutorial], i.e. it should:
- blacklist gcc versions lower than 4.4, and clang versions lower than 3 - depend on either python26 or python27 (maybe just python_select as a placeholder)
No. Pick one or the other.
- use `build.type gnu` and depend on gmake
A dependency is not necessary; OS X comes with GNU Make.
- depend on curl
Why? Does the build process download something? It should not be doing that. -- Ticket URL: <https://trac.macports.org/ticket/38279#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#38279: rust @0.5: multiple issues ----------------------+---------------------- Reporter: egall@… | Owner: g5pw@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: rust | ----------------------+---------------------- Comment (by larryv@…): Replying to [comment:3 larryv@…]:
Why? Does the build process download something? It should not be doing that.
Ugh, it does. #38285. -- Ticket URL: <https://trac.macports.org/ticket/38279#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
#38279: rust @0.5: multiple issues ----------------------+---------------------- Reporter: egall@… | Owner: g5pw@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: rust | ----------------------+---------------------- Comment (by egall@…): Replying to [comment:3 larryv@…]:
Replying to [ticket:38279 egall@…]:
``2. Rust does not support universal binaries: https://github.com/mozilla/rust/issues/2024
Something like the following could be added to fix this: {{{ supported_archs i386 x86_64 universal_variant no }}}
This doesn’t “fix” anything; it just codifies the restriction.
Right, that's what I meant.
``3. Rust's configure script doesn't recognize the `--disable-dependency-tracking` flag. This could be solved by '''either''' removing the universal variant as per !#2 above, '''or''' by adding something like this to the portfile: {{{ configure.universal_args-delete --disable-dependency-tracking }}}
If Rust doesn’t support being build universal, this is a moot point.
That's why I said "either... or..." there.
``4. Seeing as Rust basically builds its own copy of llvm, it should
use
the same dependencies as llvm (i.e. `libffi`, `llvm_select`, and `perl5`).
It builds its own copy of LLVM? Why? Can we make it use ours?
I've been trying to get it to do that, but I've had no luck getting it to work that way so far...
``5. Besides the dependencies listed in !#4 above, it should also include the dependencies listed in the [http://static.rust-lang.org/doc/0.5/tutorial.html#getting-started
Rust Language Tutorial],
i.e. it should:
- blacklist gcc versions lower than 4.4, and clang versions lower than 3 - depend on either python26 or python27 (maybe just python_select as a placeholder)
No. Pick one or the other.
How about using variants?
- use `build.type gnu` and depend on gmake
A dependency is not necessary; OS X comes with GNU Make.
What about on platforms other than OS X? -- Ticket URL: <https://trac.macports.org/ticket/38279#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
#38279: rust @0.5: multiple issues ----------------------+---------------------- Reporter: egall@… | Owner: g5pw@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: rust | ----------------------+---------------------- Comment (by larryv@…): Replying to [comment:5 egall@…]:
Replying to [comment:3 larryv@…]:
It builds its own copy of LLVM? Why? Can we make it use ours?
I've been trying to get it to do that, but I've had no luck getting it to work that way so far...
Ugh. That’s rather unfortunate.
- depend on either python26 or python27 (maybe just python_select as a placeholder)
No. Pick one or the other.
How about using variants?
Using variants for a build dependency isn’t really appropriate. The simplest (and in my opinion, best) option is just to add a `port:python27` build dependency. If Aljaž wants, he could try testing for a recent-enough system Python before resorting to the dependency.
- use `build.type gnu` and depend on gmake
A dependency is not necessary; OS X comes with GNU Make.
What about on platforms other than OS X?
This should be handled in base, like the [[source:tags/release_2_1_2/base/src/port1.0/portbuild.tcl#L63|BSD Make dependency]] is. -- Ticket URL: <https://trac.macports.org/ticket/38279#comment:6> MacPorts <http://www.macports.org/> Ports system for OS X
#38279: rust @0.5: multiple issues ----------------------+---------------------- Reporter: egall@… | Owner: g5pw@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: rust | ----------------------+---------------------- Comment (by larryv@…): Given its breadth of topics, this ticket should have been reported as multiple tickets. * 10.6 or newer? #38286 * Universal? #38287 * New dependencies? #38288 * Compiler requirements? #38289 * License? #38290 Hope I got everything. Sorry for pounding you with tickets, Aljaž :P I took care of the dependency tracking issue in r103711. If Rust can’t be built universal after all, the `configure.universal_args-delete` line can be removed. -- Ticket URL: <https://trac.macports.org/ticket/38279#comment:7> MacPorts <http://www.macports.org/> Ports system for OS X
#38279: rust @0.5: multiple issues ----------------------+---------------------- Reporter: egall@… | Owner: g5pw@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: rust | ----------------------+---------------------- Comment (by g5pw@…): Replying to [comment:7 larryv@…]:
Given its breadth of topics, this ticket should have been reported as multiple tickets.
* 10.6 or newer? #38286 * Universal? #38287 * New dependencies? #38288 * Compiler requirements? #38289 * License? #38290
Hope I got everything. Sorry for pounding you with tickets, Aljaž :P
I took care of the dependency tracking issue in r103711. If Rust can’t be built universal after all, the `configure.universal_args-delete` line can be removed.
Thanks for the work, Larry, yeah, I woke up to a full inbox :) will work through it! egall, could you PM me what did you try regarding #38288? -- Ticket URL: <https://trac.macports.org/ticket/38279#comment:8> MacPorts <http://www.macports.org/> Ports system for OS X
#38279: rust @0.5: multiple issues ----------------------+---------------------- Reporter: egall@… | Owner: g5pw@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: rust | ----------------------+---------------------- Comment (by egall@…): Replying to [comment:8 g5pw@…]:
egall, could you PM me what did you try regarding #38288?
All I did basically was try running `port select llvm` manually beforehand, followed by then trying setting {{{ configure.env-append CFG_LLVM_ROOT=${prefix} }}} in the portfile, but I don't think it got passed through... You can see my development version of the portfile at: https://github.com/cooljeanius/LocalPorts/blob/master/lang/rust/Portfile (it contains a lot of other unnecessary stuff that I added just because though) -- Ticket URL: <https://trac.macports.org/ticket/38279#comment:9> MacPorts <http://www.macports.org/> Ports system for OS X
#38279: rust @0.5: multiple issues ----------------------+---------------------- Reporter: egall@… | Owner: g5pw@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: rust | ----------------------+---------------------- Comment (by g5pw@…): Ok, I just hit a wall. I nearly got it working, but I get a segmentation fault seemingly out of nowhere, A new pair of eyeballs would be useful. I'm attaching the diff. -- Ticket URL: <https://trac.macports.org/ticket/38279#comment:10> MacPorts <http://www.macports.org/> Ports system for OS X
#38279: rust @0.5: multiple issues ----------------------+---------------------- Reporter: egall@… | Owner: g5pw@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: rust | ----------------------+---------------------- Comment (by egall@…): Replying to [comment:10 g5pw@…]:
Ok, I just hit a wall. I nearly got it working, but I get a segmentation fault seemingly out of nowhere, A new pair of eyeballs would be useful. I'm attaching the diff.
Could we see the log of the segfault? -- Ticket URL: <https://trac.macports.org/ticket/38279#comment:12> MacPorts <http://www.macports.org/> Ports system for OS X
#38279: rust @0.5: multiple issues ----------------------+---------------------- Reporter: egall@… | Owner: g5pw@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: rust | ----------------------+---------------------- Comment (by g5pw@…): Replying to [comment:12 egall@…]:
Could we see the log of the segfault? Is it a segfault while compiling or a segfault while running? (Also, while you're at it, try re-checking each of the sub-issues that larryv opened and see if any of them contain any inspiration)
I'll attach the main.log. Segfault is while running the stage0 compiler, or at least I think it is. -- Ticket URL: <https://trac.macports.org/ticket/38279#comment:13> MacPorts <http://www.macports.org/> Ports system for OS X
#38279: rust @0.5: multiple issues ----------------------+---------------------- Reporter: egall@… | Owner: g5pw@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: rust | ----------------------+---------------------- Comment (by egall@…): Replying to [comment:7 larryv@…]:
Given its breadth of topics, this ticket should have been reported as multiple tickets.
* 10.6 or newer? #38286 * Universal? #38287 * New dependencies? #38288 * Compiler requirements? #38289 * License? #38290
I just realized you missed listing #38285 here for the bootstrapping issue -- Ticket URL: <https://trac.macports.org/ticket/38279#comment:14> MacPorts <http://www.macports.org/> Ports system for OS X
#38279: rust @0.5: multiple issues ----------------------+---------------------- Reporter: egall@… | Owner: g5pw@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: rust | ----------------------+---------------------- Comment (by egall@…): Also we might want to keep an eye on what Homebrew is doing with their Rust formula (you know, for reference purposes): https://github.com/mxcl/homebrew/commit/bfd7b21699495591ada37fef3f9326439bad... -- Ticket URL: <https://trac.macports.org/ticket/38279#comment:15> MacPorts <http://www.macports.org/> Ports system for OS X
#38279: rust @0.5: multiple issues ----------------------+---------------------- Reporter: egall@… | Owner: g5pw@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: rust | ----------------------+---------------------- Comment (by larryv@…): Replying to [comment:15 egall@…]:
Also we might want to keep an eye on what Homebrew is doing with their Rust formula (you know, for reference purposes):
https://github.com/mxcl/homebrew/commit/bfd7b21699495591ada37fef3f9326439bad... Yeah, g5pw and I were talking about that on IRC a few hours ago. Other than two of the patches, there isn’t really anything useful there. Can’t get at the Fink package, if there is one, on account of their website being down. I’m currently checking out the [http://svnweb.freebsd.org/ports/head/lang/rust/ FreeBSD port]. -- Ticket URL: <https://trac.macports.org/ticket/38279#comment:16> MacPorts <http://www.macports.org/> Ports system for OS X
#38279: rust @0.5: multiple issues ----------------------+---------------------- Reporter: egall@… | Owner: g5pw@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: rust | ----------------------+---------------------- Comment (by larryv@…): I’ve merged my branch back into trunk in r104052. This takes care of most but not all issues (#38383, for instance). -- Ticket URL: <https://trac.macports.org/ticket/38279#comment:17> MacPorts <http://www.macports.org/> Ports system for OS X
#38279: rust @0.5: multiple issues ----------------------+---------------------- Reporter: egall@… | Owner: g5pw@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: rust | ----------------------+---------------------- Comment (by egall@…): If the only issue related to this that's still open is #38383 (nice number btw), I'd say we can close this one. -- Ticket URL: <https://trac.macports.org/ticket/38279#comment:18> MacPorts <http://www.macports.org/> Ports system for OS X
#38279: rust @0.5: multiple issues ----------------------+---------------------- Reporter: egall@… | Owner: g5pw@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: rust | ----------------------+---------------------- Comment (by egall@…): Replying to [comment:6 larryv@…]:
- use `build.type gnu` and depend on gmake
A dependency is not necessary; OS X comes with GNU Make.
What about on platforms other than OS X?
This should be handled in base, like the [[source:tags/release_2_1_2/base/src/port1.0/portbuild.tcl#L63|BSD Make dependency]] is.
Opened a separate issue for this: #38451 -- Ticket URL: <https://trac.macports.org/ticket/38279#comment:19> MacPorts <http://www.macports.org/> Ports system for OS X
#38279: rust @0.5: multiple issues ----------------------+---------------------- Reporter: egall@… | Owner: g5pw@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: rust | ----------------------+---------------------- Comment (by egall@…): Now that rust is at version 0.6 (as of r105535), this ticket can be closed, since this ticket was about version 0.5. -- Ticket URL: <https://trac.macports.org/ticket/38279#comment:20> MacPorts <http://www.macports.org/> Ports system for OS X
#38279: rust @0.5: multiple issues ----------------------+-------------------- Reporter: egall@… | Owner: g5pw@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: fixed | Keywords: Port: rust | ----------------------+-------------------- Changes (by larryv@…): * status: assigned => closed * resolution: => fixed -- Ticket URL: <https://trac.macports.org/ticket/38279#comment:21> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts