public inbox for [email protected]
 help / color / mirror / Atom feed
* Build 0.6 version fail on musl libc
@ 2020-04-28 19:29 Milan P. Stanić
  2020-04-29 15:24 ` Jens Axboe
  0 siblings, 1 reply; 17+ messages in thread
From: Milan P. Stanić @ 2020-04-28 19:29 UTC (permalink / raw)
  To: io-uring

Hello,

I'm liburing Alpine Linux maintainer
(https://git.alpinelinux.org/aports/tree/testing/liburing)

I tried to upgrade to 0.6 from 0.5 version but I got errors:
include/liburing/compat.h:6:2: error: unknown type name 'int64_t'
and
include/liburing.h:196:17: error: unknown type name 'loff_t'; did you mean 'off_t'?

musl libc have /usr/include/fcntl.h in which loff_t is defined with:
#define loff_t off_t
and I tried to include it in include/liburing.h but this didn't helped.

After this I created this patch:
------
--- a/src/include/liburing.h	2020-04-13 18:50:21.000000000 +0200
+++ b/src/include/liburing.h	2020-04-23 21:43:15.923487287 +0200
@@ -193,8 +193,8 @@
 }
 
 static inline void io_uring_prep_splice(struct io_uring_sqe *sqe,
-					int fd_in, loff_t off_in,
-					int fd_out, loff_t off_out,
+					int fd_in, off_t off_in,
+					int fd_out, off_t off_out,
 					unsigned int nbytes,
 					unsigned int splice_flags)
 {
------
with which version 0.6 builds fine but I suspect this is not proper fix.

Could you, please, give me advice what will be proper fix these changes?

-- 
regards

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Build 0.6 version fail on musl libc
  2020-04-28 19:29 Build 0.6 version fail on musl libc Milan P. Stanić
@ 2020-04-29 15:24 ` Jens Axboe
  2020-04-29 15:26   ` Christoph Hellwig
  0 siblings, 1 reply; 17+ messages in thread
From: Jens Axboe @ 2020-04-29 15:24 UTC (permalink / raw)
  To: Milan P. Stanić, io-uring

On 4/28/20 1:29 PM, Milan P. Stanić wrote:
> Hello,
> 
> I'm liburing Alpine Linux maintainer
> (https://git.alpinelinux.org/aports/tree/testing/liburing)
> 
> I tried to upgrade to 0.6 from 0.5 version but I got errors:
> include/liburing/compat.h:6:2: error: unknown type name 'int64_t'
> and
> include/liburing.h:196:17: error: unknown type name 'loff_t'; did you mean 'off_t'?
> 
> musl libc have /usr/include/fcntl.h in which loff_t is defined with:
> #define loff_t off_t
> and I tried to include it in include/liburing.h but this didn't helped.
> 
> After this I created this patch:
> ------
> --- a/src/include/liburing.h	2020-04-13 18:50:21.000000000 +0200
> +++ b/src/include/liburing.h	2020-04-23 21:43:15.923487287 +0200
> @@ -193,8 +193,8 @@
>  }
>  
>  static inline void io_uring_prep_splice(struct io_uring_sqe *sqe,
> -					int fd_in, loff_t off_in,
> -					int fd_out, loff_t off_out,
> +					int fd_in, off_t off_in,
> +					int fd_out, off_t off_out,
>  					unsigned int nbytes,
>  					unsigned int splice_flags)
>  {
> ------
> with which version 0.6 builds fine but I suspect this is not proper fix.
> 
> Could you, please, give me advice what will be proper fix these changes?

Not sure what the best fix is there, for 32-bit, your change will truncate
the offset to 32-bit as off_t is only 4 bytes there. At least that's the
case for me, maybe musl is different if it just has a nasty define for
them.

Maybe best to just make them uint64_t or something like that.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Build 0.6 version fail on musl libc
  2020-04-29 15:24 ` Jens Axboe
@ 2020-04-29 15:26   ` Christoph Hellwig
  2020-04-29 15:29     ` Jens Axboe
  0 siblings, 1 reply; 17+ messages in thread
From: Christoph Hellwig @ 2020-04-29 15:26 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Milan P. Stanić, io-uring

On Wed, Apr 29, 2020 at 09:24:40AM -0600, Jens Axboe wrote:
> 
> Not sure what the best fix is there, for 32-bit, your change will truncate
> the offset to 32-bit as off_t is only 4 bytes there. At least that's the
> case for me, maybe musl is different if it just has a nasty define for
> them.
> 
> Maybe best to just make them uint64_t or something like that.

The proper LFS type would be off64_t.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Build 0.6 version fail on musl libc
  2020-04-29 15:26   ` Christoph Hellwig
@ 2020-04-29 15:29     ` Jens Axboe
  2020-04-29 16:14       ` Jens Axboe
  0 siblings, 1 reply; 17+ messages in thread
From: Jens Axboe @ 2020-04-29 15:29 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Milan P. Stanić, io-uring

On 4/29/20 9:26 AM, Christoph Hellwig wrote:
> On Wed, Apr 29, 2020 at 09:24:40AM -0600, Jens Axboe wrote:
>>
>> Not sure what the best fix is there, for 32-bit, your change will truncate
>> the offset to 32-bit as off_t is only 4 bytes there. At least that's the
>> case for me, maybe musl is different if it just has a nasty define for
>> them.
>>
>> Maybe best to just make them uint64_t or something like that.
> 
> The proper LFS type would be off64_t.

Is it available anywhere? Because I don't have it.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Build 0.6 version fail on musl libc
  2020-04-29 15:29     ` Jens Axboe
@ 2020-04-29 16:14       ` Jens Axboe
  2020-04-29 19:33         ` Milan P. Stanić
  2020-04-29 19:36         ` Jann Horn
  0 siblings, 2 replies; 17+ messages in thread
From: Jens Axboe @ 2020-04-29 16:14 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Milan P. Stanić, io-uring

On 4/29/20 9:29 AM, Jens Axboe wrote:
> On 4/29/20 9:26 AM, Christoph Hellwig wrote:
>> On Wed, Apr 29, 2020 at 09:24:40AM -0600, Jens Axboe wrote:
>>>
>>> Not sure what the best fix is there, for 32-bit, your change will truncate
>>> the offset to 32-bit as off_t is only 4 bytes there. At least that's the
>>> case for me, maybe musl is different if it just has a nasty define for
>>> them.
>>>
>>> Maybe best to just make them uint64_t or something like that.
>>
>> The proper LFS type would be off64_t.
> 
> Is it available anywhere? Because I don't have it.

There seems to be better luck with __off64_t, but I don't even know
how widespread that is... Going to give it a go, we'll see.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Build 0.6 version fail on musl libc
  2020-04-29 16:14       ` Jens Axboe
