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

Why build sysroot from source code #140

Open
SWYZZWH opened this issue Jun 6, 2023 · 2 comments
Open

Why build sysroot from source code #140

SWYZZWH opened this issue Jun 6, 2023 · 2 comments
Labels
untriaged Requires traige

Comments

@SWYZZWH
Copy link

SWYZZWH commented Jun 6, 2023

I'm just wondering if there are any concerns about building all packages from source code when constructing the sysroot. It would be significantly faster to directly use apt-get for the required packages and then extract them from /lib and /usr/lib directories. In terms of reproducibility, we can specify the versions of these packages during the apt-get process. To support different architectures, we can use QEMU as an emulator.

@github-actions github-actions bot added the untriaged Requires traige label Jun 6, 2023
@Riatre
Copy link

Riatre commented Jun 10, 2023

First, this is more like a discussion instead of an issue.

From README.md:

When it comes to building portable ELF binaries, the libc plays an important role. The linker will try to link against new symbols, and since the GNU libc has symbol versioning, linking against a newer glibc will prevent that program from running on a system using an older glibc. To solve this, we ship glibc 2.26 with the sysroots, which should be old enough by now to make all programs compiled with this toolchain portable.

We need a specific version of glibc in the sysroot, which may or may not match the one shipped by your (or any) distro.

@f0rmiga
Copy link
Owner

f0rmiga commented Jul 31, 2023

Thanks @Riatre for the answer. To add one more bit that's not in the README, I found that libgfortran.a from the Ubuntu distro (IIRC) is unusable. Even though it's provided, I remember facing issues during linking.

Having everything built from source gives more freedom to overcome this kind of issue more quickly. I'm always happy to discuss any concerns people may have when building from source, but so far, I only got good feedback from it.

@SWYZZWH Anything specific that comes to your mind that's concerning?

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

No branches or pull requests

3 participants