Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 345445 - dev-libs/openssl-1.0.0a-r3: add support for mingw targets
Summary: dev-libs/openssl-1.0.0a-r3: add support for mingw targets
Status: RESOLVED LATER
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-14 20:12 UTC by Sergey Belyashov
Modified: 2010-11-14 20:42 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Belyashov 2010-11-14 20:12:55 UTC
First. There is invalid operation of script gentoo.config. It tries detect i586-pc-winnt or *-winnt*, but crossdev does not support these targets.
When it is fixed then gentoo.config produces target "winnt-parity" which is not valid too. Possible targets for Configure are "mingw" or "mingw64" only.
After fixing it compiling begins, but stops on first call to cross ar (in my case i686-mingw32-ar) with error about invalid option --noexecstack
After fixing compilation stops on linking libeay32.dll with error:
i686-mingw32-gcc: rc.o: no such file or directory
Previously log contains error: /bin/sh: line 17: windres: command not found
In Makefile.shared is line: $(CROSS_COMPILE)windres -o rc.o
But CROSS_COMPILE variable is not set on building: required key --cross-compile-prefix=i686-mingw32- which is not passed to Configure
When I add this key to gentoo.config output, I receive error about not found compiler i686-mingw32-i686-mingw32-gcc. Also possible such problems with AR and RANLIB. I solve it by unsetting variables CC AR and RANLIB in ebuild.
Next try compile finishes on problem with capi. I solve it adding configure option disable-capieng. This problem is expected - I cannot compile openssl-1.0.0a without this error using mingw compiler.
Next problem caused on undefined reference to something like _BIO_f_zlib. I disable use flag zlib... But building finishes on linking bntest.exe because /usr/libexec/gcc/i686-mingw32/ld: cannot find -lcrypt...

Manual compilation (not via i686-mingw32-emerge) successfull: ./Configure --cross-compile-prefix=i686-mingw32- disable-capieng --prefix=/usr/i686-mingw32/usr && make && sudo make install

Reproducible: Always

Steps to Reproduce:
1. crossdev -t i686-mingw32
2. i686-mingw32-emerge --nodeps openssl

Actual Results:  
build failed

Expected Results:  
success
Comment 1 SpanKY gentoo-dev 2010-11-14 20:35:23 UTC
the winnt targets are for prefix systems.  if you want openssl to cross-compile for mingw, then feel free to post patches to do it.  i'm not interested in making this work myself.