Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always link to $Config{libs} on cygwin #353

Merged
merged 1 commit into from
May 28, 2020
Merged

Always link to $Config{libs} on cygwin #353

merged 1 commit into from
May 28, 2020

Conversation

Leont
Copy link
Member

@Leont Leont commented May 27, 2020

This is intended to fix Perl/perl5#17805

WIP because it needs testing. @pjacklam would you be able to do that?

@tonycoz
Copy link
Contributor

tonycoz commented May 28, 2020

The cygwin failures look like they're because the system perl includes -lnsl in libs (and several others):

$ perl -V:libs
libs='-lpthread -lnsl -lgdbm -ldb -ldl -lcrypt -lgdbm_compat';
$ uname -a
CYGWIN_NT-10.0 phobos 3.1.4(0.340/5/3) 2020-02-19 08:49 x86_64 Cygwin

but a fresh build doesn't include them:

$ ./miniperl -Ilib -V:libs
libs='-lpthread -ldl -lquadmath';

(miniperl because of the issue this PR is fixing.)

@bingos
Copy link
Member

bingos commented May 28, 2020

Yeah, that's on me, I'll fix the cygwin actions to pull in nsl

@Leont
Copy link
Member Author

Leont commented May 28, 2020

Also, I was in doubt on wether to use libs or perllibs. I suspect the latter is more appropriate, but both are not very well defined.

@Leont Leont changed the title WIP: Always link to $Config{libs} on cygwin Always link to $Config{libs} on cygwin May 28, 2020
@bingos bingos merged commit bdc8dcf into master May 28, 2020
@mohawk2 mohawk2 deleted the cygwin-quadmath branch August 30, 2020 16:30
@karenetheridge
Copy link
Member

@Leont
Copy link
Member Author

Leont commented Nov 25, 2020

Yeah, that's on me, I'll fix the cygwin actions to pull in nsl

That means that everyone else will have to do that as well, which appears to be a problem.

@pjacklam
Copy link

The most recent versions of the perl Cygwin package have all had this -lnsl issue. Because of this, I have not been able to build any Perl module that uses XS code. However, if I build perl on Cygwin from source, I don't run into this issue. I am really at the edge of my knowledge her, but could this be a Cygwin problem rather than a perl problem? During Cygwin installation, the nsl package is not a prerequisite for the perl package, so I have no nsl library in my /lib directory on Cygwin.

@Leont
Copy link
Member Author

Leont commented Nov 26, 2020

The most recent versions of the perl Cygwin package have all had this -lnsl issue. Because of this, I have not been able to build any Perl module that uses XS code. However, if I build perl on Cygwin from source, I don't run into this issue. I am really at the edge of my knowledge her, but could this be a Cygwin problem rather than a perl problem?

if libnsl is present during perl's build, it will be included in the list of wanted libraries. So if perl was build with libnsl laying around (as cygwin apparently does), it now needs to be around when extensions are build (which is rather unfortunate).

I think we need a different fix for this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EU::MM doesn't link $Config{libs} into dynamic extensions on Cygwin
5 participants