mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] Can you please guide me on how to compile musl-libc in Msys2 ?
@ 2023-11-24 16:29 Unknown
  2023-11-25 11:17 ` Szabolcs Nagy
  0 siblings, 1 reply; 4+ messages in thread
From: Unknown @ 2023-11-24 16:29 UTC (permalink / raw)
  To: musl

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

Hi there!

[-- Attachment #2: Type: text/html, Size: 10 bytes --]

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

* Re: [musl] Can you please guide me on how to compile musl-libc in Msys2 ?
  2023-11-24 16:29 [musl] Can you please guide me on how to compile musl-libc in Msys2 ? Unknown
@ 2023-11-25 11:17 ` Szabolcs Nagy
  2023-11-25 14:51   ` Unknown
  0 siblings, 1 reply; 4+ messages in thread
From: Szabolcs Nagy @ 2023-11-25 11:17 UTC (permalink / raw)
  To: Unknown; +Cc: musl

not sure what you expect, musl uses linux syscalls.

you can take code from musl and compile it for whatever system
if it does not have complex internal dependencies. (e.g. printf,
malloc, math code, etc would work with minimal effort)

or maybe you mean something like https://midipix.org/ ?

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

* Re: [musl] Can you please guide me on how to compile musl-libc in Msys2 ?
  2023-11-25 11:17 ` Szabolcs Nagy
@ 2023-11-25 14:51   ` Unknown
  2023-11-25 20:51     ` Markus Wichmann
  0 siblings, 1 reply; 4+ messages in thread
From: Unknown @ 2023-11-25 14:51 UTC (permalink / raw)
  To: Unknown, musl

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

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 decided
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 these
ones are only available for Linux system.


On Saturday, November 25, 2023, Szabolcs Nagy <nsz@port70.net> wrote:

> not sure what you expect, musl uses linux syscalls.
>
> you can take code from musl and compile it for whatever system
> if it does not have complex internal dependencies. (e.g. printf,
> malloc, math code, etc would work with minimal effort)
>
> or maybe you mean something like https://midipix.org/ ?
>

[-- Attachment #2: Type: text/html, Size: 1241 bytes --]

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

* Re: [musl] Can you please guide me on how to compile musl-libc in Msys2 ?
  2023-11-25 14:51   ` Unknown
@ 2023-11-25 20:51     ` Markus Wichmann
  0 siblings, 0 replies; 4+ messages in thread
From: Markus Wichmann @ 2023-11-25 20:51 UTC (permalink / raw)
  To: musl; +Cc: Unknown

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 decided
> 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 these
> 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

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

end of thread, other threads:[~2023-11-25 20:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-24 16:29 [musl] Can you please guide me on how to compile musl-libc in Msys2 ? Unknown
2023-11-25 11:17 ` Szabolcs Nagy
2023-11-25 14:51   ` Unknown
2023-11-25 20:51     ` Markus Wichmann

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).