Compiling against musl-libC

Board for discussions around the Basilisk web browser.

Moderator: Basilisk-Dev

voidpin

Compiling against musl-libC

Unread post by voidpin » 2018-01-29, 14:50

Hi all,

I've been running Pale Moon for sometime on a Linux machine. A few months ago I've switched over to Void Linux and I'm using the muls-libC version. In other words, I can't run any programs compiled against glibC.
So, the question here is, would Basilisk compile against musl-libC if I do it from source code? Or do I need to aplay any patches?

Thank you in advance!

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35473
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Compiling against musl-libC

Unread post by Moonchild » 2018-01-29, 15:51

To the best of my knowledge, all Mozilla-derived applications require glibc, and won't compile against any other C library that isn't 100% API compatible.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

voidpin

Re: Compiling against musl-libC

Unread post by voidpin » 2018-01-29, 16:07

Thank you for your reply!
I'm currently running Firefox 58 on my Void system, so it's possible... I just don't know how? Firefox is in the repos.
Void is a small distro, so one has to do some work and build stuff for the repos. I was planning to contribute and build Basilisk.
Maybe, I could use the Firefox ESR template to build Basilisk!?
To get the source code, do I just git clone?
Thanks again!

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35473
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Compiling against musl-libC

Unread post by Moonchild » 2018-01-29, 20:56

You should be able to git clone to get the source code yes. I recommend you try building from a release version tag if you do, though, because we have a lot of code churn on the tip and it may not build.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

voidpin

Re: Compiling against musl-libC

Unread post by voidpin » 2018-01-29, 21:54

Thank you once again.
I'll give it a go in a few days...
Looking for eventually needed patches here https://wiki.musl-libc.org/compatibility.html

Cheers for the tip on the versions also!

voidpin

Re: Compiling against musl-libC

Unread post by voidpin » 2018-02-27, 16:54

I've finally found the time to try this today.
I got the tar.gz file from github, install all make dependencies and tried to compile basilisk against musl-libC.
But, it fails with

Code: Select all

psutil/_psutil_linux.c:520:21: error: 'caddr_t' undeclared (first use in this function)
Also got

Code: Select all

error: command 'gcc' failed with exit status 1
although I double-checked that the python-development heads were installed.

I've managed to try the browser on qemu-kvm running glibC, but that was not really my goal.

Just can't really understand what makes it so different from firefox-esr??
Anyway, just to let you know the outcome of my experiment.
Regards!

Locked