delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:to:from:subject:date:message-id:mime-version | |
:content-type:content-transfer-encoding; q=dns; s=default; b=phC | |
HlkfY/Rws/c1Vtzvz/CCeTibP9F8sDBExWTq6HNjp8iVE45p2RmygblxvilTve+4 | |
ors7B6CMKWiGgpbVHOYU6INPKEUItGKabqQLR3sxvm6smXb682VFK2t42IlDd90r | |
t6iR6OUx9wMgCShl4bfUnYiD/N7hbhjxlOmsgUQE= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:to:from:subject:date:message-id:mime-version | |
:content-type:content-transfer-encoding; s=default; bh=1DWA8hAsV | |
mcMQGhA8L7Yd48mC4A=; b=sv/KDqVZcCMGVPdUfbI2eZ9YhBHG3gAfwe6v+aUzT | |
wx9KlVLOQB2pmIZLQXXty8YXGgSXFdUkMho3H4xo+YJbvqBvjc+cLj15PO4255+X | |
BsGVpC2mvad6sWX2mJDoiZcs9vSBzoxEp9ehkQ2kL6urdKlKtgtw+zsf/gwCpgJw | |
/k= | |
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 |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-0.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_NUMERIC_HELO,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS,T_FSL_HELO_BARE_IP_2 autolearn=no version=3.3.2 |
X-HELO: | plane.gmane.org |
To: | cygwin AT cygwin DOT com |
From: | Andrew DeFaria <Andrew AT DeFaria DOT com> |
Subject: | Building cpan module that links with proprietary libs |
Date: | Wed, 28 May 2014 19:12:07 -0700 |
Lines: | 48 |
Message-ID: | <lm651o$5ss$1@ger.gmane.org> |
Mime-Version: | 1.0 |
User-Agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
X-IsSubscribed: | yes |
I'm attempting to build a cpan module (well actually it's not a cpan module but rather a module that uses MakeMaker and has the familiar perl Makefile.PL, make, make test, make install installation procedure. Additionally I need to link it to a set of proprietary libs that I am given only the .lib files for. If you must know this is for Perforce's P4Perl which I'd like to get working with Cygwin's Perl natively. I download the P4API bundle (the package that has include files and the .lib files pre-compiled). Next I need to do: $ perl Makefile.PL --api-dir /.../path/to/unzipped/p4api This works fine and I procedure with the make. This fails with things like: make[1]: Leaving directory '/cygdrive/a/perl/P4Perl.Cygwin/lib' g++ -c -I/cygdrive/a/perl/p4api.windows/include/p4 -Ilib -x c++ -DUSEIMPORTLIB -O3 -DVERSION=\"2014.1\" -DXS_VERSION=\"2014.1\" "-I/usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE" -DID_OS="\"CYGWIN17THREAD\"" -DID_REL="\"2014.1\"" -DID_PATCH="\"842847\"" -DID_Y="\"2014\"" -DID_M="\"05\"" -DID_D="\"06\"" -DOS_CYGWIN -DOS_CYGWIN17 -DOS_CYGWIN17THREAD -DOS_CYGWINTHREAD -DP4API_VERSION="515585" -DID_API="\"2014.1/821990\"" P4.c Running Mkbootstrap for P4 () chmod 644 P4.bs rm -f blib/arch/auto/P4/P4.dll g++ -shared P4.o -o blib/arch/auto/P4/P4.dll lib/libp4.a \ /usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE/cygperl5_14.dll \ P4.o:P4.c:(.text+0x45ac): undefined reference to `ClientApi::SetClient(char const*)' P4.o:P4.c:(.text+0x45ac): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `ClientApi::SetClient(char const*)' P4.o:P4.c:(.text+0x4a9c): undefined reference to `ClientApi::SetHost(char const*)' Notice that it removes P4.dll, so it seems to know it's working with dll's, but then it calls g++ with a -o for libp4.a! Why a .a? Shouldn't this be .dll? Meantime it fails with many undefined references. I think I might need to do perl Makefile.PL with other opts to tell it that while it's using Cygwin and can be very Linux-like, it needs to produce .dll's and not .a's or .o's. Has anybody managed to do this? What am I doing wrong? -- Andrew DeFaria http://defaria.com -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |