[oi-dev] Rust in userland?
Michal Nowak
mnowak at startmail.com
Thu Aug 23 06:21:45 UTC 2018
On 08/21/18 11:16 PM, Aurélien Larcher wrote:
>
>
> On Tue, Aug 21, 2018 at 11:10 PM, Michal Nowak <mnowak at startmail.com
> <mailto:mnowak at startmail.com>> wrote:
>
> On 08/16/18 07:31 PM, Aurélien Larcher wrote:
>
>
>
> On Thu, Aug 16, 2018 at 7:18 PM, Aurélien Larcher
> <aurelien.larcher at gmail.com <mailto:aurelien.larcher at gmail.com>
> <mailto:aurelien.larcher at gmail.com
> <mailto:aurelien.larcher at gmail.com>>> wrote:
>
>
>
>
>
> https://github.com/cgrzemba/oi-userland/tree/rust/components/developer/rust
> <https://github.com/cgrzemba/oi-userland/tree/rust/components/developer/rust>
>
> <https://github.com/cgrzemba/oi-userland/tree/rust/components/developer/rust
> <https://github.com/cgrzemba/oi-userland/tree/rust/components/developer/rust>>
>
>
> I remember now updating my recipe to yours but I needed
> some
> configuration tweaks to deal with a few issues:
> - /usr/bin/cc is default used as linker but it is
> sunstudio 12.1
> so you need to override it,
> - AR should be specified,
> - this recipe assumes that GCC runtime libraries are in
> /usr/lib/$(MACH64) which is not true for us with GCC >= 6,
> - the linker should be specified for the target as it
> is not
> passed from the global settings.
>
> Also rustc will eat up to 3GB of RAM so the host should
> have
> enough memory.
>
>
> Just rebased my change over Carsten's branch:
>
> https://github.com/alarcher/oi-userland/tree/rust123
> <https://github.com/alarcher/oi-userland/tree/rust123>
> <https://github.com/alarcher/oi-userland/tree/rust123
> <https://github.com/alarcher/oi-userland/tree/rust123>>
>
>
> More work:
>
> helios> rustc hello.rs <http://hello.rs> <http://hello.rs>
> error[E0463]: can't find crate for `std`
>
> error: aborting due to previous error
>
> helios> ls /usr/lib/amd64/rustlib/x86_64-sun-solaris/
> analysis/ lib/
>
> but rust looks for libraries in /usr/lib/rustlib
>
> Symlinked like a piggy to check it and it is the problem...
>
> Also rustc does not put /usr/lib/amd64 in the search path so
> executables are broken.
>
>
> I build Aurélien's branch inside a zone, but it fails for me with:
>
> error: could not exec the linker `/usr/gcc/6/bin/gcc`: Not enough
> space (os error 12)
>
> For full log, see
> https://paste.ec/paste/JxbabBm7#Kn+gh58pAwBhweYcTzrk6gzVSH7Rc6Npg2eXEmoCMv1
> <https://paste.ec/paste/JxbabBm7#Kn+gh58pAwBhweYcTzrk6gzVSH7Rc6Npg2eXEmoCMv1>.
>
> I am quite sure that I have plenty of disk space available:
>
> $ df -h .
> Filesystem Size Used Available Capacity Mounted on
> rpool/zones/build/build-userland/ROOT/zbe-125
> 114G 14.7G 74.9G 17% /
>
> Any idea what the problem might be? I build it on Lenovo X220 (4
> cores, 6 GB of memory + 3 GB of swap), OS is updated to latest
> packages. I don't think I limited the zone in any way when I created it.
>
>
>
> I have seen one instance of rustc take more than 3GB so you probably ran
> out of mem.
I guess that's the only logical explanation, especially when the same
component sources work for you. Hence I don't have a suitable system to
work this on.
I also tried to bump rust to 1.28 but failed short as "-nodefaultlibs"
is getting my way:
https://github.com/mno-hime/oi-userland/tree/rust/components/developer/rust.
M.
More information about the oi-dev
mailing list