delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/10/19/08:49:50

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <C9004AE9971E4B7ABBC246E73FC599AF@desktop2>
From: "Sisyphus" <sisyphus1 AT optusnet DOT com DOT au>
To: <cygwin AT cygwin DOT com>
References: <586E6C4720134D06B35A67112D3BBBCE AT desktop2>
In-Reply-To: <586E6C4720134D06B35A67112D3BBBCE@desktop2>
Subject: Re: [perl] Portably linking to libstdc++
Date: Sun, 19 Oct 2008 23:48:02 +1100
MIME-Version: 1.0
X-Mailer: Microsoft Windows Mail 6.0.6001.18000
X-IsSubscribed: yes
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

----- Original Message ----- 
From: "Sisyphus" <sisyphus1 AT optusnet DOT com DOT au>
.
.
>
> How do I write that LIBS assignment so that it would be portable across 
> different *Cygwin* installations ?
>

I still don't know how to do that - though I did come to a better 
understanding of how the problem arises.

For both linux and cygwin, 'perl -V:libpth' returns 'libpth='/usr/local/lib 
/usr/lib /lib'.

On linux I can run 'perl Makefile.PL LIBS="-lstdc++"' and that runs fine 
because '-lstdc++' is found in $Config{libpth}, in the form of libstdc++.so.

But on cygwin, there is no '-lstdc++' to be found in $Config{libpth}, so 
MakeMaker decides to not pass the switch on (which has always been 
MakeMaker's policy in such cases, afaik). This is a pity - there would be no 
problem if it *did* the pass switch on, as both gcc and g++ on cygwin will 
resolve that link.

IMO, on my cygwin perl, $Config{libpth} should be set to '/usr/local/lib 
/usr/lib /lib /lib/gcc/i686-pc-cygwin/3.4.4', and I regard it as a bug that 
'/lib/gcc/i686-pc-cygwin/3.4.4' is not being included in $Config{libpth}. In 
fact, I've modified the libpth setting in Config.pm to '/usr/local/lib 
/usr/lib /lib /lib/gcc/i686-pc-cygwin/3.4.4'.

Is there somewhere I should lodge a bug report about this ?

Cheers,
Rob 


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

- Raw text -


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