@ 2020-04-29 19:33         ` Milan P. Stanić
  2020-04-29 19:38           ` Jens Axboe
  2020-04-29 19:36         ` Jann Horn
  1 sibling, 1 reply; 17+ messages in thread
From: Milan P. Stanić @ 2020-04-29 19:33 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Christoph Hellwig, io-uring

[-- Attachment #1: Type: text/plain, Size: 1294 bytes --]

On Wed, 2020-04-29 at 10:14, Jens Axboe wrote:
> On 4/29/20 9:29 AM, Jens Axboe wrote:
> > On 4/29/20 9:26 AM, Christoph Hellwig wrote:
> >> On Wed, Apr 29, 2020 at 09:24:40AM -0600, Jens Axboe wrote:
> >>>
> >>> Not sure what the best fix is there, for 32-bit, your change will truncate
> >>> the offset to 32-bit as off_t is only 4 bytes there. At least that's the
> >>> case for me, maybe musl is different if it just has a nasty define for
> >>> them.
> >>>
> >>> Maybe best to just make them uint64_t or something like that.
> >>
> >> The proper LFS type would be off64_t.
> > 
> > Is it available anywhere? Because I don't have it.
> 
> There seems to be better luck with __off64_t, but I don't even know
> how widespread that is... Going to give it a go, we'll see.

AFAIK, __off64_t is glibc specific, defined in /usr/include/fcntl.h:
------
# ifndef __USE_FILE_OFFSET64
typedef __off_t off_t;
# else
typedef __off64_t off_t;
# endif
------

So, this will not work on musl based Linux system, git commit id
b5096098c62adb19dbf4a39b480909766c9026e7 should be reverted. But you
know better what to do.

I come with another quick and dirty patch attached to this mail but
again  I think it is not proper solution, just playing to find (maybe)
'good enough' workaround.

Thanks
-- 
regards

[-- Attachment #2: liburing-offt-fix.diff --]
[-- Type: text/x-diff, Size: 675 bytes --]

diff --git a/configure b/configure
index 30b0a5a..8299597 100755
--- a/configure
+++ b/configure
@@ -301,6 +301,9 @@ EOF
 fi
 if test "$__kernel_timespec" != "yes"; then
 cat >> $compat_h << EOF
+#include <stdint.h>
+#define int64_t uint64_t
+
 struct __kernel_timespec {
 	int64_t		tv_sec;
 	long long	tv_nsec;
diff --git a/src/include/liburing.h b/src/include/liburing.h
index ae5542c..24c24a2 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -14,7 +14,9 @@ extern "C" {
 #include "liburing/compat.h"
 #include "liburing/io_uring.h"
 #include "liburing/barrier.h"
+#include <sys/stat.h>
 
+#define loff_t off_t
 /*
  * Library interface to io_uring
  */

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: Build 0.6 version fail on musl libc
  2020-04-29 16:14       ` Jens Axboe
  2020-04-29 19:33         ` Milan P. Stanić
@ 2020-04-29 19:36         ` Jann Horn
  2020-04-29 19:38           ` Jens Axboe
  1 sibling, 1 reply; 17+ messages in thread
From: Jann Horn @ 2020-04-29 19:36 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Christoph Hellwig, Milan P. Stanić, io-uring, Linux API

+linux-api

On Wed, Apr 29, 2020 at 6:14 PM Jens Axboe <[email protected]> wrote:
>
> On 4/29/20 9:29 AM, Jens Axboe wrote:
> > On 4/29/20 9:26 AM, Christoph Hellwig wrote:
> >> On Wed, Apr 29, 2020 at 09:24:40AM -0600, Jens Axboe wrote:
> >>>
> >>> Not sure what the best fix is there, for 32-bit, your change will truncate
> >>> the offset to 32-bit as off_t is only 4 bytes there. At least that's the
> >>> case for me, maybe musl is different if it just has a nasty define for
> >>> them.
> >>>
> >>> Maybe best to just make them uint64_t or something like that.
> >>
> >> The proper LFS type would be off64_t.
> >
> > Is it available anywhere? Because I don't have it.
>
> There seems to be better luck with __off64_t, but I don't even know
> how widespread that is... Going to give it a go, we'll see.

If you have questions about how to properly write UAPI headers,
linux-api@ is probably a good place to ask.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Build 0.6 version fail on musl libc
  2020-04-29 19:36         ` Jann Horn
@ 2020-04-29 19:38           ` Jens Axboe
  0 siblings, 0 replies; 17+ messages in thread
From: Jens Axboe @ 2020-04-29 19:38 UTC (permalink / raw)
  To: Jann Horn; +Cc: Christoph Hellwig, Milan P. Stanić, io-uring, Linux API

On 4/29/20 1:36 PM, Jann Horn wrote:
> +linux-api
> 
> On Wed, Apr 29, 2020 at 6:14 PM Jens Axboe <[email protected]> wrote:
>>
>> On 4/29/20 9:29 AM, Jens Axboe wrote:
>>> On 4/29/20 9:26 AM, Christoph Hellwig wrote:
>>>> On Wed, Apr 29, 2020 at 09:24:40AM -0600, Jens Axboe wrote:
>>>>>
>>>>> Not sure what the best fix is there, for 32-bit, your change will truncate
>>>>> the offset to 32-bit as off_t is only 4 bytes there. At least that's the
>>>>> case for me, maybe musl is different if it just has a nasty define for
>>>>> them.
>>>>>
>>>>> Maybe best to just make them uint64_t or something like that.
>>>>
>>>> The proper LFS type would be off64_t.
>>>
>>> Is it available anywhere? Because I don't have it.
>>
>> There seems to be better luck with __off64_t, but I don't even know
>> how widespread that is... Going to give it a go, we'll see.
> 
> If you have questions about how to properly write UAPI headers,
> linux-api@ is probably a good place to ask.

This is in liburing, it's not the kernel side. The kernel side is fine.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Build 0.6 version fail on musl libc
  2020-04-29 19:33         ` Milan P. Stanić
