Re: [dev] [ubase] compile using musl

From: pessoa <pessoalzy_AT_fastmail.com>
Date: Tue, 19 Mar 2024 12:00:06 +0800

On Sat, Mar 16, 2024, at 4:52 AM, Eric Pruitt wrote:
> On Fri, Mar 15, 2024 at 04:22:19PM -0300, Brian Mayer wrote:
>> My guess is that glibc provides that function by musl doesn't. So as
>> my system is using musl that function is not found. Can I get some
>> help?
>
> The splice(2) call is provided by musl:
>
> src/linux/splice.c:ssize_t splice(int fd_in, off_t *off_in, int
> fd_out, off_t *off_out, size_t len, unsigned flags)
> include/fcntl.h:ssize_t splice(int, off_t *, int, off_t *, size_t,
> unsigned);
>
> What version of musl are you using? I don't get that compilation error
> on my x86_64 desktop, but the build does fail to find makedev which
> seems to be due to an issue with the header includes:
>
> ubase$ make -j1 CC=/home/ericpruitt/emus/core/musl-1.2.4/bin/musl-cc
> /home/ericpruitt/emus/core/musl-1.2.4/bin/musl-cc -s -o mknod
> mknod.o libutil.a -lcrypt
> /usr/bin/ld: mknod.o: in function `main':
> mknod.c:(.text+0x27d): undefined reference to `makedev'
> collect2: error: ld returned 1 exit status
> gmake: *** [Makefile:161: mknod] Error 1
>
> The glibc documentation says makedev and related macros should be
> included via <sys/sysmacros.h> which mknod.c does not use. I assume it
> works on glibc because one of the explicitly mentioned headers itself
> pulls in sysmacros.h. I would guess you're running into a similar issue.
>
> Eric
Received on Tue Mar 19 2024 - 05:00:06 CET

This archive was generated by hypermail 2.3.0 : Tue Mar 19 2024 - 05:48:09 CET