delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/05/18/09:38:52

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=4.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,SPF_SOFTFAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Reply-To: Philip AT kime DOT org DOT uk
From: Philip Kime <philkime AT kime DOT org DOT uk>
Date: Wed, 18 May 2011 15:38:04 +0200
Message-ID: <BANLkTiniRAuZ=04JLVHcQ=_cydAk3kDhbA@mail.gmail.com>
Subject: Building a vendor perl module with gcc under cygwin
To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Greetings,
  I am having a hell of time trying to build a vendor-supplied perl
module under gcc in cygwin. I know it compiles with gcc under Linux
and Unix, as well as with VC under windows. I'm using cygwin 1.7.9 and
gcc 4.3.4. This is 64-bit windows.

The module creates a .dll which needs to link to one other vendor
supplied library for which I have the .dll and .lib import library.
I'm using the 32-bit version of the library I need.

I have managed to get as far as building the module .dll but when I
try to load it, I get (module is called "MOD" below):

Can't load 'blib/arch/auto/MOD/MOD.dll' for module MOD: Exec format
error at /usr/lib/perl5/5.10/i686-cygwin/DynaLoader.pm line 200.

When I look at the MOD.dll with ldd, I get:

        ntdll.dll => /cygdrive/c/Windows/SysWOW64/ntdll.dll (0x77c40000)
        kernel32.dll => /cygdrive/c/Windows/syswow64/kernel32.dll (0x76020000)
        KERNELBASE.dll => /cygdrive/c/Windows/syswow64/KERNELBASE.dll
(0x77420000)

        ??? => ??? (0x6e300000)

which doesn't look good. It's not clear to me which flags I need to
pass to gcc. I believe that I shouldn't use "-mdll" any more. I tried
"-shared" but this gives me undefined SSP symbols.

nm output for MOD.dll looks normal.

Any ideas appreciated.

-- 
Dr Philip Kime

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019