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=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29737 invoked from network); 25 Nov 2023 20:51:43 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 25 Nov 2023 20:51:43 -0000 Received: (qmail 21874 invoked by uid 550); 25 Nov 2023 20:51:39 -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 21827 invoked from network); 25 Nov 2023 20:51:38 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1700945486; x=1701550286; i=nullplan@gmx.net; bh=gePHePYpCwxlMGPHpe+tgxLNGGCacHSfoSIUtVi9+7w=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References: In-Reply-To; b=ogGcEPnXLctjub9ko8uUewP8zUd1fiisR1ipa5NfdRd9+UxnUcqQ3QvhS5MAUG7p L2VwmA/Vxcwb83FwclyVaISLnAUI1JKlaAyNR+ejX9H2WbKEtQ8bfLJsNotLK/7se kKECZAgRWVgRMTTcN/2o6hRhB4JzVXfJfuXeAGsq+9P2crQvpIg3iVvOnvts3N/uy 1rGJhmJtWVdGDx/mplT2WHYwSC7XERVxxZ/oVAbH5qkIYv5PL+dw8cNhAAi8gRi4D B0dbVFQwp9aG0Koqmj+WjAGVAlXIjrTKxHVySLk/Zar++tC7UBe2iswUGqKcgGl4P cYYkkMYO+7WSowEc3g== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Date: Sat, 25 Nov 2023 21:51:24 +0100 From: Markus Wichmann To: musl@lists.openwall.com Cc: Unknown Message-ID: References: <20231125111725.GL1427497@port70.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Provags-ID: V03:K1:vRiuS9T+vlYQcai4eYbM/R8VpCIjiqrNO5NwVIB0xUoPOvJUQlM a6Ame1niTNl5AHWbTBf5FTB8q7383sBHcucKMTRsehCRISbOP22dMDr1K2/eQa4XsMapB+V BIbDLtg5aXT10wlpOKDDymAAYdSTNWOoWvZ/ROPcGFy7LF5BRh+tzd6JmNJV2z99plTSqpM XNVIQQZLYwsnDetZvRWiQ== UI-OutboundReport: notjunk:1;M01:P0:jNO+Fhnxujk=;9HXZhejm2F7M0EE93T2RQqu3NWO 8GYsOWK6RL706/zeR68hOmPlNldym45zyhwwxvrlcJipWUQVI/jh3No0zB+6RGjemrypNXfCi uOx73g4J7jAWITjzZMwo0uokw1xDDM/LvTPq6f2QeZE7JqUszPu7qXT/q5cY72zDC+ZMcHH8h fylunOL/7W4fNtORlRV3ifErhrURjjTt6zzgJlJPHPuSjdWwrxrTpf/tZvtzrxwZOUF9zG5vk hB0FXi0lG3dnFSH1/FFbXh6uOYdzlNFafJmlFAVEmEWO14R6jdsKaSDS3psMqob78WDXJ40JR UA2Jp6bckRTSmMzeRyGpuie2cu9dJPCxIgSn7ZwdI+mlS+r6ArSYA9RKoDLM96+NFM+WZLfdq ojeMyXVmKRc2DwwXDG9rh9olHgCCFYh3REmPhiD/No9BI6qdC6jQk+a/UejlVpHZfgsveE5FO iqeV7YVrf6NivVjSBnQLa68KRi2trYsPVBt7T2Muj0sn5LXxXd/c3TZp2gHlVpM2ySzCtxG5N i+EzIZxPjIjslengZ5TG3cW284cq6TAterUgv9s2LgqufDjrj3HNbVCVna2WPh/mRU29N3dRf pK/07z89b96a/X9pHBGk6y9x9oEAkz5FERpdX5a1+zKh7KG2t2hnhBht1YQAWOT6T3hmWzgsf spFGSM3XhGzK2HJ7ndp+1OwDaK5MlfIRg2HGKmqfjs58x1LZI9cyP4teNHT0FMfgq+oVTdSKK NdYYWX4gv9vim1j2B5P6jbb7qBVtR4T4SwQ9sXkD/G4sgdjeA6TNmZR1jbQTmsKubTpHgeRBO M/ZDngpN4Djk6S3iZMzRFT+AaFFHUFngaWM3p8u5bRhMugzBZy/rrXH9uH4YwkHfY/CV+Futx CfMbNX28C+rjUBUgnB6BDLdfvaZqsxOsEDJ2WMxjHOHrWAQ0fM2XsG+xDkKGG6tCKP7ac+eIL fuR4Jw== Content-Transfer-Encoding: quoted-printable Subject: Re: [musl] Can you please guide me on how to compile musl-libc in Msys2 ? Am Sat, Nov 25, 2023 at 06:51:58AM -0800 schrieb Unknown: > Hi, > > I'm trying to compile a source code based on C that i believe it uses > string.h and some other libraries from musl-libc the platform I'm using = to > compile are Windows with Msys2 > > The Msys2 currently doesn't have musl-libc in thier packages so i decide= d > to compile the musl-libc from the source code but trying to compile it > gives me a some errors that i couldn't solve until now. > > I have check the precompiled musl toolchain with mingw integrated but th= ese > ones are only available for Linux system. > Yeah, once more: musl is a Linux libc. It requires Linux 2.6.0 or newer to run. It doesn't work on Windows (except in WSL, of course). Even if you could get it to compile, it won't work, if for no other reason than because it assumes Linux syscalls. E.g. on x86_64, it will try to write to stdout by running the syscall instruction with RAX set to 1, RDI set to 1, RSI set to the data pointer and RDX set to the data length. NT probably also uses the syscall instruction, but the calling convention is going to be totally different. Implementing a POSIX libc on Windows is no mean feat; the Cygwin guys have been at it for decades and work is still ongoing. I'd suggest you try to compile the program you want to compile with the stock libc msys2 comes with, or else have a look at Cygwin if you can live with newlib. If you must run musl, using WSL is going to be your best bet. Ciao, Markus