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

Is it possible to build with older musl vesions? #185

Open
luckycat889 opened this issue Mar 6, 2024 · 4 comments
Open

Is it possible to build with older musl vesions? #185

luckycat889 opened this issue Mar 6, 2024 · 4 comments

Comments

@luckycat889
Copy link

Hello,
I appreciate the ease to build a custom musl-based gcc toolchain!
It seems that the earliest musl version supported is 1.1.14. I wonder if it's possible to build with a slightly older musl, namely 1.1.6 (I wanted to test a binary compatibility thing with libc)?
I gave it a shot and it seems to fail during configure, it could be as easy as setting up the soft link to the source resident Makefile; I am trying it out now. But while I am trying that I figured I ask the question and if anyone knows if there are any roadblocks or if it should work fine (with some patches).

@rofl0r
Copy link
Contributor

rofl0r commented Mar 6, 2024

the easiest way is to build the toolchain with the default musl, then use the new toolchain to build your desired musl version manually and install it into the toolchain prefix using ./configure --prefix= and later make install DESTDIR=/path/.

@luckycat889
Copy link
Author

Oh, I see, that makes sense I think.
Just so I am clear;

  1. Build a toolchain with supported versions (musl say 1.1.14; that works fine, I checked)
  2. Download a musl tarballs of whatever version, untar, configure using above toolchain and install in place in toolchain installation tree
  3. I guess, I'd want to make sure names of libraries are the same; making sure that there are no leftovers from 1.1.14

Thanks for the tip, I'll try it out

@richfelker
Copy link
Owner

richfelker commented Mar 6, 2024

You can easily build with any musl version using git instead of releases. The form is MUSL_VER = git-${COMMIT_ID} but a commit id can be a tag such as v1.1.6 (note the v).

You can also just pre-extract musl-1.1.6.tar.gz under the top level mcm directory and then MUSL_VER = 1.1.6 will work in the absence of hash file and rules to download it.

@luckycat889
Copy link
Author

I did actually try to add the 1.1.6 hash file, and it downloads it fine, but the configure script seems incompatible with the obj_musl/src_musl convention. I tried a few things such as creating a soft link to the Makefile in the obj_musl directory, but there are more things to shore up.
So I think your suggestion of a separate musl build appears easier for this one-off thing I am trying....

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

3 participants