Perl 6 - the future is here, just unevenly distributed

IRC log for #native, 2015-12-30

| Channels | #native index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
11:33 salva hi
11:33 salva I am trying to fix Alien::OpenSSL to work on Windows
11:34 salva One of the problems I am facing is that the library archive is broken
11:34 salva it contains symbolic links pointing to inexistent files
11:36 salva Actually those invalid links are useless, they are correctly recreated afterwards in the build stage
11:37 salva The problem in Windows is that Archive::Extract tries to replace them by copies of the target files
11:37 salva But as it can't resolve them, it fails
11:39 salva So in the end, what I need is a custom way to extract the archive that just ignores errors
11:39 salva But the file extraction logic in Alien::Base is hardcoded inside the Alien::Base::ModuleBuild::ACTION_alien_code method
11:40 salva and so... https://github.com/salva/p5-Alien-Base/commit/0cb6ca851705335ed9e79bfa2ab938aede36bd3e
11:42 salva But I am not sure if subclassing and overriding methods is the right way to customize Alien::Base
11:42 salva or the method naming
11:43 salva any opinions?
12:55 plicease We have some overridable methods in AB and AB::MB
12:58 plicease so it wouldn't be unprecedented
12:58 plicease if we did do that it should have an alien_ prefix and be documented in the POD
13:00 plicease I would love to see a working Alien::OpenSSL btw
13:03 plicease The other way to do it I guess would be to add an ACTION_alien_extract or something like that
13:04 plicease that would only be helpful if you'd be doing that step on the command line
13:04 plicease but I'm not sure how often you'd want to do that.
13:04 plicease can you give me an idea of what the overridden code in A::OpenSSL would look like?
13:21 salva sure, https://github.com/salva/p5-Alien-OpenSSL/blob/activestate-perl/Build.PL
13:57 plicease is there a reason to use tar instead of Archive::Tar?
13:59 salva yes, openssl-1.0.2e.tar.gz contains symlinks pointing to invalid files
13:59 salva Archive::Tar can't handle that
14:00 plicease ah.
14:00 salva On OSs supporting symlinks it just creates the bad symlinks
14:00 salva but on Windows it tries to dereference them
14:01 salva also, Archive::Extract can be instructed to try using binaries (gzip, tar) for decompressing the archive
14:02 salva but in that case, tar returns with an error code and Archive::Extract fails again
14:04 plicease it would be good to be able to do it without tar
14:04 plicease Are you using MinGW for tar?
14:05 salva msys
14:05 salva and msys is required anyway in order to build
14:06 salva so, that is not really an issue
14:08 plicease If you use %c for ./configure then you should get MSYS via Alien::MSYS
14:08 plicease https://metacpan.org/pod/distribution/Alien-Base/lib/Alien/Base/ModuleBuild/API.pod#s
14:08 plicease i didn't realize that tar was included with MSYS though
14:08 salva openssl does not use autoconf
14:09 plicease ah
14:09 salva but a custom script
14:09 plicease misread config as configure
14:09 salva actually the config step could be avoided
14:10 salva it just detects the OS/architecture and call Configure which is a Perl script
14:10 plicease You can also get MSYS via alien_bin_requires
14:10 plicease https://metacpan.org/pod/distribution/Alien-Base/lib/Alien/Base/ModuleBuild/API.pod#alien_bin_requires
14:11 salva well, I am just setting "alien_msys => 1"
14:12 salva that if I understand the code correctly does exactly that when the OS is Windows
14:13 salva ah, you may be looking at the code that manipulates the path, right?
14:14 salva there is an utility windres.exe available from MinGW that is required during the build process
14:14 plicease ah.
14:15 plicease mingw might not be installed though.
14:15 plicease yeah sorry I was looking at this
14:15 plicease https://github.com/salva/p5-Alien-OpenSSL/blob/activestate-perl/Build.PL#L22
14:15 plicease but you are right you are setting alien_msys that is the better way to do it.
14:18 plicease windres comes with strawberry, but your code might find it if you aren't using strawberry.
14:18 salva windres is only used when "config" detects mingw
14:19 salva anyway, at the moment I am just looking into making it work under ActiveState Perl
14:19 salva once I get it working there I would go for Strawberry Perl
14:19 plicease understood.  I'd like it to work under strawberry.
14:19 plicease ideally works in both.
14:20 salva Yes, sure, that's my preferred Perl for Windows
14:20 salva But I am bored of people complained they are unable to get Net::SSH2 to work under ActiveState Perl
14:21 salva so, I am trying to get Alien::OpenSSL, and then an Alien::libssh2 to work there
14:21 plicease yup.  Sounds good!  I think your approach seems reasonable.
14:22 plicease I would support a PR with the name change and documentation.
14:22 salva give me five minutes!
14:23 salva btw, strawberryperl.com is down...
14:24 plicease awesome :P
14:30 plicease Can I ask you about this:
14:30 plicease https://github.com/salva/p5-Alien-OpenSSL/blob/activestate-perl/Build.PL#L69
14:31 plicease there is a bug in AB where staged installs fail on windows
14:31 salva ah, yes
14:31 plicease but it should be fixed soon.
14:31 plicease https://github.com/Perl5-Alien/Alien-Base/pull/139
14:32 plicease openssl may not support movable installs
14:32 plicease if that is the reason then it is reasonable.
14:32 salva as openssl is not just a library, but also a set of utilities I think it is better if it is just configured with the final destination
14:33 salva otherwise the binaries are not going to find them
14:33 plicease np if that is the case it that makes sense.
14:35 salva could you check this patch? https://github.com/salva/p5-Alien-Base/commit/e427abd0024dc5c9e34ef99cce3ba0c59babe4f1
14:36 salva I have an additional petition
14:37 plicease looks reasonable.
14:37 salva would be ok for you to have _env_do_system promoted as a public method?
14:37 salva maybe "alien_system"
14:38 plicease yeah probably a good idea.
14:38 salva I need it for running custom commands with the msys path set
14:39 plicease it would be better to make that a separate PR
14:39 salva ok
14:39 plicease i'm making work for myself because i will be the one who will end up merging it :P
14:40 plicease the old method should be kept.
14:40 plicease I am pretty sure that you aren't the only one using it.
14:40 salva ok
14:41 salva I have submitted the PR
14:43 plicease if you open any PRs on Alien::OpenSSL please @ mention me so that I see it.
14:48 plicease travis likes it.
14:49 salva ok
14:54 plicease at least two other AB devs will have to weigh in but I expect this to be accepted.
14:54 plicease if nobody has commented in a week (which happens sometimes) then I will merge it.
14:54 plicease but it may happen sooner if we get active consensus.
15:05 salva ok
15:06 jberger salva: link?
15:06 salva jberger: link??
15:08 salva what do you mean?
15:14 jberger I meant to the pr, I got it in an e-mail too I was just being lazy
15:14 plicease https://github.com/Perl5-Alien/Alien-Base/pull/142
15:17 jberger Commented
22:04 plicease Any thoughts onhttps://github.com/Perl5-Alien/Alien-Base/pull/143
22:04 plicease https://github.com/Perl5-Alien/Alien-Base/pull/143
22:28 jberger well it shows merge conflicts :-P
22:38 plicease it doesn't conflict when I merge it.
22:39 jberger github does do that on occaison
22:39 jberger :s
22:40 plicease hold on
22:41 plicease sorry I had an out of date master that is why.  It's a trivial documentation conflict that I can do manually once it is accepted.
22:43 jberger ah
22:45 jberger wow that do_system wrapper sure has grown
22:45 plicease er yeah.
22:46 jberger I'm just glad its you and not me :D
22:46 frew joined #native
23:14 plicease in its defense a number of downstream dists are more reliable as a result :)
23:27 jberger plicease++

| Channels | #native index | Today | | Search | Google Search | Plain-Text | summary