-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add rpath to link command in Test::Alien #415
base: main
Are you sure you want to change the base?
Conversation
What you want for this is to use Alien::Role::Dino with your Alien, which knows what to do on the various different platforms. |
Thanks for the tip. I tested now
instead of using the |
Yes that seems to work:) @plicease If you have time, could you review the module Can this module be published to CPAN as it is? |
It works on Linux and macOS, but on Windows I think we still need something similar to |
If I combine
When using this alienfile on windows, it will still try to run
is not executed? |
I think we need to use
|
Now "configure" and "make" succeeds on Windows, but "make install" fails:
Notice the command:
First, "/usr/bin/mkdir" does not look correct on Windows, and second, the path seems to be made up of two separate paths starting with "C:/" |
We need to remove
|
It is working, but in some cases I think the path names becomes too long since "make install" seems to use the absolute path when concatenating two paths instead of using one absolute and one relative path. For example:
Shouldn't this be rather:
? |
It worked without issue when I tried a few hours ago. I'm running it again to be sure as I hand-edited the alienfile from the github repo. This is using Strawberry Perl portable, 5.38.2.2, and env var |
It seems to be the correct behavior to concatenate absolute path? I tested on linux now, and it uses absolute paths there too. However, the path length can the become a problem on windows, right? Isn't there a limit on path length like 260 characters? |
@shawnlaffan Thanks for testing :) |
When testing from a GitHub action, I get a path the is 264 characters and it fails. See: https://github.com/hakonhagland/perl-math-gsl/actions/runs/9987653501/job/27602620644#step:7:13310 The error is:
|
You might be hitting clashes with GH Actions putting the Git for Windows MSYS bin dir in the path. I've had to work around these in the past using an around hook, e.g.: |
Confirming it builds and passes tests on my local system. |
Confirming it is a problem with the MSYS
However, running a test perl script that executes |
I have also installed MSYS2 in |
I suspect path lengths are a symptom and not the root cause. The path you posted has the first half using windows form and the second using MSYS form. This is why I suspect the MSYS (or some other) shell is being passed the args. Currently it refers to The install path should read as
|
@shawnlaffan Right, but I tested now on Linux and the same problem exists there, even with the original
Notice the two parts: |
I'm seeing the same path doubling on my machine when using WSL but the tests and installation work without issue. There is this log entry, though:
|
My untested guess is that something odd is happening in this sub and the paths are not being combined, or the paths passed to this sub are not as expected: Alien-Build/lib/Alien/Build/Util.pm Lines 120 to 125 in 96cdc77
|
I am trying to build a shared
libgsl.so
withAlien::GSL
, see PerlAlien/Alien-GSL#17 for more information. When using analienfile
with:Test::Alien::xs_ok()
gives following error:I believe we need to pass the rpath to the linker command to fix this.