@ 2020-04-29 19:38           ` Jens Axboe
  2020-04-29 20:01             ` Milan P. Stanić
  0 siblings, 1 reply; 17+ messages in thread
From: Jens Axboe @ 2020-04-29 19:38 UTC (permalink / raw)
  To: Milan P. Stanić; +Cc: Christoph Hellwig, io-uring

On 4/29/20 1:33 PM, Milan P. Stanić wrote:
> On Wed, 2020-04-29 at 10:14, Jens Axboe wrote:
>> On 4/29/20 9:29 AM, Jens Axboe wrote:
>>> On 4/29/20 9:26 AM, Christoph Hellwig wrote:
>>>> On Wed, Apr 29, 2020 at 09:24:40AM -0600, Jens Axboe wrote:
>>>>>
>>>>> Not sure what the best fix is there, for 32-bit, your change will truncate
>>>>> the offset to 32-bit as off_t is only 4 bytes there. At least that's the
>>>>> case for me, maybe musl is different if it just has a nasty define for
>>>>> them.
>>>>>
>>>>> Maybe best to just make them uint64_t or something like that.
>>>>
>>>> The proper LFS type would be off64_t.
>>>
>>> Is it available anywhere? Because I don't have it.
>>
>> There seems to be better luck with __off64_t, but I don't even know
>> how widespread that is... Going to give it a go, we'll see.
> 
> AFAIK, __off64_t is glibc specific, defined in /usr/include/fcntl.h:
> ------
> # ifndef __USE_FILE_OFFSET64
> typedef __off_t off_t;
> # else
> typedef __off64_t off_t;
> # endif
> ------
> 
> So, this will not work on musl based Linux system, git commit id
> b5096098c62adb19dbf4a39b480909766c9026e7 should be reverted. But you
> know better what to do.
> 
> I come with another quick and dirty patch attached to this mail but
> again  I think it is not proper solution, just playing to find (maybe)
> 'good enough' workaround.

Let's just use uint64_t.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Build 0.6 version fail on musl libc
  2020-04-29 19:38           ` Jens Axboe
@ 2020-04-29 20:01             ` Milan P. Stanić
  2020-04-29 20:08               ` Jens Axboe
  0 siblings, 1 reply; 17+ messages in thread
From: Milan P. Stanić @ 2020-04-29 20:01 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Christoph Hellwig, io-uring

On Wed, 2020-04-29 at 13:38, Jens Axboe wrote:
> On 4/29/20 1:33 PM, Milan P. Stanić wrote:
> > On Wed, 2020-04-29 at 10:14, Jens Axboe wrote:
> >> On 4/29/20 9:29 AM, Jens Axboe wrote:
> >>> On 4/29/20 9:26 AM, Christoph Hellwig wrote:
> >>>> On Wed, Apr 29, 2020 at 09:24:40AM -0600, Jens Axboe wrote:
> >>>>>
> >>>>> Not sure what the best fix is there, for 32-bit, your change will truncate
> >>>>> the offset to 32-bit as off_t is only 4 bytes there. At least that's the
> >>>>> case for me, maybe musl is different if it just has a nasty define for
> >>>>> them.
> >>>>>
> >>>>> Maybe best to just make them uint64_t or something like that.
> >>>>
> >>>> The proper LFS type would be off64_t.
> >>>
> >>> Is it available anywhere? Because I don't have it.
> >>
> >> There seems to be better luck with __off64_t, but I don't even know
> >> how widespread that is... Going to give it a go, we'll see.
> > 
> > AFAIK, __off64_t is glibc specific, defined in /usr/include/fcntl.h:
> > ------
> > # ifndef __USE_FILE_OFFSET64
> > typedef __off_t off_t;
> > # else
> > typedef __off64_t off_t;
> > # endif
> > ------
> > 
> > So, this will not work on musl based Linux system, git commit id
> > b5096098c62adb19dbf4a39b480909766c9026e7 should be reverted. But you
> > know better what to do.
> > 
> > I come with another quick and dirty patch attached to this mail but
> > again  I think it is not proper solution, just playing to find (maybe)
> > 'good enough' workaround.
> 
> Let's just use uint64_t.

This works. Thanks.

Next issue is this:
----
make[1]: Entering directory '/work/devel/liburing/src'
     CC setup.ol
     CC queue.ol
     CC syscall.ol
In file included from syscall.c:9:
include/liburing/compat.h:6:2: error: unknown type name 'int64_t'
    6 |  int64_t  tv_sec;
      |  ^~~~~~~
make[1]: *** [Makefile:43: syscall.ol] Error 1
make[1]: Leaving directory '/work/devel/liburing/src'
make: *** [Makefile:12: all] Error 2
----

I fixed it with this patch:
--
diff --git a/configure b/configure
index 30b0a5a..4b44177 100755
--- a/configure
+++ b/configure
@@ -301,6 +301,7 @@ EOF
 fi
 if test "$__kernel_timespec" != "yes"; then
 cat >> $compat_h << EOF
+#include <stdint.h>
 struct __kernel_timespec {
  int64_t   tv_sec;
  long long tv_nsec;
--

but not sure will that work on glibc.

-- 
regards

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: Build 0.6 version fail on musl libc
  2020-04-29 20:01             ` Milan P. Stanić
@ 2020-04-29 20:08               ` Jens Axboe
  2020-04-29 20:38                 ` Milan P. Stanić
  0 siblings, 1 reply; 17+ messages in thread
From: Jens Axboe @ 2020-04-29 20:08 UTC (permalink / raw)
  To: Milan P. Stanić; +Cc: Christoph Hellwig, io-uring

