sfjro / aufs-standalone

27 stars 14 forks source link

aufs-util musl patches #17

Open justablob opened 2 years ago

justablob commented 2 years ago

Hello,

while building aufs-util 5.8 with a musl toolchain, we came across an old SourceForge issue. Since SourceForge doesn't appear to be active, I'm asking here: Do you have an up-to-date version of those patches, or at least the original files and could you post them on GitHub as files? SourceForge's Markdown parser mangled up your patches to the point that they're not usable anymore, so we're stuck at this point.

Thanks in advance.

sfjro commented 2 years ago

The Blobbo:

while building aufs-util 5.8 with a musl toolchain, we came across an old SourceForge issue. Since SourceForge doesn't appear to be active, I'm asking here: Do you have an up-to-date version of those patches, or at least the original files and could you post them on GitHub as files? SourceForge's Markdown parser mangled up your patches to the point that they're not usable anymore, so we're stuck at this point.

Aufs-util.git is rather quiet, I mean not so much updated. The latest aufs-util.git#aufs5.8 is 6315e74 2021-04-08 Merge branch 'aufs5.0' into aufs5.8 da21ceb 2021-03-14 comment about NFS and udba=none ::: Does it differ from yours?

About musl-libc, I simply do a build-test every time when I release aufs. For a long time I don't try running test for musl.

Did you set LibAuDir (make variable) when you compile aufs-util? Could you post your error messages?

J. R. Okajima

justablob commented 2 years ago

sjfro,

The latest commit on aufs5.8 I could see was from 2020, the merge from aufs5.0 isn't there for me. I have tried merging aufs5.0 into aufs5.8 though and got the same issues though. We didn't try to set LibAuDir when compiling. I did get a little further by modifying musl and adding the missing features to nftw and moving around some files in aufs-util, but ultimately we gave up.

For what it's worth, even though it's not the same problem, I have also reported an issue about aufs-util on buildroot's issue tracker, because it was the tool we were using at first. We've also been cross-compiling from x86_64-linux-gnu to i686-linux-musl all this time, so we're going to try a native build and report back.

Here is the buildroot issue: https://bugs.busybox.net/show_bug.cgi?id=14836

I'll get back to you in a few days, ok?

sfjro commented 2 years ago

The Blobbo:

The latest commit on aufs5.8 I could see was from 2020, the merge from aufs5.0 isn't there for me. I have tried merging aufs5.0 into aufs5.8 though and got the same issues though. We didn't try to set LibAuDir when compiling. I did get a little further by modifying musl and adding the missing features to nftw and moving around some files in aufs-util, but ultimately we gave up.

2020? Where did you get aufs-util source files? Here is current aufs5.8 branch.

6315e74 2021-04-08 Merge branch 'aufs5.0' into aufs5.8 da21ceb 2021-03-14 comment about NFS and udba=none a0871d8 2020-12-13 Revert "au_proc_getmntent: optimize reading, retry" 2ee7257 2020-12-12 Revert "minor, check AUFS_SUPER_MAGIC" 4146c4a 2020-12-12 Revert "minor, make-var ProcMounts_Times" d5f90dd 2020-12-12 version 5.8 0385c89 2020-05-17 Merge branch 'aufs4.x-rcN' into aufs5.0 :::

But I am not sure you will succees even if you get latest aufs-util.git. Because the changes added after d5f90dd are not related to nftw and musl-libc.

Here is the buildroot issue: https://bugs.busybox.net/show_bug.cgi?id=14836

Either I am not sure if it is helpful, here I try explaining how aufs-util supports musl-libc.

Hope it helps.

J. R. Okajima

justablob commented 2 years ago

sjfro,

I got the aufs-util sources from SourceForge.

Other than the whole nftw thing, the pre thing was also something we had to fix, but this was relatively easily done by adding an empty file called "pre". My guess is, "pre" is not marked as phony and for some reason make gets confused.

Extlib also didn't work. We tried both glibc and musl, but neither of them could find the files inside extlib. We had to manually include the files, and even then, that wasn't all it took.

I'm going to be away for a few days but once I'm back, I'm going to give more precise details.

justablob commented 2 years ago

sjfro,

I have done some further testing and was able to build aufs-util on my Debian host, using x86_64-linux-gnu instead of cross-compiling for i386-linux-musl as I was doing previously. This doesn't really help me in any way other than confirming that it is an issue related to aufs-util being unable to build on musl. Here is the make command I had to use to get aufs-util to build for the host:

make CPPFLAGS=-I/root/test2/linux-5.18.3/usr/include BuildDIRREN=yes BuildFHSM=yes Glibc=yes -B all

Still, I wasn't able to cross-compile it for x86 musl. There, I still get the pre issue, the nonglibc issue, the nftw issue and whatever else comes up.

Any chance you could look into this one more time?

I'd be willing to send a donation your way if we can get this sorted out. Nothing big, since I'm still a part-time student, but it would be coming from my personal wallet, not my employer's :)

sfjro commented 2 years ago

The Blobbo:

I have done some further testing and was able to build aufs-util on my Debian host, using x86_64-linux-gnu instead of cross-compiling for i386-linux-musl as I was doing previously. This doesn't really help me in any way other than confirming that it is an issue related to aufs-util being unable to build on musl. Here is the make command I had to use to get aufs-util to build for the host:


make CPPFLAGS=-I/root/test2/linux-5.18.3/usr/include BuildDIRREN=yes BuildFHSM=yes Glibc=yes -B all

What is your error message when you set "Glibc=no", "CC=musl-gcc", and "LibAuDir=/usr/musl/lib/path" ? And I'd suggest you to try https://github.com/sfjro/aufs5-standalone/issues/18#issuecomment-1152904213

J. R. Okajima

sfjro commented 1 year ago

The Blobbo:

I have done some further testing and was able to build aufs-util on my Debian host, using x86_64-linux-gnu instead of cross-compiling for i386-linux-musl as I was doing previously. This doesn't really help me in any way other than confirming that it is an issue related to aufs-util being unable to build on musl. Here is the make command I had to use to get aufs-util to build for the host:


make CPPFLAGS=-I/root/test2/linux-5.18.3/usr/include BuildDIRREN=yes BuildFHSM=yes Glibc=yes -B all

What is your error message when you set "Glibc=no", "CC=musl-gcc", and "LibAuDir=/usr/musl/lib/path" ? And I'd suggest you to try https://github.com/sfjro/aufs5-standalone/issues/18#issuecomment-1152904213

J. R. Okajima