From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 25138 invoked from network); 6 Dec 2022 14:48:22 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 6 Dec 2022 14:48:22 -0000 Received: (qmail 13914 invoked by uid 550); 6 Dec 2022 14:48:18 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 11904 invoked from network); 6 Dec 2022 10:36:47 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=hxJ1n/7Y/ssXp5im9mThwludKfMiGrgJNlLxBTYMcsI=; b=Sjb8+AKxgj5APLWM1pKSdlIQ3yGNjYgm6AEsrTUy2G84lCzbp8buTz5M4moA4ryUuq TysiRmHQJ941rw7KfJLbZ/IjIEvhtSsG+ob4CMG9IftdrSkuVddwheT4PFLntg64rLbz ++YU/BtKShtDuEOrKNmDEZ8svJfXKdU9wKGjj/P1PTMwaQhhqhlr3KtQ0dVdmFwXp45j DWIrMUtvcGogURd3VMca6cGFlm2WOZD15pYvOsluTTbWe6kwthe0csgfRm2xFbrdmUOB WftOgFCxSnmAl/6Fwc95jXy0jrheQkeeTccNwgIKEJRtdvPdBcukNH1juoSnlUtww34J 7+IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=hxJ1n/7Y/ssXp5im9mThwludKfMiGrgJNlLxBTYMcsI=; b=R/gN99kV/X7a9SGFEJYuNWjEjjdP6z/ag0achoFXCmlVlxL14pSU87PVUQMI8g6nLF 4M1/P+ec9nmrrQC4qitNF+Z82VVMamLOgrDVSv+MMUDj3CWStL581ApQs2vkWMJO483m 3s+x9l3pcKuIlc8CscHazVizR/lH4EiqwF3A3wOu0OXXTNMWDZfftTId12divs+6Kj4i HQh1syBsRJjbCP02sKcuOObp4Q7FqgNJxS1Gw1zJCR7AstGcKticyFub8xpZsBY7RkVz JlWG4ByoJ0zMCc42Vm+7OzIIZUX5/KWqwggya/xgBXfeu0T3z7+Puz8INY30ZqMaVKky DwHg== X-Gm-Message-State: ANoB5pn5kuEx4NabQLmezQmPcVrUlfjAdenaSehcG88VQnRbFhFvvuQn kyDxeMkGYj4bCEtkV2utiaJgRhCxVn5AkTqGPV1xA1w6bw7UnA== X-Google-Smtp-Source: AA0mqf4K2OhI13tjrSsXahYr+/Goj/CAdCG8irkK0k+3ovkVPghBG3N1e2iEkxjExueHPpbsCrbdyZM7zsmwZ6ar9HQ= X-Received: by 2002:a05:620a:4884:b0:6fb:c38e:27bf with SMTP id ea4-20020a05620a488400b006fbc38e27bfmr76122534qkb.351.1670322995219; Tue, 06 Dec 2022 02:36:35 -0800 (PST) MIME-Version: 1.0 From: Yuriy Chernyshov Date: Tue, 6 Dec 2022 11:36:24 +0100 Message-ID: To: musl@lists.openwall.com Content-Type: multipart/alternative; boundary="000000000000ca53ec05ef26605a" Subject: [musl] Various conflicts with linux system headers (ioctl.h) --000000000000ca53ec05ef26605a Content-Type: text/plain; charset="UTF-8" Hello, I am trying to build DBMS software (ydb from https://github.com/ydb-platform/ydb) with musl-libc. So far, I have run into certain problems. As YDB uses ioctl.h, it has to include both ioctl.h and certain headers from linux/ itself. This gives me a bunch of conflicts around _IOC macros family being defined by both: The error looks as follows: contrib/libs/musl/arch/generic/bits/ioctl.h:7:9: error: '_IOW' macro > redefined [-Werror,-Wmacro-redefined] > #define _IOW(a,b,c) _IOC(_IOC_WRITE,(a),(b),sizeof(c)) > ^ > contrib/libs/linux-headers/asm-generic/ioctl.h:90:9: note: previous > definition is here > #define _IOW(type,nr,size) > _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) > The following workaround helps, but looks quite ugly: --- arch/generic/bits/ioctl.h (b4624b83eafbdd5f2e2c37374d62426c27687f35) > +++ arch/generic/bits/ioctl.h (d545cbc1ae3f5c9132eb26b176bef3638c9d8063) > @@ -1,3 +1,9 @@ > +#undef _IO > +#undef _IOC > +#undef _IOR > +#undef _IOW > +#undef _IOWR > + > #define _IOC(a,b,c,d) ( ((a)<<30) | ((b)<<8) | (c) | ((d)<<16) ) > #define _IOC_NONE 0U > #define _IOC_WRITE 1U > Is it possible to get official solution for the macro conflict? NB: we have to use linux/fs.h in order to get BLKGETSIZE64 constant defined which is missing in sys/ioctl.h. Another conflict is in NGROUPS_MAX value: musl sets it to 32, while Linux itself (starting from 2.6.4, which is below the minimal version recommended by musl) sets it to 65536. It would be nice to have this value increased in musl itself. Regards, Yuriy. --000000000000ca53ec05ef26605a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

I am trying to build = DBMS software (ydb from htt= ps://github.com/ydb-platform/ydb) with musl-libc.
So far, I h= ave run into certain problems.

As YDB uses ioctl.h= , it has to include both ioctl.h and certain headers from linux/ itself. Th= is gives me a bunch of conflicts around _IOC macros family being defined by= both:

The error looks as follows:

<= /div>
contrib/libs/mu= sl/arch/generic/bits/ioctl.h:7:9: error: '_IOW' macro redefined [-W= error,-Wmacro-redefined]
#define _IOW(a,b,c) _IOC(_IOC_WRITE,(a),(b),siz= eof(c))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ^
contrib/libs/linux-h= eaders/asm-generic/ioctl.h:90:9: note: previous definition is here
#defi= ne _IOW(type,nr,size) =C2=A0 =C2=A0 =C2=A0_IOC(_IOC_WRITE,(type),(nr),(_IOC= _TYPECHECK(size)))

The following = workaround helps, but looks quite ugly:

--- arch/generic/bits/ioctl.h (b462= 4b83eafbdd5f2e2c37374d62426c27687f35)
+++ arch/generic/bits/ioctl.h (d54= 5cbc1ae3f5c9132eb26b176bef3638c9d8063)
@@ -1,3 +1,9 @@
+#undef _IO+#undef _IOC
+#undef _IOR
+#undef _IOW
+#undef _IOWR
+
=C2= =A0#define _IOC(a,b,c,d) ( ((a)<<30) | ((b)<<8) | (c) | ((d)<= ;<16) )
=C2=A0#define _IOC_NONE =C2=A00U
=C2=A0#define _IOC_WRITE = 1U

Is it possible to get official solut= ion for the macro conflict?

NB: we have to use lin= ux/fs.h in order to get BLKGETSIZE64 constant defined which is missing in s= ys/ioctl.h.

Another conflict is in NGRO= UPS_MAX value: musl sets it to 32, while Linux itself (starting from 2.6.4,= which is below the minimal version recommended by musl) sets it to 65536.<= /div>

It would be nice to have this value increased in m= usl itself.


Regards,
Yuri= y.

=C2=A0
--000000000000ca53ec05ef26605a--