Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 507392 - sys-apps/sed-4.2.2: cross-compiling for mingw32 fails
Summary: sys-apps/sed-4.2.2: cross-compiling for mingw32 fails
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
Depends on:
Reported: 2014-04-11 09:45 UTC by Jérôme Borme
Modified: 2014-04-20 03:23 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---

build-mingw32.log (build-mingw32.log,75.01 KB, text/plain)
2014-04-11 09:45 UTC, Jérôme Borme
build log with mingw64 (build-x86_64.log,68.88 KB, text/plain)
2014-04-11 09:46 UTC, Jérôme Borme

Note You need to log in before you can comment on or make changes to this bug.
Description Jérôme Borme 2014-04-11 09:45:30 UTC
I expected sed to cross-compile easily with mingw (it is part of the core of mingw binaries distributed for windows). However compilation failed using both the mingw32 and mingw64 versions of gcc-4.8.2 on an amd64 system, and in two different ways. See build logs.

Reproducible: Always

Steps to Reproduce:
0. Make sure you don't have the toolchain overlay as it confuses crossdev (correct me if I'm wrong).

1. crossdev --ov-output /usr/local/portage mingw32
2. edit /usr/mingw32/etc/portage/make.profile/make.defaults -> add ARCH="x86"
edit /usr/mingw32/etc/portage/make.conf -> replace all references to x86_64-pc-linux-gnu by mingw32 (this must be a crossdev bug)
3. emerge-mingw32 sed
mingw32-gcc -std=gnu99  -O2 -pipe -fomit-frame-pointer   -o sed.exe sed.o compile.o execute.o regexp.o fmt.o mbcs.o utils.o ../lib/libsed.a    
compile.o:compile.c:(.text+0x660): multiple definition of « rpl_towlower »

1. crossdev --ov-output /usr/local/portage mingw64
2. edit /usr/x86_64-w64-mingw32/etc/portage/make.profile/make.defaults -> add ARCH="amd64"
(It's actually the same file as above, since make.profile is a symlink. It must be changed manually everytime, maybe there is a better way to do; I tried changing /usr/x86_64-w64-mingw32/etc/portage/make.conf but it does not work. Also, the make.defaults is reset at every emerge --sync so this is clearly not the optimal solution).
3. emerge-x86_64-w64-mingw32 sed

x86_64-w64-mingw32-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..  -I../lib -I.. -I../lib   -O2 -pipe -fomit-frame-pointer -MT msvc-inval.o -MD -MP -MF .deps/msvc-inval.Tpo -c -o msvc-inval.o msvc-inval.c
msvc-inval.c:34:1: erreur: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gl_msvc_invalid_parameter_handler’
 gl_msvc_invalid_parameter_handler (const wchar_t *expression,
Comment 1 Jérôme Borme 2014-04-11 09:45:57 UTC
Created attachment 374728 [details]
Comment 2 Jérôme Borme 2014-04-11 09:46:16 UTC
Created attachment 374730 [details]
build log with mingw64