-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
Unable to build with vendored source #17
Comments
I think this is an interesting case because I believe even Servo hasn't explored this yet. |
Thanks. I will open an issue on Servo when I have some time. I couldn't test the cloud build because it is Ubuntu 20 and doesn't install all the dependencies, such as Python 3. |
This is indeed servo's problem that is tracked in servo/servo#31812. |
I need to build offline so am using
cargo vendor
in the verso repo to create vendored sources for offline builds. When building it gets a long way, but I keep hitting and working around problems and finally am stuck. I've since tried the same with servo/servo because the issues here seem to relate to servo, but I can't get that to build vendored either.Below is my progress with a vendored build of verso.
vendoring verso
The reason I need vendored builds is that I am off-grid an the servo related repos cause remote git operations to fail. I've tried many things to get that to work which I won't go into here, but it is a dead end and I need a way to build offline. So I start by getting the sources to a cloud server, vendoring there and then transferring the results to my laptop using rsync.
On cloud server I clone the fork I made of verso yesterday:
On Laptop:
Note: as verso depends on servo I've already followed the servo build instructions and set up the build system locally with
./mach bootstrap
in a clone of servo, downloaded mozjs and set the environment variable as below:export MOZJS_MIRROR=~/src/safe-browser/safe-servo/libmozjs-x86_64-unknown-linux-gnu.tar.gz
Now I get my
safe-verso/
clone and thevendor-safe-verso/
directory to the laptop:cd ~/src/safe-browser && rsync --progress -lHpErz user@cloudserver:/home/user/verso/ safe-verso-vendored/
I add the following to the vendored sources template config file
~/src/safe-browser/safe-verso-vendored/vendor-safe-verso.config.toml
Then add the contents of the modified template to
~/src/safe-browser/safe-verso-vendored/safe-verso/.cargo/config.toml
soverso
will build off-line using the vendored sources.Building vendored
Using
cd ~/src/safe-browser/safe-verso-vendored/safe-verso && cargo run
it builds successfully (offline) until it gets toembedder_traits
.Fails to compile embedder_traits
The build fails at
embedder_traits
because it can't findsafe-verso/resources
in the vendored source directory:I worked around this with a symbolic link to place safe-verso/resources where it is looking:
cd ~/src/safe-browser/ && ln -s ~/src/safe-browser/safe-verso-vendored/safe-verso/resources resources
After that
embedder_traits
builds and it continues until the next issue.Servo build script: can't find WebIDL
First it can't find the
servo/third_party/
modules, and so errors importing WebIDL:I fixed this by adding the location to the environment, but as I didn't find the servo repo in the vendored sources I used the location of a
servo/
clone:export PYTHONPATH=~/src/safe-browser/safe-servo/servo/third_party
That enabled it to import WebIDL but immediately hit another error:
FYI: I also tried setting
SERVO_ROOT
but it didn't help.At this point I gave up with verso and tried building servo vendored but that is failing as well so I'm stuck without a way to build verso.
Platform and Versions (please complete the following information):
OS: Ubuntu 22.04.04 LTS
cargo 1.74.1 (ecb9851af 2023-10-18)
rustc 1.74.1 (a28077b28 2023-12-04)
Additional context
I'd like to evaluate verso (and servo) for use as a browser for a new p2p platform. verso looks like a promising place to start putting together an initial version of a prototype browser if only I can get it building.
The reason I need to build offline is that I am off-grid, and while cloning and updating works for most repos, my mobile broadband can't handle servo and its dependencies. I can do some things on a cloud server but need to work on a local laptop without
cargo
trying to update dependencies. Hence trying the vendored approach.I began with the wry servo demo and had the same issues, but was told that it had moved to this project.
The text was updated successfully, but these errors were encountered: