Bug 567847 - Cross-compilation of Crypto++ with i686-pc-mingw32-g++ fails
Summary: Cross-compilation of Crypto++ with i686-pc-mingw32-g++ fails
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: mingw32-gcc
Version: 11
Hardware: x86_64
OS: Linux
low
high
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-02-24 04:55 UTC by Ian Cullinan
Modified: 2010-02-25 04:34 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-02-24 14:04:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ian Cullinan 2010-02-24 04:55:28 UTC
Description of problem:

Trying to build cryptopp-5.6.0 (from http://www.cryptopp.com/) fails with an error message asking you to submit a bug report.

Version-Release number of selected component (if applicable):

mingw32-gcc-4.4.0-0.7.fc11.x86_64
mingw32-gcc-c++-4.4.0-0.7.fc11.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Download and unpack the cryptopp-5.6.0 source from http://www.cryptopp.com/
2. Download and apply this patch: http://cvs.fedoraproject.org/viewvc/rpms/cryptopp/F-11/cryptopp-5.6.1-autotools.patch?revision=1.1&view=co 
3. rm GNUmakefile
4. autoreconf --verbose --force --install
5. mingw32-configure
6. sed -i -e '1 i #define CRYPTOPP_DISABLE_SSE2' config.h 
 (to disable SSE2, which apparently doesn't build in x86_64)
7. make
  
Actual results:
*** buffer overflow detected ***: /usr/lib64/gcc/i686-pc-mingw32/4.4.0/../../../../i686-pc-mingw32/bin/as terminated
======= Backtrace: =========
/lib64/libc.so.6(__fortify_fail+0x37)[0x7fc762127507]
/lib64/libc.so.6[0x7fc762125560]
/lib64/libc.so.6[0x7fc7621249b9]
/lib64/libc.so.6(_IO_default_xsputn+0x98)[0x7fc7620a3b88]
/lib64/libc.so.6(_IO_vfprintf+0x18a9)[0x7fc762076389]
/lib64/libc.so.6(__vsprintf_chk+0x9d)[0x7fc762124a5d]
/lib64/libc.so.6(__sprintf_chk+0x7f)[0x7fc76212499f]
/usr/lib64/gcc/i686-pc-mingw32/4.4.0/../../../../i686-pc-mingw32/bin/as[0x44a58d]
/usr/lib64/gcc/i686-pc-mingw32/4.4.0/../../../../i686-pc-mingw32/bin/as[0x43ad5f]
/usr/lib64/gcc/i686-pc-mingw32/4.4.0/../../../../i686-pc-mingw32/bin/as[0x413fc5]
/usr/lib64/gcc/i686-pc-mingw32/4.4.0/../../../../i686-pc-mingw32/bin/as[0x49b9a7]
/usr/lib64/gcc/i686-pc-mingw32/4.4.0/../../../../i686-pc-mingw32/bin/as[0x49ba66]
/usr/lib64/gcc/i686-pc-mingw32/4.4.0/../../../../i686-pc-mingw32/bin/as[0x4045c5]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x7fc76204ea4d]
/usr/lib64/gcc/i686-pc-mingw32/4.4.0/../../../../i686-pc-mingw32/bin/as[0x401ec9]
======= Memory map: ========
00400000-00506000 r-xp 00000000 08:05 194639                             /usr/i686-pc-mingw32/bin/as
00706000-00708000 rw-p 00106000 08:05 194639                             /usr/i686-pc-mingw32/bin/as
00708000-00716000 rw-p 00000000 00:00 0 
01ec8000-084ae000 rw-p 00000000 00:00 0                                  [heap]
7fc761b25000-7fc761b3e000 r-xp 00000000 08:05 14563                      /lib64/libgcc_s-4.4.1-20090729.so.1
7fc761b3e000-7fc761d3e000 ---p 00019000 08:05 14563                      /lib64/libgcc_s-4.4.1-20090729.so.1
7fc761d3e000-7fc761d3f000 rw-p 00019000 08:05 14563                      /lib64/libgcc_s-4.4.1-20090729.so.1
7fc761d5d000-7fc762030000 rw-p 00000000 00:00 0 
7fc762030000-7fc762194000 r-xp 00000000 08:05 11813                      /lib64/libc-2.10.2.so
7fc762194000-7fc762394000 ---p 00164000 08:05 11813                      /lib64/libc-2.10.2.so
7fc762394000-7fc762398000 r--p 00164000 08:05 11813                      /lib64/libc-2.10.2.so
7fc762398000-7fc762399000 rw-p 00168000 08:05 11813                      /lib64/libc-2.10.2.so
7fc762399000-7fc76239e000 rw-p 00000000 00:00 0 
7fc76239e000-7fc7623bd000 r-xp 00000000 08:05 140                        /lib64/ld-2.10.2.so
7fc7623d7000-7fc76259c000 rw-p 00000000 00:00 0 
7fc7625ba000-7fc7625bc000 rw-p 00000000 00:00 0 
7fc7625bc000-7fc7625bd000 r--p 0001e000 08:05 140                        /lib64/ld-2.10.2.so
7fc7625bd000-7fc7625be000 rw-p 0001f000 08:05 140                        /lib64/ld-2.10.2.so
7fff78d8b000-7fff78da0000 rw-p 00000000 00:00 0                          [stack]
7fff78dff000-7fff78e00000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
i686-pc-mingw32-g++: Internal error: Aborted (program as)
Please submit a full bug report.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make[1]: *** [regtest.o] Error 1
make[1]: Leaving directory `/home/icullinan/Download/cryptopp-5.6.0'
make: *** [all] Error 2


Expected results:
The library builds without error.

Additional info:
If you want to skip straight to the crashing, just run:
i686-pc-mingw32-g++ -I. -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields -MT regtest.o -MD -MP -MF .deps/regtest.Tpo -c -o regtest.o regtest.cpp

Comment 1 Richard W.M. Jones 2010-02-24 13:51:21 UTC
Retesting with mingw32-gcc-c++-4.4.2-2.fc13 from Koji ...

Comment 2 Richard W.M. Jones 2010-02-24 14:04:47 UTC
-rw-rw-r--. 1 rjones rjones    6287 2009-03-15 02:48 regtest.cpp
-rw-rw-r--. 1 rjones rjones 8907290 2010-02-24 14:00 regtest.o

This works with the latest mingw32-gcc-c++.  Since Fedora 11 is
nearly out of support, I suggest the reporter updates just the mingw32-*
packages with ones from Fedora 12 or Koji to fix the problem.

Create a file /etc/yum.repos.d/koji.repo containing:

----------
[koji]
name=Koji
baseurl=http://koji.fedoraproject.org/static-repos/dist-f13-build-current/$basearch/
enabled=0
gpgcheck=0
keepcache=0

[koji-i686]
name=Koji
baseurl=http://koji.fedoraproject.org/static-repos/dist-f13-build-current/i386/
enabled=0
gpgcheck=0
keepcache=0
----------

Then do: yum --enablerepo=koji install mingw32-gcc-c++
(but _carefully_ check what packages yum is going to upgrade
before proceeding, to avoid upgrading your whole system to
Rawhide by accident).

Comment 3 Ian Cullinan 2010-02-25 03:24:03 UTC
When I try that, I get:

Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mingw32-gcc-c++.x86_64 0:4.4.2-2.fc13 set to be updated
--> Processing Dependency: mingw32-gcc = 4.4.2-2.fc13 for package: mingw32-gcc-c++-4.4.2-2.fc13.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.11)(64bit) for package: mingw32-gcc-c++-4.4.2-2.fc13.x86_64
--> Running transaction check
---> Package glibc.x86_64 0:2.11.90-12 set to be updated
--> Processing Dependency: glibc-common = 2.11.90-12 for package: glibc-2.11.90-12.x86_64
---> Package mingw32-gcc.x86_64 0:4.4.2-2.fc13 set to be updated
--> Processing Dependency: mingw32-binutils >= 2.19.51.0.14 for package: mingw32-gcc-4.4.2-2.fc13.x86_64
--> Running transaction check
--> Processing Dependency: glibc-common = 2.10.2-1 for package: glibc-2.10.2-1.i686
---> Package glibc-common.x86_64 0:2.11.90-12 set to be updated
---> Package mingw32-binutils.x86_64 0:2.19.51.0.14-1.fc12 set to be updated
--> Finished Dependency Resolution
glibc-2.10.2-1.i686 from installed has depsolving problems
  --> Missing Dependency: glibc-common = 2.10.2-1 is needed by package glibc-2.10.2-1.i686 (installed)
Error: Missing Dependency: glibc-common = 2.10.2-1 is needed by package glibc-2.10.2-1.i686 (installed)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest


Looks like the newer mingw32 packages want a newer libc, which I can't install without updating essentially everything.

Comment 4 Kevin Kofler 2010-02-25 04:34:49 UTC
I don't see why mingw32-gcc can't be updated in F11, the current version even lags behind the native gcc in F11 updates, which is at 4.4.1.


Note You need to log in before you can comment on or make changes to this bug.