On 4/29/20 2:01 PM, Milan P. Stanić wrote:
> On Wed, 2020-04-29 at 13:38, Jens Axboe wrote:
>> On 4/29/20 1:33 PM, Milan P. Stanić wrote:
>>> On Wed, 2020-04-29 at 10:14, Jens Axboe wrote:
>>>> On 4/29/20 9:29 AM, Jens Axboe wrote:
>>>>> On 4/29/20 9:26 AM, Christoph Hellwig wrote:
>>>>>> On Wed, Apr 29, 2020 at 09:24:40AM -0600, Jens Axboe wrote:
>>>>>>>
>>>>>>> Not sure what the best fix is there, for 32-bit, your change will truncate
>>>>>>> the offset to 32-bit as off_t is only 4 bytes there. At least that's the
>>>>>>> case for me, maybe musl is different if it just has a nasty define for
>>>>>>> them.
>>>>>>>
>>>>>>> Maybe best to just make them uint64_t or something like that.
>>>>>>
>>>>>> The proper LFS type would be off64_t.
>>>>>
>>>>> Is it available anywhere? Because I don't have it.
>>>>
>>>> There seems to be better luck with __off64_t, but I don't even know
>>>> how widespread that is... Going to give it a go, we'll see.
>>>
>>> AFAIK, __off64_t is glibc specific, defined in /usr/include/fcntl.h:
>>> ------
>>> # ifndef __USE_FILE_OFFSET64
>>> typedef __off_t off_t;
>>> # else
>>> typedef __off64_t off_t;
>>> # endif
>>> ------
>>>
>>> So, this will not work on musl based Linux system, git commit id
>>> b5096098c62adb19dbf4a39b480909766c9026e7 should be reverted. But you
>>> know better what to do.
>>>
>>> I come with another quick and dirty patch attached to this mail but
>>> again  I think it is not proper solution, just playing to find (maybe)
>>> 'good enough' workaround.
>>
>> Let's just use uint64_t.
> 
> This works. Thanks.
> 
> Next issue is this:
> ----
> make[1]: Entering directory '/work/devel/liburing/src'
>      CC setup.ol
>      CC queue.ol
>      CC syscall.ol
> In file included from syscall.c:9:
> include/liburing/compat.h:6:2: error: unknown type name 'int64_t'
>     6 |  int64_t  tv_sec;
>       |  ^~~~~~~
> make[1]: *** [Makefile:43: syscall.ol] Error 1
> make[1]: Leaving directory '/work/devel/liburing/src'
> make: *** [Makefile:12: all] Error 2
> ----
> 
> I fixed it with this patch:
> --
> diff --git a/configure b/configure
> index 30b0a5a..4b44177 100755
> --- a/configure
> +++ b/configure
> @@ -301,6 +301,7 @@ EOF
>  fi
>  if test "$__kernel_timespec" != "yes"; then
>  cat >> $compat_h << EOF
> +#include <stdint.h>
>  struct __kernel_timespec {
>   int64_t   tv_sec;
>   long long tv_nsec;
> --
> 
> but not sure will that work on glibc.

That should work fine on glibc. Care to send as an actual
patch, with commit message and signed-off-by? Then I'll add
it to liburing.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Build 0.6 version fail on musl libc
  2020-04-29 20:08               ` Jens Axboe
@ 2020-04-29 20:38                 ` Milan P. Stanić
  2020-04-29 20:43                   ` Jens Axboe
  0 siblings, 1 reply; 17+ messages in thread
From: Milan P. Stanić @ 2020-04-29 20:38 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Christoph Hellwig, io-uring

[-- Attachment #1: Type: text/plain, Size: 2802 bytes --]

On Wed, 2020-04-29 at 14:08, Jens Axboe wrote:
> On 4/29/20 2:01 PM, Milan P. Stanić wrote:
> > On Wed, 2020-04-29 at 13:38, Jens Axboe wrote:
> >> On 4/29/20 1:33 PM, Milan P. Stanić wrote:
> >>> On Wed, 2020-04-29 at 10:14, Jens Axboe wrote:
> >>>> On 4/29/20 9:29 AM, Jens Axboe wrote:
> >>>>> On 4/29/20 9:26 AM, Christoph Hellwig wrote:
> >>>>>> On Wed, Apr 29, 2020 at 09:24:40AM -0600, Jens Axboe wrote:
> >>>>>>>
> >>>>>>> Not sure what the best fix is there, for 32-bit, your change will truncate
> >>>>>>> the offset to 32-bit as off_t is only 4 bytes there. At least that's the
> >>>>>>> case for me, maybe musl is different if it just has a nasty define for
> >>>>>>> them.
> >>>>>>>
> >>>>>>> Maybe best to just make them uint64_t or something like that.
> >>>>>>
> >>>>>> The proper LFS type would be off64_t.
> >>>>>
> >>>>> Is it available anywhere? Because I don't have it.
> >>>>
> >>>> There seems to be better luck with __off64_t, but I don't even know
> >>>> how widespread that is... Going to give it a go, we'll see.
> >>>
> >>> AFAIK, __off64_t is glibc specific, defined in /usr/include/fcntl.h:
> >>> ------
> >>> # ifndef __USE_FILE_OFFSET64
> >>> typedef __off_t off_t;
> >>> # else
> >>> typedef __off64_t off_t;
> >>> # endif
> >>> ------
> >>>
> >>> So, this will not work on musl based Linux system, git commit id
> >>> b5096098c62adb19dbf4a39b480909766c9026e7 should be reverted. But you
> >>> know better what to do.
> >>>
> >>> I come with another quick and dirty patch attached to this mail but
> >>> again  I think it is not proper solution, just playing to find (maybe)
> >>> 'good enough' workaround.
> >>
> >> Let's just use uint64_t.
> > 
> > This works. Thanks.
> > 
> > Next issue is this:
> > ----
> > make[1]: Entering directory '/work/devel/liburing/src'
> >      CC setup.ol
> >      CC queue.ol
> >      CC syscall.ol
> > In file included from syscall.c:9:
> > include/liburing/compat.h:6:2: error: unknown type name 'int64_t'
> >     6 |  int64_t  tv_sec;
> >       |  ^~~~~~~
> > make[1]: *** [Makefile:43: syscall.ol] Error 1
> > make[1]: Leaving directory '/work/devel/liburing/src'
> > make: *** [Makefile:12: all] Error 2
> > ----
> > 
> > I fixed it with this patch:
> > --
> > diff --git a/configure b/configure
> > index 30b0a5a..4b44177 100755
> > --- a/configure
> > +++ b/configure
> > @@ -301,6 +301,7 @@ EOF
> >  fi
> >  if test "$__kernel_timespec" != "yes"; then
> >  cat >> $compat_h << EOF
> > +#include <stdint.h>
> >  struct __kernel_timespec {
> >   int64_t   tv_sec;
> >   long long tv_nsec;
> > --
> > 
> > but not sure will that work on glibc.
> 
> That should work fine on glibc. Care to send as an actual
> patch, with commit message and signed-off-by? Then I'll add
> it to liburing.

patch is attached.

Thanks

-- 
regards

[-- Attachment #2: liburing-int64_t-fix.diff --]
[-- Type: text/x-diff, Size: 736 bytes --]

From cb2005d452e0c61f2fde89583f2479b2df6ab105 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Milan=20P=2E=20Stani=C4=87?= <[email protected]>
Date: Wed, 29 Apr 2020 22:34:02 +0200
Subject: [PATCH] fix build on musl libc
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Milan P. Stanić <[email protected]>
---
 configure | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configure b/configure
index 30b0a5a..25c4142 100755
--- a/configure
+++ b/configure
@@ -301,6 +301,8 @@ EOF
 fi
 if test "$__kernel_timespec" != "yes"; then
 cat >> $compat_h << EOF
+#include <stdint.h>
+
 struct __kernel_timespec {
 	int64_t		tv_sec;
 	long long	tv_nsec;
-- 
2.24.3


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: Build 0.6 version fail on musl libc
  2020-04-29 20:38                 ` Milan P. Stanić
@ 2020-04-29 20:43                   ` Jens Axboe
  2020-04-29 20:48                     ` Milan P. Stanić
  2020-04-30 14:38                     ` Milan P. Stanić
  0 siblings, 2 replies; 17+ messages in thread
From: Jens Axboe @ 2020-04-29 20:43 UTC (permalink / raw)
  To: Milan P. Stanić; +Cc: Christoph Hellwig, io-uring

On 4/29/20 2:38 PM, Milan P. Stanić wrote:
> On Wed, 2020-04-29 at 14:08, Jens Axboe wrote:
>> On 4/29/20 2:01 PM, Milan P. Stanić wrote:
>>> On Wed, 2020-04-29 at 13:38, Jens Axboe wrote:
>>>> On 4/29/20 1:33 PM, Milan P. Stanić wrote:
>>>>> On Wed, 2020-04-29 at 10:14, Jens Axboe wrote:
>>>>>> On 4/29/20 9:29 AM, Jens Axboe wrote:
>>>>>>> On 4/29/20 9:26 AM, Christoph Hellwig wrote:
>>>>>>>> On Wed, Apr 29, 2020 at 09:24:40AM -0600, Jens Axboe wrote:
>>>>>>>>>
>>>>>>>>> Not sure what the best fix is there, for 32-bit, your change will truncate
>>>>>>>>> the offset to 32-bit as off_t is only 4 bytes there. At least that's the
>>>>>>>>> case for me, maybe musl is different if it just has a nasty define for
>>>>>>>>> them.
>>>>>>>>>
>>>>>>>>> Maybe best to just make them uint64_t or something like that.
>>>>>>>>
>>>>>>>> The proper LFS type would be off64_t.
>>>>>>>
>>>>>>> Is it available anywhere? Because I don't have it.
>>>>>>
>>>>>> There seems to be better luck with __off64_t, but I don't even know
>>>>>> how widespread that is... Going to give it a go, we'll see.
>>>>>
>>>>> AFAIK, __off64_t is glibc specific, defined in /usr/include/fcntl.h:
>>>>> ------
>>>>> # ifndef __USE_FILE_OFFSET64
>>>>> typedef __off_t off_t;
>>>>> # else
>>>>> typedef __off64_t off_t;
>>>>> # endif
>>>>> ------
>>>>>
>>>>> So, this will not work on musl based Linux system, git commit id
>>>>> b5096098c62adb19dbf4a39b480909766c9026e7 should be reverted. But you
>>>>> know better what to do.
>>>>>
>>>>> I come with another quick and dirty patch attached to this mail but
>>>>> again  I think it is not proper solution, just playing to find (maybe)
>>>>> 'good enough' workaround.
>>>>
>>>> Let's just use uint64_t.
>>>
>>> This works. Thanks.
>>>
>>> Next issue is this:
>>> ----
>>> make[1]: Entering directory '/work/devel/liburing/src'
>>>      CC setup.ol
>>>      CC queue.ol
>>>      CC syscall.ol
>>> In file included from syscall.c:9:
>>> include/liburing/compat.h:6:2: error: unknown type name 'int64_t'
>>>     6 |  int64_t  tv_sec;
>>>       |  ^~~~~~~
>>> make[1]: *** [Makefile:43: syscall.ol] Error 1
>>> make[1]: Leaving directory '/work/devel/liburing/src'
>>> make: *** [Makefile:12: all] Error 2
>>> ----
>>>
>>> I fixed it with this patch:
>>> --
>>> diff --git a/configure b/configure
>>> index 30b0a5a..4b44177 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -301,6 +301,7 @@ EOF
>>>  fi
>>>  if test "$__kernel_timespec" != "yes"; then
>>>  cat >> $compat_h << EOF
>>> +#include <stdint.h>
>>>  struct __kernel_timespec {
>>>   int64_t   tv_sec;
>>>   long long tv_nsec;
>>> --
>>>
>>> but not sure will that work on glibc.
>>
>> That should work fine on glibc. Care to send as an actual
>> patch, with commit message and signed-off-by? Then I'll add
>> it to liburing.
> 
> patch is attached.

Great thanks, I added a bit to your commit message. Here it is:

https://git.kernel.dk/cgit/liburing/commit/?id=8171778c835b6be517c314cf23dd1f5ae061a117

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Build 0.6 version fail on musl libc
  2020-04-29 20:43                   ` Jens Axboe
@ 2020-04-29 20:48                     ` Milan P. Stanić
  2020-04-30 14:38                     ` Milan P. Stanić
  1 sibling, 0 replies; 17+ messages in thread
From: Milan P. Stanić @ 2020-04-29 20:48 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Christoph Hellwig, io-uring

On Wed, 2020-04-29 at 14:43, Jens Axboe wrote:
> On 4/29/20 2:38 PM, Milan P. Stanić wrote:
> > On Wed, 2020-04-29 at 14:08, Jens Axboe wrote:
> >> On 4/29/20 2:01 PM, Milan P. Stanić wrote:
> >>> On Wed, 2020-04-29 at 13:38, Jens Axboe wrote:
> >>>> On 4/29/20 1:33 PM, Milan P. Stanić wrote:
> >>>>> On Wed, 2020-04-29 at 10:14, Jens Axboe wrote:
> >>>>>> On 4/29/20 9:29 AM, Jens Axboe wrote:
> >>>>>>> On 4/29/20 9:26 AM, Christoph Hellwig wrote:
> >>>>>>>> On Wed, Apr 29, 2020 at 09:24:40AM -0600, Jens Axboe wrote:
> >>>>>>>>>
> >>>>>>>>> Not sure what the best fix is there, for 32-bit, your change will truncate
> >>>>>>>>> the offset to 32-bit as off_t is only 4 bytes there. At least that's the
> >>>>>>>>> case for me, maybe musl is different if it just has a nasty define for
> >>>>>>>>> them.
> >>>>>>>>>
> >>>>>>>>> Maybe best to just make them uint64_t or something like that.
> >>>>>>>>
> >>>>>>>> The proper LFS type would be off64_t.
> >>>>>>>
> >>>>>>> Is it available anywhere? Because I don't have it.
> >>>>>>
> >>>>>> There seems to be better luck with __off64_t, but I don't even know
> >>>>>> how widespread that is... Going to give it a go, we'll see.
> >>>>>
> >>>>> AFAIK, __off64_t is glibc specific, defined in /usr/include/fcntl.h:
> >>>>> ------
> >>>>> # ifndef __USE_FILE_OFFSET64
> >>>>> typedef __off_t off_t;
> >>>>> # else
> >>>>> typedef __off64_t off_t;
> >>>>> # endif
> >>>>> ------
> >>>>>
> >>>>> So, this will not work on musl based Linux system, git commit id
> >>>>> b5096098c62adb19dbf4a39b480909766c9026e7 should be reverted. But you
> >>>>> know better what to do.
> >>>>>
> >>>>> I come with another quick and dirty patch attached to this mail but
> >>>>> again  I think it is not proper solution, just playing to find (maybe)
> >>>>> 'good enough' workaround.
> >>>>
> >>>> Let's just use uint64_t.
> >>>
> >>> This works. Thanks.
> >>>
> >>> Next issue is this:
> >>> ----
> >>> make[1]: Entering directory '/work/devel/liburing/src'
> >>>      CC setup.ol
> >>>      CC queue.ol
> >>>      CC syscall.ol
> >>> In file included from syscall.c:9:
> >>> include/liburing/compat.h:6:2: error: unknown type name 'int64_t'
> >>>     6 |  int64_t  tv_sec;
> >>>       |  ^~~~~~~
> >>> make[1]: *** [Makefile:43: syscall.ol] Error 1
> >>> make[1]: Leaving directory '/work/devel/liburing/src'
> >>> make: *** [Makefile:12: all] Error 2
> >>> ----
> >>>
> >>> I fixed it with this patch:
> >>> --
> >>> diff --git a/configure b/configure
> >>> index 30b0a5a..4b44177 100755
> >>> --- a/configure
> >>> +++ b/configure
> >>> @@ -301,6 +301,7 @@ EOF
> >>>  fi
> >>>  if test "$__kernel_timespec" != "yes"; then
> >>>  cat >> $compat_h << EOF
> >>> +#include <stdint.h>
> >>>  struct __kernel_timespec {
> >>>   int64_t   tv_sec;
> >>>   long long tv_nsec;
> >>> --
> >>>
> >>> but not sure will that work on glibc.
> >>
> >> That should work fine on glibc. Care to send as an actual
> >> patch, with commit message and signed-off-by? Then I'll add
> >> it to liburing.
> > 
> > patch is attached.
> 
> Great thanks, I added a bit to your commit message. Here it is:
> 
> https://git.kernel.dk/cgit/liburing/commit/?id=8171778c835b6be517c314cf23dd1f5ae061a117

Nice. I'm bad in writing commit messages. Thanks
 
-- 
regards

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Build 0.6 version fail on musl libc
  2020-04-29 20:43                   ` Jens Axboe
  2020-04-29 20:48                     ` Milan P. Stanić
@ 2020-04-30 14:38                     ` Milan P. Stanić
  2020-04-30 14:47                       ` Jens Axboe
  1 sibling, 1 reply; 17+ messages in thread
From: Milan P. Stanić @ 2020-04-30 14:38 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Christoph Hellwig, io-uring

[-- Attachment #1: Type: text/plain, Size: 3793 bytes --]

On Wed, 2020-04-29 at 14:43, Jens Axboe wrote:
> On 4/29/20 2:38 PM, Milan P. Stanić wrote:
> > On Wed, 2020-04-29 at 14:08, Jens Axboe wrote:
> >> On 4/29/20 2:01 PM, Milan P. Stanić wrote:
> >>> On Wed, 2020-04-29 at 13:38, Jens Axboe wrote:
> >>>> On 4/29/20 1:33 PM, Milan P. Stanić wrote:
> >>>>> On Wed, 2020-04-29 at 10:14, Jens Axboe wrote:
> >>>>>> On 4/29/20 9:29 AM, Jens Axboe wrote:
> >>>>>>> On 4/29/20 9:26 AM, Christoph Hellwig wrote:
> >>>>>>>> On Wed, Apr 29, 2020 at 09:24:40AM -0600, Jens Axboe wrote:
> >>>>>>>>>
> >>>>>>>>> Not sure what the best fix is there, for 32-bit, your change will truncate
> >>>>>>>>> the offset to 32-bit as off_t is only 4 bytes there. At least that's the
> >>>>>>>>> case for me, maybe musl is different if it just has a nasty define for
> >>>>>>>>> them.
> >>>>>>>>>
> >>>>>>>>> Maybe best to just make them uint64_t or something like that.
> >>>>>>>>
> >>>>>>>> The proper LFS type would be off64_t.
> >>>>>>>
> >>>>>>> Is it available anywhere? Because I don't have it.
> >>>>>>
> >>>>>> There seems to be better luck with __off64_t, but I don't even know
> >>>>>> how widespread that is... Going to give it a go, we'll see.
> >>>>>
> >>>>> AFAIK, __off64_t is glibc specific, defined in /usr/include/fcntl.h:
> >>>>> ------
> >>>>> # ifndef __USE_FILE_OFFSET64
> >>>>> typedef __off_t off_t;
> >>>>> # else
> >>>>> typedef __off64_t off_t;
> >>>>> # endif
> >>>>> ------
> >>>>>
> >>>>> So, this will not work on musl based Linux system, git commit id
> >>>>> b5096098c62adb19dbf4a39b480909766c9026e7 should be reverted. But you
> >>>>> know better what to do.
> >>>>>
> >>>>> I come with another quick and dirty patch attached to this mail but
> >>>>> again  I think it is not proper solution, just playing to find (maybe)
> >>>>> 'good enough' workaround.
> >>>>
> >>>> Let's just use uint64_t.
> >>>
> >>> This works. Thanks.
> >>>
> >>> Next issue is this:
> >>> ----
> >>> make[1]: Entering directory '/work/devel/liburing/src'
> >>>      CC setup.ol
> >>>      CC queue.ol
> >>>      CC syscall.ol
> >>> In file included from syscall.c:9:
> >>> include/liburing/compat.h:6:2: error: unknown type name 'int64_t'
> >>>     6 |  int64_t  tv_sec;
> >>>       |  ^~~~~~~
> >>> make[1]: *** [Makefile:43: syscall.ol] Error 1
> >>> make[1]: Leaving directory '/work/devel/liburing/src'
> >>> make: *** [Makefile:12: all] Error 2
> >>> ----
> >>>
> >>> I fixed it with this patch:
> >>> --
> >>> diff --git a/configure b/configure
> >>> index 30b0a5a..4b44177 100755
> >>> --- a/configure
> >>> +++ b/configure
> >>> @@ -301,6 +301,7 @@ EOF
> >>>  fi
> >>>  if test "$__kernel_timespec" != "yes"; then
> >>>  cat >> $compat_h << EOF
> >>> +#include <stdint.h>
> >>>  struct __kernel_timespec {
> >>>   int64_t   tv_sec;
> >>>   long long tv_nsec;
> >>> --
> >>>
> >>> but not sure will that work on glibc.
> >>
> >> That should work fine on glibc. Care to send as an actual
> >> patch, with commit message and signed-off-by? Then I'll add
> >> it to liburing.
> > patch is attached.
> Great thanks, I added a bit to your commit message. Here it is:
> https://git.kernel.dk/cgit/liburing/commit/?id=8171778c835b6be517c314cf23dd1f5ae061a117

Yet another issue, build also fails when make enter test subdir saying
../src/include/liburing.h:339:35: error: unknown type name 'mode_t'

I'm attaching build log as liburing-test.log file and patch file
liburing-fix-mode_t.diff  where I added
#include <sys/stat.h> in src/include/liburing.h

After adding this patch 'make' pass build and test, but fails in
examples subdir, but this is not big problem.

Maybe you would consider changes in make to have separate invocation for
make (just build lib), make test and make examples. Will be easier for
distribution maintainers.

Thanks

-- 
regards

[-- Attachment #2: liburing-test.log --]
[-- Type: text/plain, Size: 984 bytes --]

make[1]: Entering directory '/work/devel/liburing/src'
     CC setup.ol
     CC queue.ol
     CC syscall.ol
     CC register.ol
     AR liburing.a
ar: creating liburing.a
 RANLIB liburing.a
     CC setup.os
     CC queue.os
     CC syscall.os
     CC register.os
     CC liburing.so.1.0.6
make[1]: Leaving directory '/work/devel/liburing/src'
make[1]: Entering directory '/work/devel/liburing/test'
     CC poll
In file included from poll.c:12:
/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
    1 | #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
      |  ^~~~~~~
In file included from poll.c:15:
../src/include/liburing.h:339:35: error: unknown type name 'mode_t'
  339 |      const char *path, int flags, mode_t mode)
      |                                   ^~~~~~
make[1]: *** [Makefile:39: poll] Error 1
make[1]: Leaving directory '/work/devel/liburing/test'
make: *** [Makefile:13: all] Error 2

[-- Attachment #3: liburing-fix-mode_t.diff --]
[-- Type: text/x-diff, Size: 1625 bytes --]

From 9315276edc5d241369442e29c94091f4c1c8faa2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Milan=20P=2E=20Stani=C4=87?= <[email protected]>
Date: Thu, 30 Apr 2020 16:23:30 +0200
Subject: [PATCH] fix missing '#include <sys/stat.h>' in
 'src/include/liburing.h
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

make failed on musl libc system when entering test subdir with this:
-----
make[1]: Entering directory '/work/devel/liburing/test'
     CC poll
In file included from poll.c:12:
/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
    1 | #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
      |  ^~~~~~~
In file included from poll.c:15:
../src/include/liburing.h:339:35: error: unknown type name 'mode_t'
  339 |      const char *path, int flags, mode_t mode)
      |                                   ^~~~~~
make[1]: *** [Makefile:39: poll] Error 1
make[1]: Leaving directory '/work/devel/liburing/test'
make: *** [Makefile:13: all] Error 2
-----

adding #include <sys/stat.h> to src/include/liburing.h fixes build

Signed-off-by: Milan P. Stanić <[email protected]>
---
 src/include/liburing.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/include/liburing.h b/src/include/liburing.h
index 56e32d7..dd85f7b 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -8,6 +8,7 @@ extern "C" {
 
 #include <sys/socket.h>
 #include <sys/uio.h>
+#include <sys/stat.h>
 #include <signal.h>
 #include <inttypes.h>
 #include <time.h>
-- 
2.24.3


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: Build 0.6 version fail on musl libc
  2020-04-30 14:38                     ` Milan P. Stanić
@ 2020-04-30 14:47                       ` Jens Axboe
  2020-04-30 15:56                         ` Milan P. Stanić
  0 siblings, 1 reply; 17+ messages in thread
From: Jens Axboe @ 2020-04-30 14:47 UTC (permalink / raw)
  To: Milan P. Stanić; +Cc: Christoph Hellwig, io-uring

On 4/30/20 8:38 AM, Milan P. Stanić wrote:
> On Wed, 2020-04-29 at 14:43, Jens Axboe wrote:
>> On 4/29/20 2:38 PM, Milan P. Stanić wrote:
>>> On Wed, 2020-04-29 at 14:08, Jens Axboe wrote:
>>>> On 4/29/20 2:01 PM, Milan P. Stanić wrote:
>>>>> On Wed, 2020-04-29 at 13:38, Jens Axboe wrote:
>>>>>> On 4/29/20 1:33 PM, Milan P. Stanić wrote:
>>>>>>> On Wed, 2020-04-29 at 10:14, Jens Axboe wrote:
>>>>>>>> On 4/29/20 9:29 AM, Jens Axboe wrote:
>>>>>>>>> On 4/29/20 9:26 AM, Christoph Hellwig wrote:
>>>>>>>>>> On Wed, Apr 29, 2020 at 09:24:40AM -0600, Jens Axboe wrote:
>>>>>>>>>>>
>>>>>>>>>>> Not sure what the best fix is there, for 32-bit, your change will truncate
>>>>>>>>>>> the offset to 32-bit as off_t is only 4 bytes there. At least that's the
>>>>>>>>>>> case for me, maybe musl is different if it just has a nasty define for
>>>>>>>>>>> them.
>>>>>>>>>>>
>>>>>>>>>>> Maybe best to just make them uint64_t or something like that.
>>>>>>>>>>
>>>>>>>>>> The proper LFS type would be off64_t.
>>>>>>>>>
>>>>>>>>> Is it available anywhere? Because I don't have it.
>>>>>>>>
>>>>>>>> There seems to be better luck with __off64_t, but I don't even know
>>>>>>>> how widespread that is... Going to give it a go, we'll see.
>>>>>>>
>>>>>>> AFAIK, __off64_t is glibc specific, defined in /usr/include/fcntl.h:
>>>>>>> ------
>>>>>>> # ifndef __USE_FILE_OFFSET64
>>>>>>> typedef __off_t off_t;
>>>>>>> # else
>>>>>>> typedef __off64_t off_t;
>>>>>>> # endif
>>>>>>> ------
>>>>>>>
>>>>>>> So, this will not work on musl based Linux system, git commit id
>>>>>>> b5096098c62adb19dbf4a39b480909766c9026e7 should be reverted. But you
>>>>>>> know better what to do.
>>>>>>>
>>>>>>> I come with another quick and dirty patch attached to this mail but
>>>>>>> again  I think it is not proper solution, just playing to find (maybe)
>>>>>>> 'good enough' workaround.
>>>>>>
>>>>>> Let's just use uint64_t.
>>>>>
>>>>> This works. Thanks.
>>>>>
>>>>> Next issue is this:
>>>>> ----
>>>>> make[1]: Entering directory '/work/devel/liburing/src'
>>>>>      CC setup.ol
>>>>>      CC queue.ol
>>>>>      CC syscall.ol
>>>>> In file included from syscall.c:9:
>>>>> include/liburing/compat.h:6:2: error: unknown type name 'int64_t'
>>>>>     6 |  int64_t  tv_sec;
>>>>>       |  ^~~~~~~
>>>>> make[1]: *** [Makefile:43: syscall.ol] Error 1
>>>>> make[1]: Leaving directory '/work/devel/liburing/src'
>>>>> make: *** [Makefile:12: all] Error 2
>>>>> ----
>>>>>
>>>>> I fixed it with this patch:
>>>>> --
>>>>> diff --git a/configure b/configure
>>>>> index 30b0a5a..4b44177 100755
>>>>> --- a/configure
>>>>> +++ b/configure
>>>>> @@ -301,6 +301,7 @@ EOF
>>>>>  fi
>>>>>  if test "$__kernel_timespec" != "yes"; then
>>>>>  cat >> $compat_h << EOF
>>>>> +#include <stdint.h>
>>>>>  struct __kernel_timespec {
>>>>>   int64_t   tv_sec;
>>>>>   long long tv_nsec;
>>>>> --
>>>>>
>>>>> but not sure will that work on glibc.
>>>>
>>>> That should work fine on glibc. Care to send as an actual
>>>> patch, with commit message and signed-off-by? Then I'll add
>>>> it to liburing.
>>> patch is attached.
>> Great thanks, I added a bit to your commit message. Here it is:
>> https://git.kernel.dk/cgit/liburing/commit/?id=8171778c835b6be517c314cf23dd1f5ae061a117
> 
> Yet another issue, build also fails when make enter test subdir saying
> ../src/include/liburing.h:339:35: error: unknown type name 'mode_t'
> 
> I'm attaching build log as liburing-test.log file and patch file
> liburing-fix-mode_t.diff  where I added
> #include <sys/stat.h> in src/include/liburing.h
> 
> After adding this patch 'make' pass build and test, but fails in
> examples subdir, but this is not big problem.

Thanks, applied!

> Maybe you would consider changes in make to have separate invocation for
> make (just build lib), make test and make examples. Will be easier for
> distribution maintainers.

Sure, I'd be fine with that, as long as 'all' or default still builds
the whole thing.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Build 0.6 version fail on musl libc
  2020-04-30 14:47                       ` Jens Axboe
@ 2020-04-30 15:56                         ` Milan P. Stanić
  0 siblings, 0 replies; 17+ messages in thread
From: Milan P. Stanić @ 2020-04-30 15:56 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Christoph Hellwig, io-uring

On Thu, 2020-04-30 at 08:47, Jens Axboe wrote:
> On 4/30/20 8:38 AM, Milan P. Stanić wrote:
[...]

> > Maybe you would consider changes in make to have separate invocation for
> > make (just build lib), make test and make examples. Will be easier for
> > distribution maintainers.
> 
> Sure, I'd be fine with that, as long as 'all' or default still builds
> the whole thing.

Nice, and thanks for accepting suggestion.

-- 
regards

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2020-04-30 15:56 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-28 19:29 Build 0.6 version fail on musl libc Milan P. Stanić
2020-04-29 15:24 ` Jens Axboe
2020-04-29 15:26   ` Christoph Hellwig
2020-04-29 15:29     ` Jens Axboe
2020-04-29 16:14       ` Jens Axboe
2020-04-29 19:33         ` Milan P. Stanić
2020-04-29 19:38           ` Jens Axboe
2020-04-29 20:01             ` Milan P. Stanić
2020-04-29 20:08               ` Jens Axboe
2020-04-29 20:38                 ` Milan P. Stanić
2020-04-29 20:43                   ` Jens Axboe
2020-04-29 20:48                     ` Milan P. Stanić
2020-04-30 14:38                     ` Milan P. Stanić
2020-04-30 14:47                       ` Jens Axboe
2020-04-30 15:56                         ` Milan P. Stanić
2020-04-29 19:36         ` Jann Horn
2020-04-29 19:38           ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox