LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-04-2021, 03:53 AM   #1
franzen
Member
 
Registered: Nov 2012
Distribution: slackware
Posts: 535

Rep: Reputation: 379Reputation: 379Reputation: 379Reputation: 379
Slackware port to musl libc


Out of interest, i started porting slackware64-current to utilize musl-libc instead of glibc.
http://computer-nr3.de/muskat64-current/

Be aware that it's a work in progress, lots of packages aren't ported yet.

You may check it out with this template to create an lxc-container:
Code:
curl http://computer-nr3.de/muskat64-current/lxc-muskat > /usr/share/lxc/templates/lxc-muskat
chmod 755 /usr/share/lxc/templates/lxc-muskat
curl http://computer-nr3.de/muskat64-current/GPG-KEY | gpg --import
Here is a basic example for those who aren't familiar with lxc:
Code:
echo 'USE_LXC_BRIDGE="true"' > /etc/default/lxc-net
mkdir /var/lib/misc
/usr/libexec/lxc/lxc-net start
cat << EOF > /var/lib/lxc/default.conf
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = lxcbr0
EOF
lxc-create -n muskat -t muskat -f /var/lib/lxc/default.conf
lxc-start -n muskat
lxc-attach -n muskat
I hope this port is of interest for some of you, feedback ist appreciated :-)
 
Old 01-04-2021, 11:06 PM   #2
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,220

Rep: Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942
Very nice, I don't have time to test this out right now, but it's a cool initiative!
 
2 members found this post helpful.
Old 01-05-2021, 01:13 AM   #3
franzen
Member
 
Registered: Nov 2012
Distribution: slackware
Posts: 535

Original Poster
Rep: Reputation: 379Reputation: 379Reputation: 379Reputation: 379
Thanks. I think it is the instinct of avoiding bloat and keep things simple but functional that motivates me for this project.
Musl devs says that it's advantages over other libc's are "size, correctness, static linking support, and clean code".
Hard to say if it brings some perfomance boost, more likely it saves some ram.
At least it brings independence from glibc, and works surprisingly well.

On my 10 Years old lenovo laptop i compiled qt5 against musl, where it failed for some reasons(ram/swap if i remember correctly)
to compile qt5 with slackware 14.2/glibc.

I also like the attitude of the main developer from musl, here is a comment from him on a vte bugreport regarding musl.
 
3 members found this post helpful.
Old 01-05-2021, 06:13 AM   #4
dederon
Member
 
Registered: Oct 2013
Posts: 108

Rep: Reputation: 56
great news! it would be awesome to get rid of the atrocity called glibc.

rich felker is indeed a no bullshit guy. his blog http://ewontfix.com/ is an interesting read.

keep up the good work!
 
2 members found this post helpful.
Old 01-06-2021, 12:30 PM   #5
franzen
Member
 
Registered: Nov 2012
Distribution: slackware
Posts: 535

Original Poster
Rep: Reputation: 379Reputation: 379Reputation: 379Reputation: 379
I've added some more packages, http://computer-nr3.de/muskat64-current/ChangeLog.txt
The "rust" package doesn't build yet and is a showstopper, as mozjs78 and others depend on it, on mozjs78 in turn does polkit and others depend on etc.

809 out of 1557 builds are compiled, 748 builds to go.
 
2 members found this post helpful.
Old 01-15-2021, 11:54 PM   #6
lakmilis
LQ Newbie
 
Registered: May 2005
Distribution: mandrake
Posts: 8

Rep: Reputation: 1
Quote:
Originally Posted by franzen View Post
I've added some more packages, http://computer-nr3.de/muskat64-current/ChangeLog.txt
The "rust" package doesn't build yet and is a showstopper, as mozjs78 and others depend on it, on mozjs78 in turn does polkit and others depend on etc.

809 out of 1557 builds are compiled, 748 builds to go.
Nice... I am myself in the process of moving/adding my system from glibc to musl so might look to you for ideas if necessary.

I am not used to musl whatsoever so will take considerable auditing and patching before I got this sorted no doubt.

rust is an annoyance when it comes to bootstrapping. Are you using mrustc to bootstrap it or? Just doing a static downloaded seed ?
 
1 members found this post helpful.
Old 01-16-2021, 10:16 AM   #7
franzen
Member
 
Registered: Nov 2012
Distribution: slackware
Posts: 535

Original Poster
Rep: Reputation: 379Reputation: 379Reputation: 379Reputation: 379
Quote:
Originally Posted by lakmilis View Post
Nice... I am myself in the process of moving/adding my system from glibc to musl so might look to you for ideas if necessary.
Yor're welcome :-) I myself get the most patches from Alpine https://pkgs.alpinelinux.org/packages and Void https://github.com/void-linux/void-p...master/srcpkgs
Quote:
rust is an annoyance when it comes to bootstrapping. Are you using mrustc to bootstrap it or? Just doing a static downloaded seed ?
I didn't knew of mrustc. What didn't work for bootstrapping was manual installation of rust/cargo, as the installed version of rust on the system needs to be max. one version off to version to be build.
What worked here to build rust 1.48.0 was the following(adapted from the slackware buildscripts), download
Code:
https://static.rust-lang.org/dist/rustc-1.48.0-src.tar.gz
https://static.rust-lang.org/dist/2020-10-08/cargo-0.48.0-x86_64-unknown-linux-musl.tar.gz
https://static.rust-lang.org/dist/2020-10-08/rust-std-1.47.0-x86_64-unknown-linux-musl.tar.gz
https://static.rust-lang.org/dist/2020-10-08/rustc-1.47.0-x86_64-unknown-linux-musl.tar.gz
extract rustc-1.48.0-src.tar.gz, and enter rustc-1.48.0-src, then
Code:
mkdir -p build/cache/2020-10-08
cp  \
  rust-std-1.47.0-x86_64-unknown-linux-musl.tar.gz \
  rustc-1.47.0-x86_64-unknown-linux-musl.tar.gz \
  cargo-0.48.0-x86_64-unknown-linux-musl.tar.gz \
  build/cache/2020-10-08
.. and then go on with setting config.toml and build with "python x.py dist".
I did also use various patches from https://github.com/void-linux/void-p...r/srcpkgs/rust
 
Old 01-20-2021, 07:06 PM   #8
adcdam
Member
 
Registered: Aug 2020
Location: Berisso, Argentina
Distribution: Slackware
Posts: 255

Rep: Reputation: 205Reputation: 205Reputation: 205
thats very very nice a port too musl sounds great, what about gcompat package, that would help to run glibc packages in musl.
 
1 members found this post helpful.
Old 02-06-2021, 11:27 AM   #9
franzen
Member
 
Registered: Nov 2012
Distribution: slackware
Posts: 535

Original Poster
Rep: Reputation: 379Reputation: 379Reputation: 379Reputation: 379
Quote:
Originally Posted by adcdam View Post
thats very very nice a port too musl sounds great, what about gcompat package, that would help to run glibc packages in musl.
Thanks for that hint, didn't know about gcompat.
I think about providing an extra repository for packages like that to make it more inviting to try out the port, but the port/packages itself should stay as near as possible to slackware, so no extra packages which aren't absolutely needed there.

Btw., i made some progress, some more packages were added, X is working now. I installed the port a laptop, and i could login into xfce :-)
 
3 members found this post helpful.
Old 02-07-2021, 03:56 PM   #10
adcdam
Member
 
Registered: Aug 2020
Location: Berisso, Argentina
Distribution: Slackware
Posts: 255

Rep: Reputation: 205Reputation: 205Reputation: 205
Excellent!!!! perhaps you can check this too https://ch1p.io/void-linux-musl-glibc/
https://github.com/gch1p/voidnsrun and perhaps fork it case it doesnt work in Slackware just in case someone want to run some glibc program in a musl slackware.

also gcompat if its needed https://github.com/AdelieLinux/gcompat
 
  


Reply

Tags
musl libc



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Muslack (Slackware with Musl-libc) ReaperX7 Slackware 13 10-22-2018 02:16 AM
[Experiment] Musl-libc on a standard LFS build? ReaperX7 Linux From Scratch 13 05-11-2015 01:26 AM
LXer: Musl Libc 1.0 Is Going To Be Released Real Soon LXer Syndicated Linux News 0 03-10-2014 03:30 AM
libc.so.6(GLIBC_2.3), libc.so.6(GLIBC_2.3.2) needed for Linux 7.3.1 vivek_thampy Linux - Software 1 08-09-2004 04:12 PM
libc.so verse libc.so.5 markstevens Linux - Software 4 06-19-2003 11:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration