public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* cygport (0.11.0):  Installing dll's into perl site directories (not /usr/bin)
@ 2012-09-04  0:22 Mark O'Keefe
  2012-09-04  1:27 ` Yaakov (Cygwin/X)
  0 siblings, 1 reply; 5+ messages in thread
From: Mark O'Keefe @ 2012-09-04  0:22 UTC (permalink / raw)
  To: cygwin

Hi,

I'm trying to use cygport to package up DLL's that are used as part of a set of perl packages.  The place that these are meant to be installed is under the perl site configuration (/usr/lib/perl5/site_perl/<version>/auto/<package>/<subpackage>/*.dll.

Currently what happens is libtool munges the path to ../bin.  If I don't use cygport to do the installation, this means that the DLL's are installed into:  /usr/lib/perl5/site_perl/<version>/auto/<package>/bin
This doesn't work as this location is not in the search path for perl's DynaLoader.

When you add cygport to the equation the files end up in:  /usr/bin
Again, this doesn't work as this isn't in the load path.

Anyone got any suggestions on how to achieve this?  Or alternatives other than the obvious - add the path to the search path.

When I stopped libtool from munging the path to have the ../bin in it, thinks broke.  I haven't tried to debug this one yet, but started looking for anyone that might have done this before and have suggestions on how to do it.

Hopefully someone out there has some helpful suggestions.

Cheers,
Mark.



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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cygport (0.11.0):  Installing dll's into perl site directories (not /usr/bin)
  2012-09-04  0:22 cygport (0.11.0): Installing dll's into perl site directories (not /usr/bin) Mark O'Keefe
@ 2012-09-04  1:27 ` Yaakov (Cygwin/X)
  2012-09-04  6:55   ` Mark O'Keefe
  0 siblings, 1 reply; 5+ messages in thread
From: Yaakov (Cygwin/X) @ 2012-09-04  1:27 UTC (permalink / raw)
  To: cygwin

http://cygwin.com/acronyms/#PCYMTWLL !

On Tue, 2012-09-04 at 10:21 +1000, Mark O'Keefe wrote: 
> I'm trying to use cygport to package up DLL's that are used as part
> of a set of perl packages.

Being vague doesn't help us help you.  Telling us what package you're
trying to build, and attaching your (draft) .cygport files, does.

> The place that these are meant to be installed is under the perl site
> configuration (/usr/lib/perl5/site_perl/<version>/auto/<package>/<subpackage>/*.dll.

Cygwin packages should install Perl modules into vendor_perl
(PERL_VENDORLIB and PERL_VENDORARCH in cygport terms).

> Currently what happens is libtool munges the path to ../bin.  If I
> don't use cygport to do the installation, this means that the DLL's
> are installed into:  /usr/lib/perl5/site_perl/<version>/auto/<package>/bin
> This doesn't work as this location is not in the search path for
> perl's DynaLoader.
> 
> When you add cygport to the equation the files end up in:  /usr/bin
> Again, this doesn't work as this isn't in the load path.

This means "-module" is missing from the *_la_LDFLAGS for these
module(s).  You'll need to patch the affected Makefile.am file(s) and
restart the build to fix this.


Yaakov



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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cygport (0.11.0):  Installing dll's into perl site directories (not /usr/bin)
  2012-09-04  1:27 ` Yaakov (Cygwin/X)
@ 2012-09-04  6:55   ` Mark O'Keefe
  2012-09-04  7:12     ` Yaakov (Cygwin/X)
  0 siblings, 1 reply; 5+ messages in thread
From: Mark O'Keefe @ 2012-09-04  6:55 UTC (permalink / raw)
  To: cygwin

Hi Yaakov,

Thanks for the response.  Sorry I was vague with the question.  Your comments
pointed me in the right direction however.  The default configuration of the package
(which is amanda by the way) is to install the perl modules into site_perl.
If you override this to the PERL_VENDORARCH directory things start behaving
better.  Still not sure if this is the completely correct solution, however it does
seem to have created a clean package.

I don't have link errors, I have perl runtime errors when trying to execute the
bootstrap of the C code for the modules.  This is caused by the DLL's not being
in the expected place.  They were in /usr/bin and this is not in the search path
for the DynaLoader so it doesn't load the library.

Hopefully have this fixed now.

Cheers,
Mark.

On 04/09/2012, at 11:27 AM, Yaakov (Cygwin/X) wrote:

