public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Philip Kime <philkime@kime.org.uk>
To: cygwin@cygwin.com
Subject: Building a vendor perl module with gcc under cygwin
Date: Wed, 18 May 2011 13:38:00 -0000	[thread overview]
Message-ID: <BANLkTiniRAuZ=04JLVHcQ=_cydAk3kDhbA@mail.gmail.com> (raw)

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

             reply	other threads:[~2011-05-18 13:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-18 13:38 Philip Kime [this message]
2011-05-19 16:51 ` Reini Urban

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTiniRAuZ=04JLVHcQ=_cydAk3kDhbA@mail.gmail.com' \
    --to=philkime@kime.org.uk \
    --cc=Philip@kime.org.uk \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).