Discuss: Base packages for Win32 / Win64 / OS X cross-compilation

Farkas Levente lfarkas at lfarkas.org
Thu Feb 12 12:58:38 UTC 2009


Richard W.M. Jones wrote:
> A good question.
> 
> There are several things which restrict us here: (1) mingw32-* is the
> naming scheme for 32 bit Windows cross-compiler packages, as approved
> by various Fedora bodies.  That approval took months of wrangling to
> achieve.  (2) The (moderate) difficulty of renaming existing source
> packages.
> 
> The naming scheme I suggested would be something like:
> 
>          mingw32-zlib.src.rpm
>           |        |        |
>           |    generating   |
>           |        |        |
>           V        V        V
> mingw32-zlib  mingw64-zlib darwinx-zlib
> 
> An ideal naming scheme (if we could start over) might be something
> like:
> 
>           cross-zlib.src.rpm
>           |        |        |
>           |    generating   |
>           |        |        |
>           V        V        V
>   zlib-win32  zlib-win64  zlib-darwin

i think about it a lot last night:-(.
let's just see the above example. how can we do this?
cross-zlib.spec can contain 3 subpackage as zlib-win32, zlib-win64 and
zlib-darwin, but how can we build it? one %build section probably not
enough since we need make clean; make; 3 times so the first 2 result
lost in %install section. solution can be command line defines to
rpmbuild like rpmforge do it, but i don't know how can be done it in koji?
on the other hand create 3x3 spec file for each packages
(f10,devel,epel-5 and later it'll also add f11 and epel-6) x (mingw32,
mingw64, darwin) 9-15 packages which are almost the same. so under all
circumstances i _strongly_ prefer 1 spec file for one package eg.
cross-zlib.spec.
so how can we build 9-15 packages from 1 spec file?
imho the ideal solution would be to change rpm and add
- mingw32.rpm
- mingw64.rpm
- darwin.rpm
and these rpm should have to be also arch independent rpms. if we can
have build host for these we can simple build on different virtual host
as we currently do with src.rpm -> i386, x86_64, ppc etc.

or we can use our own build server which check out the main spec file
generate platform specific spec files if there is changes then checkin
to fedora cvs, tag it and build them in koji. but this need a separate
build system (may be only a few lines of scripts and can be added to
fedora infrastructure).

anyway we need to write a few macros for supporting it.

anyway about the naming i'd prefer:
cross-zlib.spec
cross-zlib.src.rpm
cross-zlib-x.y-z.mingw32.rpm or cross-zlib-mingw32-x.y-z.noarch.rpm
cross-zlib-x.y-z.mingw64.rpm or cross-zlib-mingw64-x.y-z.noarch.rpm
cross-zlib-x.y-z.darwin.rpm or cross-zlib-darwin-x.y-z.noarch.rpm
i use mingw32 instead of just to give credits for the mingw folks.
i don't know the right name for darwin darwinx or osx?

at the same time i'd name cross-headers on all platform (ie. rename
mingw32-w32api to headers to use the same naming convention).

there packages can require only their own platform, but we can make a
cross-zlib-x.y-z.noarch.rpm too which is just a metapackage to require
all 3 platforms cross-zlib packages so if someone like to create a full
cross environment eg: yum install cross-openssl.

cross-filesystem can be merge to one common
cross-filesystem-x.y-z.noarch.rpm since i don't see the reason why we
need 3-5 such packages and anyway it'd be useful to be able to install
all cross environment on the same machine. that's why i'd rename it to
cross-base like kdebase, openoffice.org-base, gstreamer-plugins-base.

another good question is the filesystem layout which probably should
have to change.

it's be useful to start write draft for
- CrossCompiler 'Fedora generalized cross compilers'
- PackagingDrafts/CrossCompiler
many things can be copied from mingw32.

-- 
  Levente                               "Si vis pacem para bellum!"



More information about the mingw mailing list