Skip to content
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

Include dependencies in Ladybird build #3389

Open
techguy16 opened this issue Jan 29, 2025 · 11 comments
Open

Include dependencies in Ladybird build #3389

techguy16 opened this issue Jan 29, 2025 · 11 comments

Comments

@techguy16
Copy link

Is there a way to include the dependencies installed by VCPKG when building Ladybird? I would like to know because when I move a build from one system to another, it doesn't work due to missing libraries, which existed on the build machine as they were created during the build process.

@circl-lastname
Copy link
Contributor

Can you send the error you're facing?

@techguy16
Copy link
Author

I'll get you the full error soon, but it's related to libskia. Tried installing all packages relating to skia (sudo apt install "*skia*"), but that didn't work.

@circl-lastname
Copy link
Contributor

circl-lastname commented Feb 4, 2025

Skia can only be built from source as a dependency, it may be that for whatever reason Meta/ladybird.sh is not running vcpkg correctly or encounters an error

@techguy16
Copy link
Author

How do I build all the *.so files?

@circl-lastname
Copy link
Contributor

Are you using Meta/ladybird.sh?

@techguy16
Copy link
Author

Yes, I have been.

@InvalidUsernameException
Copy link
Contributor

InvalidUsernameException commented Feb 4, 2025

It is pretty much impossible to build a fully self-contained application without any system dependencies on Linux, which is one of the reasons why there is no such thing as a portable Linux binary in the general case. Each distro builds separate binaries of every library and application for each of their currently supported versions for a reason.

Unless you take special care to ensure compatibility, you shouldn't expect to be able to build any software (Ladybird or otherwise) on one Linux system and then transfer it to another. Which versions of which distributions are you using on the build and the target system?

@techguy16
Copy link
Author

I have been using Ubuntu 22.04 as the build/ environment and Pop!_OS 22.04 as the target.

Is it possible to create an AppImage of Ladybird?

@InvalidUsernameException
Copy link
Contributor

Those are at least closely related. Given that Pop!_OS can use Ubuntu package repos (assuming that Wikipedia is correct on that), it should be possible to get that combination working.

Looks like someone tried to make an AppImage and failed, so that would be a "not without significant effort" I guess.

The actual error would still be useful. Also which folder exactly are you copying?

@ADKaster
Copy link
Member

ADKaster commented Feb 5, 2025

Given your use case of "move the build from one system to another", I think some X/Y problem questions are in order.

  • Why do you want to build on one machine and run on another?
  • Why is building on the other machine not an option?

One possible "solution" would be to copy only the Build/caches/vcpkg-binary-cache folder from one system to another, and run a build on the second system using ladybird.sh run. That would allow you to cache as much of the built vcpkg dependencies as possible between systems, while still properly linking against the system dependencies of the new platform.

However, if what you really want is a 'distribution' build of the application, such a thing does not exist and will not exist until we get closer to the mid-2026 alpha release. The plan ™️ is to create a flatpak, rather than an AppImage.

If you want a way to have two separate machines you work on with a similar development experience, using the devcontainer in the repo might be your answer. The "optimized" version of the devcontainer will download a development environment from ghcr.io that includes a pre-populated vcpkg binary cache (for release, anyway).

@techguy16
Copy link
Author

techguy16 commented Feb 6, 2025

For your questions, the machine I want to run it on is very slow and would take 6+ hours. After about an hour, the dependencies haven't been compiled yet.

I solved the skia issue, but the error now is:

./Ladybird: error while loading shared libraries: libwebpdecoder.so.3: cannot open shared object file: No such file or directory

I will try copying the vcpkg-binary-cache folder and see if that speeds it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants