All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: "Milan P. Stanić" <mps@arvanta.net>, linux-erofs@lists.ozlabs.org
Cc: Natanael Copa <ncopa@alpinelinux.org>
Subject: Re: build of erofs-utils 1.8.6 fails with musl libc
Date: Tue, 6 May 2025 20:38:30 +0800	[thread overview]
Message-ID: <aaf3f255-3273-4d31-86c1-4e05c59b7389@linux.alibaba.com> (raw)
In-Reply-To: <20250506121102.GA15164@m1pro.arvanta.net>

Hi Milan,

On 2025/5/6 20:11, Milan P. Stanić wrote:
> Hi,
> 
> I'm maintainer of erofs-utils for Alpine linux, distribution which use
> musl libc instead of glibc.
> 
> Building version 1.8.6 gives error:
> ------------------
> Making all in contrib
> make[2]: Entering directory '/home/mps/aports/community/erofs-utils/src/erofs-utils-1.8.6/contrib'
> cc -DHAVE_CONFIG_H -I. -I..   -DNDEBUG -Wall -I../include -Os -fstack-clash-protection -Wformat -Werror=format-security -fno-plt -MT stress-stress.o -MD -MP -MF .deps/stress-stress.Tpo -c -o stress-stress.o `test -f 'stress.c' || echo './'`stress.c
> stress.c: In function '__getdents_f':
> stress.c:274:16: error: implicit declaration of function 'readdir64'; did you mean 'readdir_r'? [-Wimplicit-function-declaration]
>    274 |         while (readdir64(dir) != NULL)
>        |                ^~~~~~~~~
>        |                readdir_r
> stress.c:274:31: warning: comparison between pointer and integer
>    274 |         while (readdir64(dir) != NULL)
>        |                               ^~
> stress.c: In function '__read_f':
> stress.c:431:17: error: implicit declaration of function 'pread64'; did you mean 'pread'? [-Wimplicit-function-declaration]
>    431 |         nread = pread64(fe->fd, buf, len, off);
>        |                 ^~~~~~~
>        |                 pread
> stress.c: In function 'read_f':
> stress.c:480:15: error: implicit declaration of function 'lseek64'; did you mean 'lseek'? [-Wimplicit-function-declaration]
>    480 |         fsz = lseek64(fe->fd, 0, SEEK_END);
>        |               ^~~~~~~
>        |               lseek
> make[2]: *** [Makefile:420: stress-stress.o] Error 1
> make[2]: Leaving directory '/home/mps/aports/community/erofs-utils/src/erofs-utils-1.8.6/contrib'
> make[1]: *** [Makefile:447: all-recursive] Error 1
> make[1]: Leaving directory '/home/mps/aports/community/erofs-utils/src/erofs-utils-1.8.6'
> make: *** [Makefile:379: all] Error 2
>>>> ERROR: erofs-utils: build failed
>>>> erofs-utils: Uninstalling dependencies...
> (1/19) Purging .makedepends-erofs-utils (20250506.063719)
> ------------------
> 
> This is because musl use readdir, pread and lseek instead of readdir64,
> pread64 and lseek64.
> (IMO musl does this properly)
> 
> Natanael Copa <ncopa@alpinelinux.org> created patch with which I build
> erofs-utils successfully. I'm attaching patch to this mail.
> 
> Feel free to contact me if you more information or to try some new
> patches.

Thanks!  I will look into that later and feedback.

Thanks,
Gao Xiang

> 



  reply	other threads:[~2025-05-06 12:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-06 12:11 build of erofs-utils 1.8.6 fails with musl libc Milan P. Stanić
2025-05-06 12:38 ` Gao Xiang [this message]
2025-05-07  8:50 ` [PATCH] erofs-utils: fix build failure " Gao Xiang
2025-05-07 13:25 ` [PATCH v2] " Gao Xiang
2025-05-07 16:35   ` Natanael Copa
2025-05-10  9:02     ` Milan P. Stanić

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=aaf3f255-3273-4d31-86c1-4e05c59b7389@linux.alibaba.com \
    --to=hsiangkao@linux.alibaba.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=mps@arvanta.net \
    --cc=ncopa@alpinelinux.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.