You are not logged in.

#1 2011-11-22 19:15:56

rubenvb
Member
Registered: 2011-01-14
Posts: 104

How to solve a PKGBUILD dependency issue for the MinGW-w64 toolchain?

Hi,

I had the ambitious plan of creating PKGBUILDs to provide a fully functional and full-featured MinGW-w64 toolchain in Arch (starting with the AUR). For those of you not aware of MinGW-w64; it's a project that provides the more complete alternative for MinGW.org: they support a much larger set of the Win32 API and provide 64-bit support. In short: they allow you to use GCC for Windows 32 and 64-bit.

The current list of packages is here: https://aur.archlinux.org/packages.php?SeB=m&K=rubenvb

They work (roughly, for me, I'm working out the problems as people report them), but only if you build and install them manually.

I would like to ask the help of the experts that reside here to resolve the issue that handy tools like yaourt and other AUR utilities cannot build/install these packages automagically, so that people are more easily persuaded to use my packages. The dependencies here are what functionally needs to be set, not per se what the current PKGBUILDs specify, due to numerous experiments and trial and error...)

The build and install order needs to be strictly followed:
1. build+install mingw-w64-headers-base (no makedepends)
2. build+install mingw-w64-binutils (no makedepends)
3. build+install mingw-w64-gcc-base (makedepends and depends: mingw-w64-binutils)
4. build+install mingw-w64-crt (makedepends and depends: mingw-w64-gcc-base and mingw-w64-binutils)
5. build mingw-w64-winpthreads (makedepends: mingw-w64-headers-base, mingw-w64-gcc-base and mingw-w64-binutils, conflicts mingw-w64-headers-base)
6. build mingw-w64-headers (no makedepends, conflicts mingw-w64-headers-base)
7. install mingw-w64-headers (replaces mingw-w64-headers-base)
8. install mingw-w64-winpthreads
9. build+install mingw-w64-gcc (replaces mingw-w64-gcc-base)

I tried to enforce this as much as possible in the PLGBUILDs, but am unsure if everything is as it should be...

The resulting binary packages that non-AUR-users
(once mingw-w64 is in a binary repo) should install:
- mingw-w64-headers
- mingw-w64-crt
- mingw-w64-winpthreads
- mingw-w64-binutils
- mingw-w64-gcc

The issue is that winpthreads overwrites two dummy headers that have to be included in mingw-w64-headers-base, so I provide a mingw-w64-headers package omitting these two files, but unusable without mingw-w64-winpthreads. So winpthreads needs to be built when mingw-w64-headers-base is installed, and mingw-w64-headers cannot be installed before winpthreads is installed, due to these two headers (per architecture) being supplied by winpthreads in a complete form.

I will try to tune the dependencies tonight, but any help or insight into the automation process is highly appreciated!

Thanks,
Ruben

Last edited by rubenvb (2011-11-22 21:28:12)

Offline

#2 2011-11-27 13:26:03

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,849

Re: How to solve a PKGBUILD dependency issue for the MinGW-w64 toolchain?

Interesting problem.

While i don't use any aur helper, i think you can simplify your approach a bit.

Here's how i would do it (changes in red) :

1. build+install mingw-w64-headers-base (no makedepends)
this package DOES NOT include the dummy headers

1a. build + install mingw-w64-headers-extra-dummy (makedepends : mingw-w64-headers-base)
this package will include ONLY the dummy headers

2. build+install mingw-w64-binutils (no makedepends)

3. build+install mingw-w64-gcc-base (makedepends and depends: mingw-w64-binutils)

4. build+install mingw-w64-crt (makedepends and depends: mingw-w64-gcc-base and mingw-w64-binutils)

5. build mingw-w64-winpthreads
makedepends:
mingw-w64-headers-base, mingw-w64-gcc-base and mingw-w64-binutils, mingw-w64-headers-extra-dummy
conflicts with mingw-w64-headers-extra-dummy
provides mingw-w64-headers-extra

6. skipped

7. skipped

8. install mingw-w64-winpthreads

9. build+install mingw-w64-gcc (replaces mingw-w64-gcc-base)
makedepends : mingw-w64-headers-base, mingw-w64-headers-extra


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2011-11-27 17:40:57

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: How to solve a PKGBUILD dependency issue for the MinGW-w64 toolchain?

Can you please enable multilib support, otherwise only win64 binaries can be generated. Also for those (like me) who don't have experience in compiling compilers (hah), can you please provide a binary repo for the packages (for x86_64 system). Thanks in advance.

Offline

#4 2011-12-13 16:05:25

rubenvb
Member
Registered: 2011-01-14
Posts: 104

Re: How to solve a PKGBUILD dependency issue for the MinGW-w64 toolchain?

the.ridikulus.rat wrote:

Can you please enable multilib support, otherwise only win64 binaries can be generated. Also for those (like me) who don't have experience in compiling compilers (hah), can you please provide a binary repo for the packages (for x86_64 system). Thanks in advance.

Multilib support is disabled, but two compilers are built: i686-w64-mingw32-gcc and x86_64-w64-mingw32-gcc. The first produces 32-bit code, the second 64-bit. Mutilib support is to flaky to easily use, and this setup (although a bit larger on disk) allows 3rd party library packages to easily integrate (by installing into prefix /usr/i686-w64-mingw32 and /usr/x86_64-w64-mingw32 depending on which architecture is built). I strongly suggest (read: would like to enforce) that each mingw-w64-* package for 3rd party libraries build for both architectures, so that one package gives full support for both architectures out of the box.

I will look into a binary repository. Can Sourceforge be used for that?

Offline

#5 2011-12-13 17:15:51

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: How to solve a PKGBUILD dependency issue for the MinGW-w64 toolchain?

rubenvb wrote:
the.ridikulus.rat wrote:

Also for those (like me) who don't have experience in compiling compilers (hah), can you please provide a binary repo for the packages (for x86_64 system). Thanks in advance.

I will look into a binary repository. Can Sourceforge be used for that?

Thanks for the info. I don't think sourceforge is good for maintaining a repo. I see many people maintaining custom repos in their dropbox account. I think any hosting service that provides ftp access should be fine (for a repo)

Offline

#6 2011-12-13 21:17:33

rubenvb
Member
Registered: 2011-01-14
Posts: 104

Re: How to solve a PKGBUILD dependency issue for the MinGW-w64 toolchain?

Lone_Wolf wrote:

Interesting problem.

While i don't use any aur helper, i think you can simplify your approach a bit.

Here's how i would do it (changes in red) :

I'm running yaourt on my updated bunch of PKGBUILDS and it seems to work. Brilliant! I'll let you guys know when the packages are final (ie completely working smile ).

Thanks!

Offline

Board footer

Powered by FluxBB