> http://cygwin.com/acronyms/#PCYMTWLL !
> 
> On Tue, 2012-09-04 at 10:21 +1000, Mark O'Keefe wrote: 
>> I'm trying to use cygport to package up DLL's that are used as part
>> of a set of perl packages.
> 
> Being vague doesn't help us help you.  Telling us what package you're
> trying to build, and attaching your (draft) .cygport files, does.
> 
>> The place that these are meant to be installed is under the perl site
>> configuration (/usr/lib/perl5/site_perl/<version>/auto/<package>/<subpackage>/*.dll.
> 
> Cygwin packages should install Perl modules into vendor_perl
> (PERL_VENDORLIB and PERL_VENDORARCH in cygport terms).
> 
>> Currently what happens is libtool munges the path to ../bin.  If I
>> don't use cygport to do the installation, this means that the DLL's
>> are installed into:  /usr/lib/perl5/site_perl/<version>/auto/<package>/bin
>> This doesn't work as this location is not in the search path for
>> perl's DynaLoader.
>> 
>> When you add cygport to the equation the files end up in:  /usr/bin
>> Again, this doesn't work as this isn't in the load path.
> 
> This means "-module" is missing from the *_la_LDFLAGS for these
> module(s).  You'll need to patch the affected Makefile.am file(s) and
> restart the build to fix this.
> 
> 
> Yaakov
> 
> 
> 
> --
> 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
> 


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cygport (0.11.0):  Installing dll's into perl site directories (not /usr/bin)
  2012-09-04  6:55   ` Mark O'Keefe
@ 2012-09-04  7:12     ` Yaakov (Cygwin/X)
  2012-09-04 14:07       ` Mark O'Keefe
  0 siblings, 1 reply; 5+ messages in thread
From: Yaakov (Cygwin/X) @ 2012-09-04  7:12 UTC (permalink / raw)
  To: cygwin

On Tue, 2012-09-04 at 16:55 +1000, Mark O'Keefe wrote:
> I don't have link errors, I have perl runtime errors when trying to execute the
> bootstrap of the C code for the modules.  This is caused by the DLL's not being
> in the expected place.  They were in /usr/bin and this is not in the search path
> for the DynaLoader so it doesn't load the library.

Which, since it sounds as this is an autotools-driven package, would be
caused by a missing "-module" flag in the corresponding *_la_LDFLAGS.
It won't cause a link error (only on Darwin is there a structural
difference with or without), but it does affect where the DLL is
installed on PE platforms, as you see here.

Furthermore, since -module is missing, that means the module library
name must start with "lib" (since automake would complain otherwise).
The resulting DLL will start with "cyg" instead, meaning that whatever
is loading this module needs to be edited appropriately.


Yaakov



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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cygport (0.11.0):  Installing dll's into perl site directories (not /usr/bin)
  2012-09-04  7:12     ` Yaakov (Cygwin/X)
@ 2012-09-04 14:07       ` Mark O'Keefe
  0 siblings, 0 replies; 5+ messages in thread
From: Mark O'Keefe @ 2012-09-04 14:07 UTC (permalink / raw)
  To: cygwin

Ah.  I had assumed that this stuff was basically correct in the makefiles.  Wrong.
Adding the -module to the appropriate libraries had the right outcome.

Thanks for your help!!

Now if only I could post to the cygwin-apps list.  Currently nothing gets through
on that one.  Assume moderated and requires email approved or something.


On 04/09/2012, at 5:12 PM, Yaakov (Cygwin/X) wrote:

> On Tue, 2012-09-04 at 16:55 +1000, Mark O'Keefe wrote:
>> I don't have link errors, I have perl runtime errors when trying to execute the
>> bootstrap of the C code for the modules.  This is caused by the DLL's not being
>> in the expected place.  They were in /usr/bin and this is not in the search path
>> for the DynaLoader so it doesn't load the library.
> 
> Which, since it sounds as this is an autotools-driven package, would be
> caused by a missing "-module" flag in the corresponding *_la_LDFLAGS.
> It won't cause a link error (only on Darwin is there a structural
> difference with or without), but it does affect where the DLL is
> installed on PE platforms, as you see here.
> 
> Furthermore, since -module is missing, that means the module library
> name must start with "lib" (since automake would complain otherwise).
> The resulting DLL will start with "cyg" instead, meaning that whatever
> is loading this module needs to be edited appropriately.
> 
> 
> Yaakov
> 
> 
> 
> --
> 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
> 


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-09-04 14:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-04  0:22 cygport (0.11.0): Installing dll's into perl site directories (not /usr/bin) Mark O'Keefe
2012-09-04  1:27 ` Yaakov (Cygwin/X)
2012-09-04  6:55   ` Mark O'Keefe
2012-09-04  7:12     ` Yaakov (Cygwin/X)
2012-09-04 14:07       ` Mark O'Keefe

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