Building freebsd on another OS

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Building freebsd on another OS

Jonathan Moore-3
Hi,

Is it possible to build freebsd on Windows  All I could find is this.:

https://forums.freebsd.org/threads/building-the-freebsd-kernel-on-another-os.32275/

Thanks,

Jonathan Moore
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Building freebsd on another OS

Hans Petter Selasky-6
On 3/16/19 1:44 AM, Jonathan Moore wrote:
> Hi,
>
> Is it possible to build freebsd on Windows  All I could find is this.:
>
> https://forums.freebsd.org/threads/building-the-freebsd-kernel-on-another-os.32275/
>

See the freebsd-build utils package for Linux.

--HPS

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Building freebsd on another OS

Eric Joyner-3
On Sun, Mar 17, 2019 at 6:35 AM Hans Petter Selasky <[hidden email]> wrote:

>
> See the freebsd-build utils package for Linux.
>
> --HPS
>
>
Is there anything for Windows?

- Eric
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Building freebsd on another OS

Damjan Jovanovic
On Tue, Mar 19, 2019 at 2:04 AM Eric Joyner <[hidden email]> wrote:

> On Sun, Mar 17, 2019 at 6:35 AM Hans Petter Selasky <[hidden email]>
> wrote:
>
> >
> > See the freebsd-build utils package for Linux.
> >
> > --HPS
> >
> >
> Is there anything for Windows?
>
>
>
FreeBSD uses ELF binaries.
Microsoft's compilers only generate PE binaries.
Cygwin also generates PE binaries, optionally linked to its libraries.
Mingw and mingw-w64, same story.

You need some sort of cross-compiler that generates ELF binaries.
That new "Windows Subsystem for Linux" (WSL) found on Windows 10 might be a
good starting point, as it uses ELF binaries natively, and its C compiler
(GCC?) presumably generates ELF.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Building freebsd on another OS

David Chisnall-2
In reply to this post by Eric Joyner-3
On 19/03/2019 00:01, Eric Joyner wrote:
> On Sun, Mar 17, 2019 at 6:35 AM Hans Petter Selasky<[hidden email]>  wrote:
>
>> See the freebsd-build utils package for Linux.
>>
>> --HPS
>>
>>
> Is there anything for Windows?

Your best bet on Windows is to use the Windows Subsystem for Linux
(WSL).  This lets you install a Linux distro's userland on top of the NT
kernel.  If you install vcxsrv (available in chocolatey) then you can
also run graphical applications.

That said, FreeBSD also runs very well under Hyper-V, so if you have
enough RAM then you may find that a better option.  In my experience,
compilers that spawn a new process for every file (e.g. gcc, clang) are
noticeably faster in a FreeBSD VM on Windows than in WSL or native in
Windows (and a *lot* faster than their cygwin versions).

David
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Building freebsd on another OS

Eric Joyner-3
On Tue, Mar 19, 2019 at 5:40 AM David Chisnall <[hidden email]> wrote:

> That said, FreeBSD also runs very well under Hyper-V, so if you have
> enough RAM then you may find that a better option.  In my experience,
> compilers that spawn a new process for every file (e.g. gcc, clang) are
> noticeably faster in a FreeBSD VM on Windows than in WSL or native in
> Windows (and a *lot* faster than their cygwin versions).
>
> David
>

Thanks David, running FreeBSD VM using Hyper-V wasn't something I had
considered before; I thought
my options would've been limited to using WSL or Cygwin/msys2 to get it to
compile on Windows.

I'll go see if I'm allowed to use Hyper-V on my company-issued laptop...

- Eric
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"