Uh oh!
There was an error while loading. Please reload this page.
Add rpath to link command in Test::Alien - #415
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 |
hakonhagland
commented
Jul 16, 2024
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? |
hakonhagland
commented
Jul 17, 2024
It works on Linux and macOS, but on Windows I think we still need something similar to |
hakonhagland
commented
Jul 17, 2024
If I combine When using this alienfile on windows, it will still try to run is not executed? |
hakonhagland
commented
Jul 17, 2024
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:/" |
hakonhagland
commented
Jul 17, 2024
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: ? |
shawnlaffan
commented
Jul 18, 2024
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 |
hakonhagland
commented
Jul 18, 2024
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? |
hakonhagland
commented
Jul 18, 2024
@shawnlaffan Thanks for testing :) |
hakonhagland
commented
Jul 18, 2024
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: |
shawnlaffan
commented
Jul 18, 2024
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.: |
shawnlaffan
commented
Jul 18, 2024
Confirming it builds and passes tests on my local system. |
hakonhagland
commented
Jul 18, 2024
Confirming it is a problem with the MSYS However, running a test perl script that executes |
hakonhagland
commented
Jul 18, 2024
I have also installed MSYS2 in |
shawnlaffan
commented
Jul 18, 2024
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: |
shawnlaffan
commented
Jul 21, 2024
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: |
shawnlaffan
commented
Jul 21, 2024
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.sowithAlien::GSL, see PerlAlien/Alien-GSL#17 for more information. When using analienfilewith:Test::Alien::xs_ok()gives following error:I believe we need to pass the rpath to the linker command to fix this.