public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Generating Linux Compatible binaries
@ 2021-12-03 16:50 Goswami-EXT, Himanshu
  2021-12-03 17:02 ` Eliot Moss
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Goswami-EXT, Himanshu @ 2021-12-03 16:50 UTC (permalink / raw)
  To: cygwin

Hi,

I want to generate the Linux compatible binaries on Windows System.
Cygwin is a cross compiler which offers POSIX environment.
But I could not find any Unix libraries to generate the Linux compatible binaries.
Could you please advice any steps that I can follow?

Thanks in Advance.
Himanshu

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

* Re: Generating Linux Compatible binaries
  2021-12-03 16:50 Generating Linux Compatible binaries Goswami-EXT, Himanshu
@ 2021-12-03 17:02 ` Eliot Moss
  2021-12-03 19:34 ` Michael Enright
  2021-12-03 20:56 ` Achim Gratz
  2 siblings, 0 replies; 5+ messages in thread
From: Eliot Moss @ 2021-12-03 17:02 UTC (permalink / raw)
  To: Goswami-EXT, Himanshu, cygwin

On 12/3/2021 11:50 AM, Goswami-EXT, Himanshu wrote:
 > Hi,
 >
 > I want to generate the Linux compatible binaries on Windows System.
 > Cygwin is a cross compiler which offers POSIX environment.
 > But I could not find any Unix libraries to generate the Linux compatible binaries.
 > Could you please advice any steps that I can follow?
 >
 > Thanks in Advance.
 > Himanshu

Cygwin doesn't work that way.  It uses a custom built library that translates
POSIX system calls to similar Windows systems calls.  There are a few places,
such as file permissions, where differences will peek through.  Anyway, since
it does not run Linux compatiable libraries, it is not designed to build them.

The only solution I can recommend is to use a virtual machine, such as the Windows
Subsystem for Linux (WSL), Oracle Virtual Box, or VMWare.

Eliot Moss

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

* Re: Generating Linux Compatible binaries
  2021-12-03 16:50 Generating Linux Compatible binaries Goswami-EXT, Himanshu
  2021-12-03 17:02 ` Eliot Moss
@ 2021-12-03 19:34 ` Michael Enright
  2021-12-03 20:56 ` Achim Gratz
  2 siblings, 0 replies; 5+ messages in thread
From: Michael Enright @ 2021-12-03 19:34 UTC (permalink / raw)
  To: Goswami-EXT, Himanshu; +Cc: cygwin

On Fri, Dec 3, 2021 at 8:51 AM Goswami-EXT, Himanshu
<himanshu.goswami-EXT@continental-corporation.com> wrote:
>
> Hi,
>
> I want to generate the Linux compatible binaries on Windows System.
> Cygwin is a cross compiler which offers POSIX environment.
> But I could not find any Unix libraries to generate the Linux compatible binaries.
> Could you please advice any steps that I can follow?
>

Eliot Moss recommends a VM and that's a good option.

Another option is to use Cygwin to host a cross compiler. I  have used
Cygwin to build and install cross compilers that ran on Cygwin and
built code for my Raspberry Pi 2. There are many tutorials on building
and creating cross compilers and I won't try to equal them. But this
is a versatile method. If the target Linux was one that runs on a
different processor and a virtual machine would be inefficient or lack
the resources to carry out the build, then running a cross compiler on
your Windows machine, under Cygwin or otherwise, might be an option to
consider.

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

* Re: Generating Linux Compatible binaries
  2021-12-03 16:50 Generating Linux Compatible binaries Goswami-EXT, Himanshu
  2021-12-03 17:02 ` Eliot Moss
  2021-12-03 19:34 ` Michael Enright
@ 2021-12-03 20:56 ` Achim Gratz
  2021-12-03 21:25   ` Eliot Moss
  2 siblings, 1 reply; 5+ messages in thread
From: Achim Gratz @ 2021-12-03 20:56 UTC (permalink / raw)
  To: cygwin

Goswami-EXT, Himanshu writes:
> I want to generate the Linux compatible binaries on Windows System.

If you are on a recent Windows version your easiest option is probably
to use WSL and use native compilation on Linux.  second easiest is
likely to set up a VM to run Linux in (that might actually be easier
than WSL if you already have some virtualisation environment set up for
something else, but you said you were on Windows).

> Cygwin is a cross compiler which offers POSIX environment.

No, Cygwin is a user-space layer on top of Windows that provides a POSIX
environment for applications that target Cygwin (i.e. Cygwin
applications are neither Windows nor Linux applications).

> But I could not find any Unix libraries to generate the Linux compatible binaries.
> Could you please advice any steps that I can follow?

Just like you'd do on any other non-Linux system: set up a
cross-compilation toolchain and start compiling all dependencies until
you can finally compile whatever Linux application you wanted orginally.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs

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

* Re: Generating Linux Compatible binaries
  2021-12-03 20:56 ` Achim Gratz
@ 2021-12-03 21:25   ` Eliot Moss
  0 siblings, 0 replies; 5+ messages in thread
From: Eliot Moss @ 2021-12-03 21:25 UTC (permalink / raw)
  To: Achim Gratz, cygwin

On 12/3/2021 3:56 PM, Achim Gratz wrote:
> Goswami-EXT, Himanshu writes:
>> I want to generate the Linux compatible binaries on Windows System.
> 
> If you are on a recent Windows version your easiest option is probably
> to use WSL and use native compilation on Linux.  second easiest is
> likely to set up a VM to run Linux in (that might actually be easier
> than WSL if you already have some virtualisation environment set up for
> something else, but you said you were on Windows).
> 
>> Cygwin is a cross compiler which offers POSIX environment.
> 
> No, Cygwin is a user-space layer on top of Windows that provides a POSIX
> environment for applications that target Cygwin (i.e. Cygwin
> applications are neither Windows nor Linux applications).
> 
>> But I could not find any Unix libraries to generate the Linux compatible binaries.
>> Could you please advice any steps that I can follow?
> 
> Just like you'd do on any other non-Linux system: set up a
> cross-compilation toolchain and start compiling all dependencies until
> you can finally compile whatever Linux application you wanted orginally.

Following up my previous post and the two others I have seen ...

Cross-compilation is a definite possibility.  However, you can't test
the result directly under Windows or Cygwin.  If you want to test, then
AFAIK a VM (or maybe qemu?) is your only option.

Best wishes - Eliot Moss

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

end of thread, other threads:[~2021-12-03 21:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-03 16:50 Generating Linux Compatible binaries Goswami-EXT, Himanshu
2021-12-03 17:02 ` Eliot Moss
2021-12-03 19:34 ` Michael Enright
2021-12-03 20:56 ` Achim Gratz
2021-12-03 21:25   ` Eliot Moss

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 read-only IMAP folder(s) and NNTP newsgroup(s).