Cross compiling for cygwin under Linux.

Michel Van den Bergh michel.vandenbergh@uhasselt.be
Thu Mar 31 14:40:00 GMT 2016


On 03/30/2016 06:19 PM, Yaakov Selkowitz wrote:
> On 2016-03-30 10:24, Michel Van den Bergh wrote:
>> I am one of the authors of an application (
>> https://sourceforge.net/projects/icsdrone/ ) written for POSIX and I
>> would like to provide a Windows binary.
>>
>> As I do not use Windows I would like to cross compile on Linux.
>>
>> I cannot use Mingw as our application relies heavily on the select() 
>> call.
>>
>> So my question is: is it possible to cross compile a Cygwin binary on
>> Linux?
>
> Yes it is.  Packages for Fedora and RHEL/CentOS are available here:
>
> https://copr.fedorainfracloud.org/coprs/yselkowitz/cygwin/
>
Unfortunately the gcc for CentOS appears not to work...

/usr/bin/i686-pc-cygwin-gcc-4.9.3 -c test.c

*** buffer overflow detected ***: 
/usr/lib/gcc/i686-pc-cygwin/4.9.3/../../../../i686-pc-cygwin/bin/as 
terminated
======= Backtrace: =========
/lib64/libc.so.6(__fortify_fail+0x37)[0x7f3c5d31e567]
/lib64/libc.so.6(+0x100450)[0x7f3c5d31c450]
/lib64/libc.so.6(__strncpy_chk+0x17b)[0x7f3c5d31b71b]
/usr/lib/gcc/i686-pc-cygwin/4.9.3/../../../../i686-pc-cygwin/bin/as[0x442454]
/usr/lib/gcc/i686-pc-cygwin/4.9.3/../../../../i686-pc-cygwin/bin/as[0x4429ee]
/usr/lib/gcc/i686-pc-cygwin/4.9.3/../../../../i686-pc-cygwin/bin/as[0x45c3db]
/usr/lib/gcc/i686-pc-cygwin/4.9.3/../../../../i686-pc-cygwin/bin/as[0x445fd1]
/usr/lib/gcc/i686-pc-cygwin/4.9.3/../../../../i686-pc-cygwin/bin/as[0x417ab0]
/usr/lib/gcc/i686-pc-cygwin/4.9.3/../../../../i686-pc-cygwin/bin/as[0x4059a0]
/usr/lib/gcc/i686-pc-cygwin/4.9.3/../../../../i686-pc-cygwin/bin/as[0x4bb747]
/usr/lib/gcc/i686-pc-cygwin/4.9.3/../../../../i686-pc-cygwin/bin/as[0x4bb7f6]
/usr/lib/gcc/i686-pc-cygwin/4.9.3/../../../../i686-pc-cygwin/bin/as[0x40563c]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x7f3c5d23ad5d]
/usr/lib/gcc/i686-pc-cygwin/4.9.3/../../../../i686-pc-cygwin/bin/as[0x402b19]
======= Memory map: ========
....

test.c:

int main(){
     return 0;
}

Is there any hope left?

Best regards,
Michel




--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list