From: Dave Chinner <david@fromorbit.com>
To: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [BUG] xfsprogs-4.7.0: issues cross-compiling for musl
Date: Thu, 8 Sep 2016 08:27:53 +1000 [thread overview]
Message-ID: <20160907222753.GR30056@dastard> (raw)
In-Reply-To: <1473241376-10922-1-git-send-email-ralph.sennhauser@gmail.com>
On Wed, Sep 07, 2016 at 11:42:56AM +0200, Ralph Sennhauser wrote:
> To get xfsprogs to cross-compile for musl some hacks were needed.
>
> 1) d_namlen isn't available with musl
musl problem. It needs to define _DIRENT_HAVE_D_RECLEN and friends
to tell applications what the struct dirent it defines contains.
(Haven't we been through this before?)
> 2) crc32selftest doesn't make sense in case of cross-compilation, the
> same can be said if building for a different host with the native
> toolchain. So maybe an --disable-crc32selftest configure option could
> be used here.
>
> 3) The CFLAGS passed to BUILD_CC weren't understood by the native
> compiler. Set BUILD_CFLAGS to CFLAGS if not cross-compiling or let it
> blank anyway?
Ah, yes, we've definitely been through this before. Last time I said
"send patches" and they never appeared.
As it is, I'm really hesitant to remove the crc32c sanity check,
mainly because we've just been through a XFS corruption drill where
one in 10^6 crc calculations would end up wrong because of a bug in
a compiler.
Can we "auto detect" cross compilation in the makefile and avoid the
check only in that situation? configure options are really only a
last resort...
> 4) sys/ustat.h is missing in musl.
Yup, been reported before. I'm about to commit a fix for that,
mainly because certain new arches don't even implement the ustat
system call, and glibc completely fucks up the handling of that.
i.e. programs that call ustat don't fail at build time, the syscall
is stubbed to print "not supported, will fail" at runtime. Hence
nobody noticed that the xfsprogs code calling ustat was actually
broken until a week ago...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next parent reply other threads:[~2016-09-07 22:27 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1473241376-10922-1-git-send-email-ralph.sennhauser@gmail.com>
2016-09-07 22:27 ` Dave Chinner [this message]
2016-09-07 22:40 ` [BUG] xfsprogs-4.7.0: issues cross-compiling for musl Eric Sandeen
2016-09-08 8:41 ` Ralph Sennhauser
2016-09-08 12:13 ` Eric Sandeen
2016-09-08 13:22 ` Ralph Sennhauser
2016-09-08 8:35 ` Ralph Sennhauser
2016-09-09 13:32 ` [PATCH] xfs_io: fix building with musl Ralph Sennhauser
2016-09-09 13:59 ` Eric Sandeen
2016-09-09 17:07 ` Ralph Sennhauser
2016-09-10 7:37 ` [RFC] libxfs: cross-compile fixes Ralph Sennhauser
2016-09-19 5:50 ` Dave Chinner
2016-09-19 7:32 ` Ralph Sennhauser
2017-01-15 20:32 ` Eric Sandeen
2017-01-16 13:45 ` Ralph Sennhauser
2017-01-16 14:42 ` Eric Sandeen
2017-01-16 14:50 ` Ralph Sennhauser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160907222753.GR30056@dastard \
--to=david@fromorbit.com \
--cc=linux-xfs@vger.kernel.org \
--cc=ralph.sennhauser@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).