* [gentoo-dev] mingw-w64 crossdev prefix? @ 2017-05-17 22:25 Marty Plummer 2017-05-18 3:46 ` Alon Bar-Lev 2017-05-18 3:46 ` Matthias Maier 0 siblings, 2 replies; 9+ messages in thread From: Marty Plummer @ 2017-05-17 22:25 UTC (permalink / raw To: gentoo-dev Greetings, So, I'm a relatively new gentoo user (as of 2016-12) coming from arch, and one thing I've noticed is the relative difficulty of setting up a mingw-w64 cross-compile toolchain and libraries. I'm considering the idea of setting up a sort of prefix specifically with the intent of being used on a 'normal' gentoo system with the sole purpose of creating 'normal' windows binaries; does anyone have suggestions/objections about the idea? As it currently stands I have to use an archlinux chroot to do my cross-compiling, and I'd really enjoy to be able to do this sort of thing without depending on an auxiliary distro. Marty. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] mingw-w64 crossdev prefix? 2017-05-17 22:25 [gentoo-dev] mingw-w64 crossdev prefix? Marty Plummer @ 2017-05-18 3:46 ` Alon Bar-Lev 2017-05-18 4:08 ` Marty Plummer 2017-05-18 3:46 ` Matthias Maier 1 sibling, 1 reply; 9+ messages in thread From: Alon Bar-Lev @ 2017-05-18 3:46 UTC (permalink / raw To: gentoo-dev Hi, You can emerge crossdev and then run crossdev -t x86_64-w64-mingw32 or crossdev -t i686-w64-mingw32 Alon On 18 May 2017 at 01:25, Marty Plummer <netz.kernel@gmail.com> wrote: > > Greetings, > > So, I'm a relatively new gentoo user (as of 2016-12) coming from arch, > and one thing I've noticed is the relative difficulty of setting up a > mingw-w64 cross-compile toolchain and libraries. > > I'm considering the idea of setting up a sort of prefix specifically > with the intent of being used on a 'normal' gentoo system with the sole > purpose of creating 'normal' windows binaries; does anyone have > suggestions/objections about the idea? > > As it currently stands I have to use an archlinux chroot to do my > cross-compiling, and I'd really enjoy to be able to do this sort of > thing without depending on an auxiliary distro. > > Marty. > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] mingw-w64 crossdev prefix? 2017-05-18 3:46 ` Alon Bar-Lev @ 2017-05-18 4:08 ` Marty Plummer 2017-05-18 4:42 ` Ian Stakenvicius 0 siblings, 1 reply; 9+ messages in thread From: Marty Plummer @ 2017-05-18 4:08 UTC (permalink / raw To: gentoo-dev; +Cc: alonbl On Thu, May 18, 2017 at 06:46:24AM +0300, Alon Bar-Lev wrote: > Hi, > You can emerge crossdev and then run crossdev -t x86_64-w64-mingw32 or > crossdev -t i686-w64-mingw32 > Alon > I'm aware of that, using it. Its simply the fact that its fairly broken for mingw-w64, and requires quite a lot of hackage to get going. What I'm suggesting is the creation of a profile that should handle this sort of thing for you semi-automatically. Something like the prefix/windows, but meant more for toolchains. it seems that beber's portage tree at git.meleeweb.net/gentoo/portage.git already has a setup similar to what I envision already. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] mingw-w64 crossdev prefix? 2017-05-18 4:08 ` Marty Plummer @ 2017-05-18 4:42 ` Ian Stakenvicius 2017-05-18 4:52 ` Marty Plummer 2017-05-19 4:46 ` Marty Plummer 0 siblings, 2 replies; 9+ messages in thread From: Ian Stakenvicius @ 2017-05-18 4:42 UTC (permalink / raw To: gentoo-dev [-- Attachment #1.1: Type: text/plain, Size: 1392 bytes --] On 18/05/17 12:08 AM, Marty Plummer wrote: > On Thu, May 18, 2017 at 06:46:24AM +0300, Alon Bar-Lev wrote: >> Hi, >> You can emerge crossdev and then run crossdev -t x86_64-w64-mingw32 or >> crossdev -t i686-w64-mingw32 >> Alon >> > I'm aware of that, using it. Its simply the fact that its fairly broken > for mingw-w64, and requires quite a lot of hackage to get going. > > What I'm suggesting is the creation of a profile that should handle this > sort of thing for you semi-automatically. Something like the > prefix/windows, but meant more for toolchains. it seems that beber's > portage tree at git.meleeweb.net/gentoo/portage.git already has a setup > similar to what I envision already. > There isn't a whole lot that's broken about it actually -- the main issue is that the default 'embedded' profile doesn't allow all of the variable overrides in it that are necessary for the crossdev to work properly. See bug http://bugs.gentoo.org/487310 The crossdev that's created will provide all the necessary profile overrides to allow you to emerge the things you want, and of course compile your own things as well. There's no need for a special prefix (or 'prefix/*' profile) in order to support this, IMO, once the embedded profile permits the overrides necessary to the ARCH, ELIBC, and KERNEL variables that the crossdev tool already sets. [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 248 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] mingw-w64 crossdev prefix? 2017-05-18 4:42 ` Ian Stakenvicius @ 2017-05-18 4:52 ` Marty Plummer 2017-05-19 4:46 ` Marty Plummer 1 sibling, 0 replies; 9+ messages in thread From: Marty Plummer @ 2017-05-18 4:52 UTC (permalink / raw To: gentoo-dev On Thu, May 18, 2017 at 12:42:09AM -0400, Ian Stakenvicius wrote: > On 18/05/17 12:08 AM, Marty Plummer wrote: > > On Thu, May 18, 2017 at 06:46:24AM +0300, Alon Bar-Lev wrote: > >> Hi, > >> You can emerge crossdev and then run crossdev -t x86_64-w64-mingw32 or > >> crossdev -t i686-w64-mingw32 > >> Alon > >> > > I'm aware of that, using it. Its simply the fact that its fairly broken > > for mingw-w64, and requires quite a lot of hackage to get going. > > > > What I'm suggesting is the creation of a profile that should handle this > > sort of thing for you semi-automatically. Something like the > > prefix/windows, but meant more for toolchains. it seems that beber's > > portage tree at git.meleeweb.net/gentoo/portage.git already has a setup > > similar to what I envision already. > > > > There isn't a whole lot that's broken about it actually -- the main > issue is that the default 'embedded' profile doesn't allow all of the > variable overrides in it that are necessary for the crossdev to work > properly. See bug http://bugs.gentoo.org/487310 > > The crossdev that's created will provide all the necessary profile > overrides to allow you to emerge the things you want, and of course > compile your own things as well. There's no need for a special prefix > (or 'prefix/*' profile) in order to support this, IMO, once the > embedded profile permits the overrides necessary to the ARCH, ELIBC, > and KERNEL variables that the crossdev tool already sets. > There's also a host of packages that are pulled in by default which are simply uneeded for this sort of setup, such as coreutils, sed, file, debianutils which have to be manually package.provided away by end users. I'm simply suggesting we should make this a bit more easy for everyone involved, as it could ease use and possibly cut down on spurious bug reports if there was a standardized way of doing things. This is a common enough use case that it should be handled upstream imho. I'm more than willing to help in this matter, but I don't want to be spitting into the wind if nothing will actually come of it. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] mingw-w64 crossdev prefix? 2017-05-18 4:42 ` Ian Stakenvicius 2017-05-18 4:52 ` Marty Plummer @ 2017-05-19 4:46 ` Marty Plummer 1 sibling, 0 replies; 9+ messages in thread From: Marty Plummer @ 2017-05-19 4:46 UTC (permalink / raw To: gentoo-dev On Thu, May 18, 2017 at 12:42:09AM -0400, Ian Stakenvicius wrote: > On 18/05/17 12:08 AM, Marty Plummer wrote: > > On Thu, May 18, 2017 at 06:46:24AM +0300, Alon Bar-Lev wrote: > >> Hi, > >> You can emerge crossdev and then run crossdev -t x86_64-w64-mingw32 or > >> crossdev -t i686-w64-mingw32 > >> Alon > >> > > I'm aware of that, using it. Its simply the fact that its fairly broken > > for mingw-w64, and requires quite a lot of hackage to get going. > > > > What I'm suggesting is the creation of a profile that should handle this > > sort of thing for you semi-automatically. Something like the > > prefix/windows, but meant more for toolchains. it seems that beber's > > portage tree at git.meleeweb.net/gentoo/portage.git already has a setup > > similar to what I envision already. > > > > There isn't a whole lot that's broken about it actually -- the main > issue is that the default 'embedded' profile doesn't allow all of the > variable overrides in it that are necessary for the crossdev to work > properly. See bug http://bugs.gentoo.org/487310 > > The crossdev that's created will provide all the necessary profile > overrides to allow you to emerge the things you want, and of course > compile your own things as well. There's no need for a special prefix > (or 'prefix/*' profile) in order to support this, IMO, once the > embedded profile permits the overrides necessary to the ARCH, ELIBC, > and KERNEL variables that the crossdev tool already sets. > > So why do we not just fix the embedded profile? crossdev sets it automatically, and then sets those variables, but the profile itself won't let that work? seems like a bad idea to have an official tool use an official profile which officially is not allowed to work like that. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] mingw-w64 crossdev prefix? 2017-05-17 22:25 [gentoo-dev] mingw-w64 crossdev prefix? Marty Plummer 2017-05-18 3:46 ` Alon Bar-Lev @ 2017-05-18 3:46 ` Matthias Maier 2017-05-18 3:53 ` Alon Bar-Lev 1 sibling, 1 reply; 9+ messages in thread From: Matthias Maier @ 2017-05-18 3:46 UTC (permalink / raw To: gentoo-dev [-- Attachment #1: Type: text/plain, Size: 1957 bytes --] Hi there, On Wed, May 17, 2017, at 17:25 CDT, Marty Plummer <netz.kernel@gmail.com> wrote: > Greetings, > > So, I'm a relatively new gentoo user (as of 2016-12) coming from arch, > and one thing I've noticed is the relative difficulty of setting up a > mingw-w64 cross-compile toolchain and libraries. > > I'm considering the idea of setting up a sort of prefix specifically > with the intent of being used on a 'normal' gentoo system with the sole > purpose of creating 'normal' windows binaries; does anyone have > suggestions/objections about the idea? > > As it currently stands I have to use an archlinux chroot to do my > cross-compiling, and I'd really enjoy to be able to do this sort of > thing without depending on an auxiliary distro. You can find some information on the wiki [1] (warning: I might be a bit outdated). But anyway, just check it for you (I haven't set up a cross compilation toolchain for windows for the last ~7 years): From a plain amd64 stage-3 setting up a mingw-264 environment via: # emerge crossdev # crossdev [...] -t x86_64-w64-mingw32 still works with a minor complication [2]. Please verify that this works and open a bug report for the libsanitizer issue mentioning the workaround [2,3]. After that you end up with a cross-compiler toolchain x86_64-w64-mingw32-* and necessary runtime somewhere in /usr/x86_64-w64-mingw32. You can also use $ x86_64-w64-mingw32-emerge to cross compile libraries/packages for mingw. Keep in mind that a cross compilation toolchain is a bit of a rocky journey. You might have to pin certain versions of libraries/programs, and or manually patch some stuff. Best, Matthias [1] https://wiki.gentoo.org/wiki/Mingw [2] I had to manually disable libsanitizer for gcc-6.3.0. Just set EXTRA_ECONF="--disable-libsanitizer" via env/package.env for the cross-x86_64-w64-mingw32/gcc package. [3] https://bugs.gentoo.org/buglist.cgi?quicksearch=mingw&list_id=3536150 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 850 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] mingw-w64 crossdev prefix? 2017-05-18 3:46 ` Matthias Maier @ 2017-05-18 3:53 ` Alon Bar-Lev 2017-05-18 4:25 ` Matthias Maier 0 siblings, 1 reply; 9+ messages in thread From: Alon Bar-Lev @ 2017-05-18 3:53 UTC (permalink / raw To: gentoo-dev On 18 May 2017 at 06:46, Matthias Maier <tamiko@gentoo.org> wrote: > [2] I had to manually disable libsanitizer for gcc-6.3.0. Just set > EXTRA_ECONF="--disable-libsanitizer" via env/package.env for the > cross-x86_64-w64-mingw32/gcc package. Hi, You should use the USE flags and not apply such workarounds, for example: USE="-sanitizer" crossdev ... Alon ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] mingw-w64 crossdev prefix? 2017-05-18 3:53 ` Alon Bar-Lev @ 2017-05-18 4:25 ` Matthias Maier 0 siblings, 0 replies; 9+ messages in thread From: Matthias Maier @ 2017-05-18 4:25 UTC (permalink / raw To: gentoo-dev On Wed, May 17, 2017, at 22:53 CDT, Alon Bar-Lev <alonbl@gentoo.org> wrote: > On 18 May 2017 at 06:46, Matthias Maier <tamiko@gentoo.org> wrote: >> [2] I had to manually disable libsanitizer for gcc-6.3.0. Just set >> EXTRA_ECONF="--disable-libsanitizer" via env/package.env for the >> cross-x86_64-w64-mingw32/gcc package. > > Hi, > You should use the USE flags and not apply such workarounds, for example: > USE="-sanitizer" crossdev ... Yes, correct. It should read USE="-sanitize" though. Best, Matthias ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-05-19 4:43 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-05-17 22:25 [gentoo-dev] mingw-w64 crossdev prefix? Marty Plummer 2017-05-18 3:46 ` Alon Bar-Lev 2017-05-18 4:08 ` Marty Plummer 2017-05-18 4:42 ` Ian Stakenvicius 2017-05-18 4:52 ` Marty Plummer 2017-05-19 4:46 ` Marty Plummer 2017-05-18 3:46 ` Matthias Maier 2017-05-18 3:53 ` Alon Bar-Lev 2017-05-18 4:25 ` Matthias Maier
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox