Opened 12 years ago
Closed 12 years ago
#38279 closed defect (fixed)
rust @0.5: multiple issues
Reported by: | cooljeanius (Eric Gallager) | Owned by: | g5pw (Aljaž Srebrnič) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.3 |
Keywords: | Cc: | larryv (Lawrence Velázquez) | |
Port: | rust |
Description
- 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" } }
- 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
- 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
- Seeing as Rust basically builds its own copy of llvm, it should use the same dependencies as llvm (i.e.
libffi
,llvm_select
, andperl5
).
- Besides the dependencies listed in #4 above, it should also include the dependencies listed in the 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
Attachments (2)
Change History (23)
comment:1 Changed 12 years ago by g5pw (Aljaž Srebrnič)
Owner: | changed from macports-tickets@… to g5pw@… |
---|---|
Status: | new → assigned |
comment:2 Changed 12 years ago by cooljeanius (Eric Gallager)
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...
comment:3 follow-ups: 4 5 Changed 12 years ago by larryv (Lawrence Velázquez)
Cc: | g5pw@… removed |
---|
Replying to 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
, andperl5
).
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 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.
comment:4 Changed 12 years ago by larryv (Lawrence Velázquez)
comment:5 follow-up: 6 Changed 12 years ago by cooljeanius (Eric Gallager)
Replying to larryv@…:
Replying to 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 noThis 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-trackingIf 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
, andperl5
).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 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 gmakeA dependency is not necessary; OS X comes with GNU Make.
What about on platforms other than OS X?
comment:6 follow-up: 19 Changed 12 years ago by larryv (Lawrence Velázquez)
Replying to egall@…:
Replying to 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 gmakeA 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 BSD Make dependency is.
comment:7 follow-ups: 8 14 Changed 12 years ago by larryv (Lawrence Velázquez)
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.
comment:8 follow-up: 9 Changed 12 years ago by g5pw (Aljaž Srebrnič)
Replying to 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?
comment:9 Changed 12 years ago by cooljeanius (Eric Gallager)
Replying to 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; feel free to ignore those parts)
comment:10 follow-up: 12 Changed 12 years ago by g5pw (Aljaž Srebrnič)
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.
Changed 12 years ago by g5pw (Aljaž Srebrnič)
Diff of the rust directory
comment:12 follow-up: 13 Changed 12 years ago by cooljeanius (Eric Gallager)
Replying to 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? 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)
comment:13 Changed 12 years ago by g5pw (Aljaž Srebrnič)
Replying to 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.
comment:14 Changed 12 years ago by cooljeanius (Eric Gallager)
comment:15 follow-up: 16 Changed 12 years ago by cooljeanius (Eric Gallager)
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/bfd7b21699495591ada37fef3f9326439badf03a
comment:16 Changed 12 years ago by larryv (Lawrence Velázquez)
Replying to 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/bfd7b21699495591ada37fef3f9326439badf03a
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 FreeBSD port.
comment:17 Changed 12 years ago by larryv (Lawrence Velázquez)
comment:18 Changed 12 years ago by cooljeanius (Eric Gallager)
comment:19 Changed 12 years ago by cooljeanius (Eric Gallager)
Replying to larryv@…:
- use
build.type gnu
and depend on gmakeA 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 BSD Make dependency is.
Opened a separate issue for this: #38451
Edit: was fixed in r104303
comment:20 Changed 12 years ago by cooljeanius (Eric Gallager)
Now that rust is at version 0.6 (as of r105535), this ticket can be closed, since this ticket was about version 0.5.
comment:21 Changed 12 years ago by larryv (Lawrence Velázquez)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Thank you for this. Will fix tomorrow.