From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 724CA7EE79 for ; Fri, 6 May 2016 11:04:51 +0200 (CEST) IronPort-PHdr: 9a23:+J0h9BOg7whcXIO46YMl6mtUPXoX/o7sNwtQ0KIMzox0KPv4rarrMEGX3/hxlliBBdydsKIVzbKI+PiwEUU7or+/81k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i760zceF13FOBZvIaytQ8iJ35Xxj775o82bSj4LrQT+SIs6FA+xowTVu5teqqpZAYF19CH0pGBVcf9d32JiKAHbtR/94sCt4MwrqHwI6Lpyv/JHBO/xdqE8CLhZFygOMmYv5cStuwOJBV+E734YF2EXiQZgAg7f7Ri8UI2n4QXgse8okhKdMMLqV7csHXyH7qxrQRLswm9TMj8y8Gjajopri69UvAimvzR+xZLZZMeeM/8oLfCVRs8TWWcUBpUZbCdGGI7pN4Y= Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=michael.soegtrop@intel.com; spf=Pass smtp.mailfrom=michael.soegtrop@intel.com; spf=None smtp.helo=postmaster@mga11.intel.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of michael.soegtrop@intel.com) identity=pra; client-ip=192.55.52.93; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="michael.soegtrop@intel.com"; x-sender="michael.soegtrop@intel.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of michael.soegtrop@intel.com designates 192.55.52.93 as permitted sender) identity=mailfrom; client-ip=192.55.52.93; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="michael.soegtrop@intel.com"; x-sender="michael.soegtrop@intel.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mga11.intel.com) identity=helo; client-ip=192.55.52.93; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="michael.soegtrop@intel.com"; x-sender="postmaster@mga11.intel.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AnAAAnXSxXkF00N8BdgmyBH30Gpi+SQwENgXYXAQKFdgKBNjgUAQEBAQEBAQERAQEBAQcNCQkhJAuCLYIbLRxCASpWFwEOAQQbDAeIDgGdS6BnKoYhg0iFCjqCRgtAGIIuBZgaBQGBLZwDjzYeAQGCWIFVbIZ4NgF+AQEB X-IPAS-Result: A0AnAAAnXSxXkF00N8BdgmyBH30Gpi+SQwENgXYXAQKFdgKBNjgUAQEBAQEBAQERAQEBAQcNCQkhJAuCLYIbLRxCASpWFwEOAQQbDAeIDgGdS6BnKoYhg0iFCjqCRgtAGIIuBZgaBQGBLZwDjzYeAQGCWIFVbIZ4NgF+AQEB X-IronPort-AV: E=Sophos;i="5.24,586,1454972400"; d="scan'208,217";a="176864065" Received: from mga11.intel.com ([192.55.52.93]) by mail3-smtp-sop.national.inria.fr with ESMTP; 06 May 2016 11:04:49 +0200 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 06 May 2016 02:04:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,586,1455004800"; d="scan'208,217";a="969967421" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga002.jf.intel.com with ESMTP; 06 May 2016 02:04:48 -0700 Received: from irsmsx155.ger.corp.intel.com (163.33.192.3) by IRSMSX104.ger.corp.intel.com (163.33.3.159) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 6 May 2016 10:04:46 +0100 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.35]) by irsmsx155.ger.corp.intel.com ([169.254.14.73]) with mapi id 14.03.0248.002; Fri, 6 May 2016 10:04:46 +0100 From: "Soegtrop, Michael" To: "caml-list@inria.fr" Thread-Topic: Question on opam mingw32/64 cross for Windows Thread-Index: AdGndlXTneTdjtLKQEGo1axUUN/3PQ== Date: Fri, 6 May 2016 09:04:46 +0000 Message-ID: <0F7D3B1B3C4B894D824F5B822E3E5A172CEEEA71@IRSMSX102.ger.corp.intel.com> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: multipart/alternative; boundary="_000_0F7D3B1B3C4B894D824F5B822E3E5A172CEEEA71IRSMSX102gercor_" MIME-Version: 1.0 Subject: [Caml-list] Question on opam mingw32/64 cross for Windows --_000_0F7D3B1B3C4B894D824F5B822E3E5A172CEEEA71IRSMSX102gercor_ Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Dear OCaml Users, I am working on a cygwin based cross opam for MinGW. There is one issue wit= h this: on windows it is tricky to build 64 bit binaries with a 32 bit tool= chain and vice versa. The reason is that the 32 bit and 64 bit system DLLs = have the same names and which one you get depends on if the exe accessing i= t is a 32 bit or 64 bit app. So a 32 bit linker will see the 32 bit DLLs an= d a 64 bit linker will see the 64 bit DLLs due to some black magic in the W= indows file system (at least as far as I know). So a 64 bit linker cannot e= asily link 32 bit apps. I know two ways around this: 1.) Use a 32 bit cygwin to build 32 bit MinGW apps and a 64 bit cygwin t= o build 64 bit MinGW apps 2.) Use a 32 bit and a 64 bit copy program to copy the required system D= LLs into different folders and tell the linker to get them from there I wonder if someone has a better solution for this. If not, I would like to= know which method the community prefers. Method 1.) is not so nice for automated creation of multi-platform setups. Method 2.) might require some adjustments in build files. Also it is tricky= to create the two copy programs from sources without method 1.). And final= ly the system DLLs might change and it is not obvious when to redo the copy= ing. Best regards, Michael Intel Deutschland GmbH Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Christian Lamprechter Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928 --_000_0F7D3B1B3C4B894D824F5B822E3E5A172CEEEA71IRSMSX102gercor_ Content-Type: text/html; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable

Dear OCaml Users,

 

I am working on a cygwin based cross opam for MinGW.= There is one issue with this: on windows it is tricky to build 64 bit bina= ries with a 32 bit toolchain and vice versa. The reason is that the 32 bit = and 64 bit system DLLs have the same names and which one you get depends on if the exe accessing it is a 32 bit= or 64 bit app. So a 32 bit linker will see the 32 bit DLLs and a 64 bit li= nker will see the 64 bit DLLs due to some black magic in the Windows file s= ystem (at least as far as I know). So a 64 bit linker cannot easily link 32 bit apps.

 

I know two ways around this:

 

1.)    Use a 32 bit cygwin to build 32 bit MinGW apps and = a 64 bit cygwin to build 64 bit MinGW apps

2.)    Use a 32 bit and a 64 bit copy program to copy the = required system DLLs into different folders and tell the linker to get them= from there

 

I wonder if someone has a better solution for this. = If not, I would like to know which method the community prefers.

 

Method 1.) is not so nice for automated creation of = multi-platform setups.

 

Method 2.) might require some adjustments in build f= iles. Also it is tricky to create the two copy programs from sources withou= t method 1.). And finally the system DLLs might change and it is not obviou= s when to redo the copying.

 

Best regards,

 

Michael

 

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

--_000_0F7D3B1B3C4B894D824F5B822E3E5A172CEEEA71IRSMSX102gercor_--