servo / saltfs

Salt Stack Filesystem
Apache License 2.0
56 stars 107 forks source link

Trim down the symlinks to ARM cross-compilation binaries #252

Open aneeshusa opened 8 years ago

aneeshusa commented 8 years ago

We use cross-compilation to test ARM32 and ARM64 builds. However, the target triples differ between the installed packages, rustc, and build scripts, so we create a symlink farm in /home/servo/bin that points to the installed binaries to provide the right names. Currently, we create symlinks for almost every binary installed (see the binaries variable in arm.sls), but we don't use all of these, and we should trim down the list.

Steps:

strogonoff commented 8 years ago

@aneeshusa

Does this repo show up on https://starters.servo.org/?

Click on I’m Feeling Adventurous brought me here, so that must be working.

larsbergstrom commented 8 years ago

The steps that you mentioned in the buildbot config are definitely the best instructions! The trickiest bit is making sure that all of the environment variables are set up correctly, but after that, the build should just go through.

Thanks for opening this, @aneeshusa!

Manishearth commented 8 years ago

An alternate way to do this (more involved, but quicker) would be to use a binary that logs its use (simple executable shell script that calls the real binary would do) instead of a symlink. Alternatively, run the whole thing under strace and grep for /home/servo/bin

Coder206 commented 7 years ago

@aneeshusa When you wrote

Currently, we create symlinks for almost every binary installed (see the binaries variable in arm-dependencies.sls), but we don't use all of these, and we should trim down the list.

The arm-dependencies.sls link throws a 404, is this the new link with the symlinks highlighted: https://github.com/servo/saltfs/blob/master/servo-build-dependencies/arm.sls#L11-L32 ?

ghost commented 7 years ago

I'd like to try this on my Rpi3, it should be fine? or should I use vagrant?

aneeshusa commented 7 years ago

This is about symlinks for our cross-compilation binaries, so I'm not sure it would be possible on an RPi3 since that's already ARM (would be a native instead of cross compile). I'd recommend going with the Vagrant servo-linux-cross1 VM.

sadmansk commented 7 years ago

If no one is working on this, I can give it a go. Just running a vagrant image is enough of a setup, or do I need other things as well?

aneeshusa commented 7 years ago

@sadmansk go for it, I've assigned this issue to you! You should be able to do everything inside the servo-linux-cross1 Vagrant VM (note that you'll need to edit the Vagrant setup to provide quite a bit of memory, however). Note that our build setup has changed quite a bit over the last year; I've updated the steps in the original post, so make sure to take a look at those.

aneeshusa commented 7 years ago

@sadmansk Have you had a chance to work on this? Do you have any questions?

sadmansk commented 7 years ago

@aneeshusa Hey, really sorry, but I haven't had a chance to work on this. It's been a really busy month. I'm planning to start working on it this weekend

sadmansk commented 7 years ago

After downgrading vagrant to 1.8.1 and Virttual box to 5.0, I'm encountering the following error when I run vagrant up:

Bringing machine 'servo-linux-cross1' up with 'virtualbox' provider...
Bringing machine 'servo-linux1' up with 'virtualbox' provider...
Bringing machine 'servo-master1' up with 'virtualbox' provider...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["list", "hostonlyifs"]

Stderr: VBoxManage: error: Failed to create a session object!
VBoxManage: error: Code NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154) - Class not registered (extended info not available)

Any idea on how to fix this issue?

aneeshusa commented 7 years ago

@sadmansk A little searching seems to indicate a variety of different problems, so it'll probably be easier to debug if you hop onto the #servo IRC channel.

What OS are you using? Can you try running under strace if on Linux? Also, you only need to bring up the servo-linux-cross1 VM, i.e. by running vagrant up servo-linux-cross1.

sadmansk commented 7 years ago

@aneeshusa I'm on Arch Linux, I did try running vagrant up servo-linux-cross1 but it reported the same error. I'll debug it some more after work, and ping you on IRC if I can't find the issue.

sadmansk commented 7 years ago

@aneeshusa Hey I wanted to apologize for taking so long with this issue. If there is a form of urgency, it might be a better idea to assign someone else to the issue, since it seems that the problem might be related to me using the latest linux kernel. If the issue is of low priority, I can continue to work on it and eventually figure out the issue, I kind of like problems such as this 😅

sadmansk commented 7 years ago

@aneeshusa is there anyway to make it work using newer versions of virtualbox and vagrant? It seems like the kernel modules of the older virtualbox versions is only compiled for older versions of the linux kernel, as far as i understand.

aneeshusa commented 7 years ago

@sadmansk Unfortunately, we're waiting for mitchellh/vagrant#7836 to be merged upstream to use newer Vagrants. I actually patched my local Vagrant to be able to use Virtualbox 5.0+ with it, but older ones should work also. I'm on Arch as well and using virtualbox-host-dkms to automatically compile the kernel modules with the correct version instead of relying on prebuilt modules.

This issue isn't the most urgent, so feel free to keep working on it! I'm off work now and on IRC for the next few hours if you want to debug.

sadmansk commented 7 years ago

If it isn't urgent, I'll hold off until that issue is resolved. It looks like to be a lot of effort to get this working on rolling arch. I might just spin up an ubuntu VM and try resolving the issue there.

jdm commented 6 years ago

We now support Vagrant 2.0 as of https://github.com/servo/saltfs/pull/729.