Skip Menu |

This queue is for tickets about the Alien-uv CPAN distribution.

Report information
The Basics
Id: 131570
Status: resolved
Priority: 0/
Queue: Alien-uv

People
Owner: Nobody in particular
Requestors: PLICEASE [...] cpan.org
Cc: cwhitener [...] gmail.com
DBOOK [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Please do not use Alien::CMake
Please do not use Alien::CMake. For a share install (if it even works) it downloads a very old version of cmake. It is not reliable. It is not actively developed or maintained. Please instead use Alien::cmake3, which is more reliable, will download a recent version for a share install and is actively maintained. Also, you may not be aware but there is already an Alien which provides libuv called Alien::libuv which has a good track record.
Subject: Re: [rt.cpan.org #131570] Please do not use Alien::CMake
Date: Sun, 26 Jan 2020 13:01:49 +0300
To: bug-Alien-uv [...] rt.cpan.org
From: Олег Пронин <syber.rus [...] gmail.com>
Thank you. I will change it. Alien::uv uses another approach other than Alien::libuv. It uses XS::Install framework. Main differences are: - shared library is built, so all dependencies shares the same library - you dont need to pass various flags (ccflags, libs, etc) by hand. You only say BIN_DEPS => ‘Alien::uv’ And you’re done. And this works recursively also for all children binary modules. - automatic binary incompability protection. вс, 26 янв. 2020 г. в 04:59, Graham Ollis via RT <bug-Alien-uv@rt.cpan.org>: Show quoted text
> Sat Jan 25 20:59:24 2020: Request 131570 was acted upon. > Transaction: Ticket created by PLICEASE > Queue: Alien-uv > Subject: Please do not use Alien::CMake > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: PLICEASE@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=131570 > > > > Please do not use Alien::CMake. For a share install (if it even works) it > downloads a very old version of cmake. It is not reliable. It is not > actively developed or maintained. Please instead use Alien::cmake3, which > is more reliable, will download a recent version for a share install and is > actively maintained. > > Also, you may not be aware but there is already an Alien which provides > libuv called Alien::libuv which has a good track record. >
Subject: Re: [rt.cpan.org #131570] Please do not use Alien::CMake
Date: Sun, 26 Jan 2020 13:03:29 +0300
To: bug-Alien-uv [...] rt.cpan.org
From: Олег Пронин <syber.rus [...] gmail.com>
Maybe it would be better to reupload Alien::CMake and mark it as deprecated somewhere in description or abstract? вс, 26 янв. 2020 г. в 04:59, Graham Ollis via RT <bug-Alien-uv@rt.cpan.org>: Show quoted text
> Sat Jan 25 20:59:24 2020: Request 131570 was acted upon. > Transaction: Ticket created by PLICEASE > Queue: Alien-uv > Subject: Please do not use Alien::CMake > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: PLICEASE@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=131570 > > > > Please do not use Alien::CMake. For a share install (if it even works) it > downloads a very old version of cmake. It is not reliable. It is not > actively developed or maintained. Please instead use Alien::cmake3, which > is more reliable, will download a recent version for a share install and is > actively maintained. > > Also, you may not be aware but there is already an Alien which provides > libuv called Alien::libuv which has a good track record. >
On Sun Jan 26 05:02:09 2020, SYBER wrote: Show quoted text
> - shared library is built, so all dependencies shares the same library
Interesting. It seems as though you are trying to do something similar to Module::CAPIMaker. It might be worth while spending some time collaborating or at least coordinating with the author of that module (or the tool chain folks) to avoid duplication or incompatibilities. This approach means that your Alien becomes a run-time requirement. (Aliens typically are build-only prereqs for XS modules). It also means that installing an upgraded to one of your Aliens with a breaking API change will break all of the XS modules that are depending on it. I can see some advantages for this approach, but I do think it should be decoupled from the Alien concept. Something like Module::CAPIMaker or XS::Install could use an existing Alien to create an XS with dependencies, instead of trying to reproduce what the Alien infrastructure that already exists. A fair amount of thought and experience has gone into creating these tools. As an example, I noticed that Alien::uv, unlike the normal practice of Aliens, does not attempt to use the system libuv. This can be a problem for system integrators (like Debian or Fedora), should they want to create packages of your downstream modules. Show quoted text
> - you dont need to pass various flags (ccflags, libs, etc) by hand.
This is also not necessary with Alien::Base::Wrapper, which works with existing installer ExtUtils::MakeMaker and Module::Build. The Alien-Build infrastructure also works well with other technologies like Inline::C and FFI. Frankly it is sometimes useful to be able to get the cflags and libs from an Alien. Show quoted text
> - automatic binary incompability protection.
After reviewing the XS::Install documentation, I am not exactly sure what you mean by this. I think what you are trying to do is useful and has value, but working with the developers of the existing related technology on CPAN will improve the chances of your tools being useful.
Вск Янв 26 16:16:51 2020, PLICEASE писал: Show quoted text
> On Sun Jan 26 05:02:09 2020, SYBER wrote:
> > - shared library is built, so all dependencies shares the same > > library
> > Interesting. It seems as though you are trying to do something > similar to Module::CAPIMaker. It might be worth while spending some > time collaborating or at least coordinating with the author of that > module (or the tool chain folks) to avoid duplication or > incompatibilities.
Now exactly similar. XS::Install provides way more features. With Module::CAPIMaker i have to write additional strange file with C API (a copy-paste of methods definitions that are externally visible), while XS::Install works like native C infrastructure (it installs all needed header files). It is especially important when writing in C++. XS::Install also automatically propagates all CCFLAGS/ LIBS etc to children Show quoted text
> > This approach means that your Alien becomes a run-time requirement. > (Aliens typically are build-only prereqs for XS modules).
Yes. But i don't see anything bad about it. It saves disk space and memory. Because with static library concept, it will be inside multiple XS modules that use it and it will load to memory several times. Show quoted text
> It also > means that installing an upgraded to one of your Aliens with a > breaking API change will break all of the XS modules that are > depending on it.
Almost all of CPAN XS modules has very simple architecture. They are black boxes that only interact with perl. Our modules uses another approach. For example there is URI::XS and Date fast frameworks. On one hand they expose their functionality to perl as usual. On the other hand, Unievent::HTTP (not yet on cpan) uses them both in it's API and receive those objects to its functions (URI::XS and Date has "xs/uri.h" and "xs/date.h" which exposes shared typemaps for other XS modules). for example my $uri = URI:XS->new("....."); # a C++ object hidden behind perl's magic my $request = UniEvent::HTTP::Request->new( ... uri => $uri, ... ); XS function UniEvent::HTTP::Request::new receives uri as C++ object via typemaps auto uri = xs::in<URI*>(sv); UE::HTTP works with C++ framework URI directly and therefore has no penalty on perl-C-perl interaction. This approach is very important for achieving extremely high speeds. For example it is hundred times faster than Starman and even faster than plain NGINX. and the same for UniEvent::WebSocket and so on. XS::Install and XS::Framework together has a huge support for building such architectures. And it is a superset, more general and more C-native way than Module::CAPIMaker offers. So as you share the same objects between different XS modules, they HAVE to use shared libraries. To protect yourself from various hard-to-debug SIGSEGVs caused by updating some parent to a new version, there is a binary compability protection feature (see below). Show quoted text
> > I can see some advantages for this approach, but I do think it should > be decoupled from the Alien concept. Something like Module::CAPIMaker > or XS::Install could use an existing Alien to create an XS with > dependencies, instead of trying to reproduce what the Alien > infrastructure that already exists. A fair amount of thought and > experience has gone into creating these tools.
We could in theory use Alien::libuv to create module, but only for something like Alien::uv )) Because C objects created in one XS module can easily be passed to another XS module, it is required that libuv is shared library. For example consider 2 XS modules Libuv::Adapter (exposes libuv interface to perl) Libuv::Plugin (some addon that does something to libuv objects) Because both are built against libuv, and objects created in Libuv::Adapter are passed to Libuv::Plugin, libuv has to be a shared library. Otherwise binary incompability would occur if they are built again different versions of libuv So we anyway need something like Alien::uv that builds and make available libuv.so Show quoted text
> > As an example, I noticed that Alien::uv, unlike the normal practice of > Aliens, does not attempt to use the system libuv.
Yes this is a must-have feature, that we didn't implement yet. I planned to add it soon. If you want to expel us from Alien::* namespace we could of course move to another namespace. But i chose Alien:: namespace because it logically seems ok (it provides access to external library) Show quoted text
> This can be a > problem for system integrators (like Debian or Fedora), should they > want to create packages of your downstream modules. >
> > - you dont need to pass various flags (ccflags, libs, etc) by hand.
> > This is also not necessary with Alien::Base::Wrapper, which works with > existing installer ExtUtils::MakeMaker and Module::Build. The Alien- > Build infrastructure also works well with other technologies like > Inline::C and FFI. Frankly it is sometimes useful to be able to get > the cflags and libs from an Alien. >
> > - automatic binary incompability protection.
> > After reviewing the XS::Install documentation, I am not exactly sure > what you mean by this.
I'll explain with example: i installed Alien::uv version 1.28 then i installed libuv::adapter everything's ok. and then i update Alien::uv to 1.29 while doing this i'll get a warning: ****************************************************************************** XS::Install: There are XS modules that binary depend on current XS module Alien::uv. They were built with currently installed Alien::uv version 1.28.0.5. If you install Alien::uv version 1.29.0.5, you will have to reinstall all XS modules that binary depend on it: cpanm -f Panda::W Panda::X Panda::X::Front UniEvent UniEvent::HTTP UniEvent::Socks UniEvent::WebSocket ****************************************************************************** (Unfortunately i haven't found any API in CPAN that would make that "rebuild" occur automatically) And even if i ignore that warning and try to run my software after upgrading Alien::libuv and not rebuilding libuv::adapter, i'll get on startup: DB<1> use UniEvent ****************************************************************************** XS::Loader: XS module UniEvent binary depends on XS module Alien::uv. UniEvent was compiled with Alien::uv version 1.28.0.5, but current version is 1.29.0.5. Please reinstall all modules that binary depend on Alien::uv: cpanm -f Panda::W Panda::X Panda::X::Front UniEvent UniEvent::HTTP UniEvent::Socks UniEvent::WebSocket ****************************************************************************** Compilation failed in require at (eval 13)[/home/syber/perl5/perlbrew/perls/5.30.0dm/lib/5.30.0/perl5db.pl:738] line 2. Show quoted text
> > I think what you are trying to do is useful and has value, but working > with the developers of the existing related technology on CPAN will > improve the chances of your tools being useful.
On Mon Jan 27 11:42:10 2020, SYBER wrote: Show quoted text
> Now exactly similar. XS::Install provides way more features. With > Module::CAPIMaker i have to write additional strange file with C API > (a copy-paste of methods definitions that are externally visible), > while XS::Install works like native C infrastructure (it installs all > needed header files). It is especially important when writing in C++.
My point was Module::CAPIMaker or core XS could probably be extended to support at least some probably all those features. Putting some of this tech in upstream XS would probably be a greater benefit to everyone and increase the likelihood of adoption. Show quoted text
> Yes. But i don't see anything bad about it. It saves disk space and > memory. Because with static library concept, it will be inside > multiple XS modules that use it and it will load to memory several > times.
Since Aliens are normally a build-time prereq they don't need to be installed if you are really worried about disk space. Although it's 2020, disk space is cheap and this seems to be an unnecessary optimization. As for saving memory, there is nothing stopping you from using your XSI tech with a conventional Alien. Show quoted text
> Almost all of CPAN XS modules has very simple architecture. They are > black boxes that only interact with perl.
Er. I don't think you can guarantee that the libuv api will not ever have any breaking changes. I don't really think its true for XS either. But okay. Show quoted text
> Our modules uses another approach. > > For example there is URI::XS and Date fast frameworks. On one hand > they expose their functionality to perl as usual. On the other hand, > Unievent::HTTP (not yet on cpan) uses them both in it's API and > receive those objects to its functions (URI::XS and Date has > "xs/uri.h" and "xs/date.h" which exposes shared typemaps for other XS > modules). > > for example > my $uri = URI:XS->new("....."); # a C++ object hidden behind perl's > magic > my $request = UniEvent::HTTP::Request->new( > ... > uri => $uri, > ... > ); > > XS function UniEvent::HTTP::Request::new receives uri as C++ object > via typemaps > > auto uri = xs::in<URI*>(sv); > > UE::HTTP works with C++ framework URI directly and therefore has no > penalty on perl-C-perl interaction. This approach is very important > for achieving extremely high speeds. > > For example it is hundred times faster than Starman and even faster > than plain NGINX. > > and the same for UniEvent::WebSocket and so on. > > XS::Install and XS::Framework together has a huge support for building > such architectures. And it is a superset, more general and more C- > native way than Module::CAPIMaker offers. > > So as you share the same objects between different XS modules, they > HAVE to use shared libraries. To protect yourself from various hard- > to-debug SIGSEGVs caused by updating some parent to a new version, > there is a binary compability protection feature (see below).
Cool. This has a lot to do with XS and not a lot to do with the Alien concept though. Show quoted text
> So we anyway need something like Alien::uv that builds and make > available libuv.so
Alien::uv builds libuv as a .a and then links it into the XS .so. There is no reason you couldn't use Alien::libuv and save yourself the trouble of reimplementing what Alien::libuv already does. Show quoted text
> Yes this is a must-have feature, that we didn't implement yet. I > planned to add it soon.
I emplor you to do some research into the existing tech instead of going off and reinventing wheels here. The Alien-Build system was designed specifically to be installer agnostic, which is why it works equally well with EUMM or MB, or non-installer tech like Inline::C and FFI. Alien::libuv already does all of this precisely because it does build on stuff that already works. I am happy to extend the Alien-Build system if there is something that you think XSI needs. Show quoted text
> If you want to expel us from Alien::* namespace we could of course > move to another namespace. But i chose Alien:: namespace because it > logically seems ok (it provides access to external library)
I think in the very least Alien::uv et al should be clearly marked as something which does not work with the mainstream installer tools EUMM and MB. It is also a good practice to include a SEE ALSO section when there might be confusion about what the differences between your module and existing modules that provide similar or related functionality (ie SEE ALSO Alien::libuv which works with EUMM etc). And yeah, I think that something in the dist name should probably distinguish it from conventional Aliens which work with mainstream installers. Maybe as a compromise a prefix like Alien::XSI::uv would be suitable. Or maybe a suffix like UV::XSI (using a standard suffix like XSI or something similar would also distinguish it from mainstream XS, and could be a good branding opportunity). Show quoted text
> I'll explain with example: > > i installed Alien::uv version 1.28 > then i installed libuv::adapter > > everything's ok. > > and then i update Alien::uv to 1.29 > while doing this i'll get a warning: > > ****************************************************************************** > XS::Install: There are XS modules that binary depend on current XS > module Alien::uv. > They were built with currently installed Alien::uv version 1.28.0.5. > If you install Alien::uv version 1.29.0.5, you will have to reinstall > all XS modules that binary depend on it: > cpanm -f Panda::W Panda::X Panda::X::Front UniEvent UniEvent::HTTP > UniEvent::Socks UniEvent::WebSocket > ****************************************************************************** > > (Unfortunately i haven't found any API in CPAN that would make that > "rebuild" occur automatically) > > And even if i ignore that warning and try to run my software after > upgrading Alien::libuv and not rebuilding libuv::adapter, > > i'll get on startup: > > DB<1> use UniEvent > ****************************************************************************** > XS::Loader: XS module UniEvent binary depends on XS module Alien::uv. > UniEvent was compiled with Alien::uv version 1.28.0.5, but current > version is 1.29.0.5. > Please reinstall all modules that binary depend on Alien::uv: > cpanm -f Panda::W Panda::X Panda::X::Front UniEvent UniEvent::HTTP > UniEvent::Socks UniEvent::WebSocket > ****************************************************************************** > Compilation failed in require at (eval > 13)[/home/syber/perl5/perlbrew/perls/5.30.0dm/lib/5.30.0/perl5db.pl:738] > line 2.
Neat. It doesn't have anything to do with the Alien concept, and it seems like this would be useful in upstream XS.
Втр Янв 28 00:58:34 2020, PLICEASE писал: Show quoted text
> On Mon Jan 27 11:42:10 2020, SYBER wrote:
> > Now exactly similar. XS::Install provides way more features. With > > Module::CAPIMaker i have to write additional strange file with C API > > (a copy-paste of methods definitions that are externally visible), > > while XS::Install works like native C infrastructure (it installs all > > needed header files). It is especially important when writing in C++.
> > My point was Module::CAPIMaker or core XS could probably be extended > to support at least some probably all those features. Putting some of > this tech in upstream XS would probably be a greater benefit to > everyone and increase the likelihood of adoption. >
> > Yes. But i don't see anything bad about it. It saves disk space and > > memory. Because with static library concept, it will be inside > > multiple XS modules that use it and it will load to memory several > > times.
> > Since Aliens are normally a build-time prereq they don't need to be > installed if you are really worried about disk space. Although it's > 2020, disk space is cheap and this seems to be an unnecessary > optimization. As for saving memory, there is nothing stopping you > from using your XSI tech with a conventional Alien. >
> > Almost all of CPAN XS modules has very simple architecture. They are > > black boxes that only interact with perl.
> > Er. I don't think you can guarantee that the libuv api will not ever > have any breaking changes. I don't really think its true for XS > either. But okay. >
> > Our modules uses another approach. > > > > For example there is URI::XS and Date fast frameworks. On one hand > > they expose their functionality to perl as usual. On the other hand, > > Unievent::HTTP (not yet on cpan) uses them both in it's API and > > receive those objects to its functions (URI::XS and Date has > > "xs/uri.h" and "xs/date.h" which exposes shared typemaps for other XS > > modules). > > > > for example > > my $uri = URI:XS->new("....."); # a C++ object hidden behind perl's > > magic > > my $request = UniEvent::HTTP::Request->new( > > ... > > uri => $uri, > > ... > > ); > > > > XS function UniEvent::HTTP::Request::new receives uri as C++ object > > via typemaps > > > > auto uri = xs::in<URI*>(sv); > > > > UE::HTTP works with C++ framework URI directly and therefore has no > > penalty on perl-C-perl interaction. This approach is very important > > for achieving extremely high speeds. > > > > For example it is hundred times faster than Starman and even faster > > than plain NGINX. > > > > and the same for UniEvent::WebSocket and so on. > > > > XS::Install and XS::Framework together has a huge support for > > building > > such architectures. And it is a superset, more general and more C- > > native way than Module::CAPIMaker offers. > > > > So as you share the same objects between different XS modules, they > > HAVE to use shared libraries. To protect yourself from various hard- > > to-debug SIGSEGVs caused by updating some parent to a new version, > > there is a binary compability protection feature (see below).
> > Cool. This has a lot to do with XS and not a lot to do with the Alien > concept though. >
> > So we anyway need something like Alien::uv that builds and make > > available libuv.so
> > Alien::uv builds libuv as a .a and then links it into the XS .so. > There is no reason you couldn't use Alien::libuv and save yourself the > trouble of reimplementing what Alien::libuv already does.
Yeah, it is possible. Show quoted text
>
> > Yes this is a must-have feature, that we didn't implement yet. I > > planned to add it soon.
> > I emplor you to do some research into the existing tech instead of > going off and reinventing wheels here. The Alien-Build system was > designed specifically to be installer agnostic, which is why it works > equally well with EUMM or MB, or non-installer tech like Inline::C and > FFI. Alien::libuv already does all of this precisely because it does > build on stuff that already works. I am happy to extend the Alien- > Build system if there is something that you think XSI needs.
By saying "i planned to add it" i meant looking some module like plugin pkgconfig or whatever on CPAN which does the work) Show quoted text
>
> > If you want to expel us from Alien::* namespace we could of course > > move to another namespace. But i chose Alien:: namespace because it > > logically seems ok (it provides access to external library)
> > I think in the very least Alien::uv et al should be clearly marked as > something which does not work with the mainstream installer tools EUMM > and MB.
It indeed works with EUMM. With alien, you ask params from Alien module and then passes it manually to installer. And you need to have alien installed in order to do that. The same with XSI. You need it to be installed. The only difference is with XS::Install you don't pass it manually, instead you call it's own write_makefile function, and it changes the params and passes it to EUMM. However it has second API where you can just pass EUMM params to XSI and get tuned params back. And then pass it manually where you want. It is also a good practice to include a SEE ALSO section when Show quoted text
> there might be confusion about what the differences between your > module and existing modules that provide similar or related > functionality (ie SEE ALSO Alien::libuv which works with EUMM etc). > And yeah, I think that something in the dist name should probably > distinguish it from conventional Aliens which work with mainstream > installers. Maybe as a compromise a prefix like Alien::XSI::uv would > be suitable. Or maybe a suffix like UV::XSI (using a standard suffix > like XSI or something similar would also distinguish it from > mainstream XS, and could be a good branding opportunity). >
> > I'll explain with example: > > > > i installed Alien::uv version 1.28 > > then i installed libuv::adapter > > > > everything's ok. > > > > and then i update Alien::uv to 1.29 > > while doing this i'll get a warning: > > > > ****************************************************************************** > > XS::Install: There are XS modules that binary depend on current XS > > module Alien::uv. > > They were built with currently installed Alien::uv version 1.28.0.5. > > If you install Alien::uv version 1.29.0.5, you will have to reinstall > > all XS modules that binary depend on it: > > cpanm -f Panda::W Panda::X Panda::X::Front UniEvent UniEvent::HTTP > > UniEvent::Socks UniEvent::WebSocket > > ****************************************************************************** > > > > (Unfortunately i haven't found any API in CPAN that would make that > > "rebuild" occur automatically) > > > > And even if i ignore that warning and try to run my software after > > upgrading Alien::libuv and not rebuilding libuv::adapter, > > > > i'll get on startup: > > > > DB<1> use UniEvent > > ****************************************************************************** > > XS::Loader: XS module UniEvent binary depends on XS module Alien::uv. > > UniEvent was compiled with Alien::uv version 1.28.0.5, but current > > version is 1.29.0.5. > > Please reinstall all modules that binary depend on Alien::uv: > > cpanm -f Panda::W Panda::X Panda::X::Front UniEvent UniEvent::HTTP > > UniEvent::Socks UniEvent::WebSocket > > ****************************************************************************** > > Compilation failed in require at (eval > > 13)[/home/syber/perl5/perlbrew/perls/5.30.0dm/lib/5.30.0/perl5db.pl:738] > > line 2.
> > Neat. It doesn't have anything to do with the Alien concept, and it > seems like this would be useful in upstream XS.
In order to not confuse you or anybody else i'd suggest we move to Shared::* or External::* namespace. And technically i can use Alien::xxx to use static library to build shared one. However for libraries that are not currently exist in Alien::*, i would not make an Alien module because i'm scared of how MUCH code every Alien's Makefile.PL + alienfile has (several screens of code). In XSI we're having only several lines and maybe a couple more will appear for checking presence if shared library in OS.
On Tue Jan 28 08:03:08 2020, SYBER wrote: Show quoted text
> However for > libraries that are not currently exist in Alien::*, i would not make > an Alien module because i'm scared of how MUCH code every Alien's > Makefile.PL + alienfile has (several screens of code). In XSI we're > having only several lines and maybe a couple more will appear for > checking presence if shared library in OS.
I think you have just been looking at the overcomplex examples. Before all of the special cases a library may need, all you need is something like https://metacpan.org/source/DBOOK/Alien-cmark-0.005/alienfile, and the additions to Makefile.PL or whatever installer you use are completely trivial. -Dan
On Tue Jan 28 11:33:40 2020, DBOOK wrote: Show quoted text
> I think you have just been looking at the overcomplex examples. Before > all of the special cases a library may need, all you need is something > like https://metacpan.org/source/DBOOK/Alien-cmark-0.005/alienfile, > and the additions to Makefile.PL or whatever installer you use are > completely trivial.
That is a great example. I tend to be very aggressive about supporting weird edge cases and as many platforms as possible... which yeah adds some complexity that can't entirely be abstracted into the Alien-Build core. The Alien-Build distro also comes with very simple alienfiles with detailed comments to explain what they are doing. https://github.com/Perl5-Alien/Alien-Build/tree/master/example I also take your point about the simplicity of the interface of just declaring a single dependency once so I've created a ticket to improve the Alien::Base::Wrapper interface to make it easier for users who are manually writing their own Makefile.PL. https://github.com/Perl5-Alien/Alien-Build/issues/157 You mentioned using the appropriate pkg-config plugin on CPAN, and there are a lot of options, but there aren't any that work as reliably in as many weird environments as the Alien-Build pkg-config interface. (again, I am aggressive about supporting weird edge cases and as many platforms as possible). If any of this is scary or seems confusing there are some good support channels that you can use. I am very response to the github issue tracker, there is a mailing list and the #native channel on irc.perl.org is low volume but active and responsive.
Subject: Re: [rt.cpan.org #131570] Please do not use Alien::CMake
Date: Wed, 29 Jan 2020 13:24:27 +0300
To: bug-Alien-uv [...] rt.cpan.org
From: Олег Пронин <syber.rus [...] gmail.com>
Thanks for your explanations, Graham. I appreciate it. Yesterday i noticed that Alien::libuv fails on systems other than freebsd&linux. Is anyone aware of it? our alien-uv installs on bsd/linux, solaris, mac, winxp, win10 without problems вт, 28 янв. 2020 г. в 20:31, Graham Ollis via RT <bug-Alien-uv@rt.cpan.org>: Show quoted text
> Queue: Alien-uv > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=131570 > > > On Tue Jan 28 11:33:40 2020, DBOOK wrote:
> > I think you have just been looking at the overcomplex examples. Before > > all of the special cases a library may need, all you need is something > > like https://metacpan.org/source/DBOOK/Alien-cmark-0.005/alienfile, > > and the additions to Makefile.PL or whatever installer you use are > > completely trivial.
> > That is a great example. > > I tend to be very aggressive about supporting weird edge cases and as many > platforms as possible... which yeah adds some complexity that can't > entirely be abstracted into the Alien-Build core. The Alien-Build distro > also comes with very simple alienfiles with detailed comments to explain > what they are doing. > > https://github.com/Perl5-Alien/Alien-Build/tree/master/example > > I also take your point about the simplicity of the interface of just > declaring a single dependency once so I've created a ticket to improve the > Alien::Base::Wrapper interface to make it easier for users who are manually > writing their own Makefile.PL. > > https://github.com/Perl5-Alien/Alien-Build/issues/157 > > You mentioned using the appropriate pkg-config plugin on CPAN, and there > are a lot of options, but there aren't any that work as reliably in as many > weird environments as the Alien-Build pkg-config interface. (again, I am > aggressive about supporting weird edge cases and as many platforms as > possible). > > If any of this is scary or seems confusing there are some good support > channels that you can use. I am very response to the github issue tracker, > there is a mailing list and the #native channel on irc.perl.org is low > volume but active and responsive. >
On Wed Jan 29 05:24:49 2020, SYBER wrote: Show quoted text
> Thanks for your explanations, Graham. I appreciate it. > > Yesterday i noticed that Alien::libuv fails on systems other than > freebsd&linux. Is anyone aware of it? > > our alien-uv installs on bsd/linux, solaris, mac, winxp, win10 without > problems
I know that Alien::libuv doesn't support Windows XP. Neither does the upstream libuv though (or cmake for that matter). Are you sure that Alien::uv actually works on older MSWin32? failures here: http://www.cpantesters.org/cpan/report/8d9d7011-6bf8-1014-92ac-fdb0929fb1c9 It does install cleanly for me on my mac and windows 10 boxs. I don't have a solaris box to test with anymore. The failures on cpantesters for these platforms seem to be test failures, so it is possible that there is something wrong with Alien::libuv, or it is possible they are uncovering a bug in that platform that Alien::uv is missing since it has a much simpler test suite. The author or Alien::libuv may know more I will check with him.
Срд Янв 29 08:37:39 2020, PLICEASE писал: Show quoted text
> On Wed Jan 29 05:24:49 2020, SYBER wrote:
> > Thanks for your explanations, Graham. I appreciate it. > > > > Yesterday i noticed that Alien::libuv fails on systems other than > > freebsd&linux. Is anyone aware of it? > > > > our alien-uv installs on bsd/linux, solaris, mac, winxp, win10 > > without > > problems
> > I know that Alien::libuv doesn't support Windows XP. Neither does the > upstream libuv though (or cmake for that matter). Are you sure that > Alien::uv actually works on older MSWin32? failures here: > > http://www.cpantesters.org/cpan/report/8d9d7011-6bf8-1014-92ac- > fdb0929fb1c9
Nope, sorry. It fails on WinXP. I mistaken. However it successfully installs on Win10. For Alien::libuv i see fails for Win10 on cpantesters. Show quoted text
> > It does install cleanly for me on my mac and windows 10 boxs. I don't > have a solaris box to test with anymore. The failures on cpantesters > for these platforms seem to be test failures, so it is possible that > there is something wrong with Alien::libuv, or it is possible they are > uncovering a bug in that platform that Alien::uv is missing since it > has a much simpler test suite. The author or Alien::libuv may know > more I will check with him.
Installation on WinXP does not work as upstream libuv does not work on WinXP. Also, WinXP is long EOLed and any effort to get anything to work on that platform is just wasted time. Installation on Win10 works without problem. Part of the reason it works at all on Win10 is because the test suite on Windows is completely turned off (libuv itself has broken tests on the platform) https://metacpan.org/source/CAPOEIRAB/Alien-libuv-1.012/alienfile#L33 Unfortunately, most testers contributing to the testers matrix use WinXP still. This is a constant thorn in my side as it makes it appear as if the library doesn't work on Windows. That's just not true. Installation on other platforms, such as Solaris and NetBSD, are again not in the Supported Platforms for libuv: https://github.com/libuv/libuv/blob/v1.x/SUPPORTED_PLATFORMS.md However, I'm not doing anything at all to prevent installation on those platforms other than running make check so that libuv's own tests are run after compilation. I know certain key members maintaining NetBSD are working to get it behaving on current versions of NetBSD, but that testers matrix does not have anyone testing on the latest NetBSD, so it appears all fail. Look into each failure. The testers matrix is a bit misleading here. In short, libuv itself will compile and install on any machine currently listed in the supported platforms matrix. It will also install cleanly on a few more as the upstream tests are turned off (Windows). It definitely installs on Mac, FreeBSD, Linux, and Windows. If you find that you can make it install on another OS, please let me know and I'll be happy to alter the install script or send it upstream to libuv. -- Chase
Subject: Re: [rt.cpan.org #131570] Please do not use Alien::CMake
Date: Wed, 29 Jan 2020 17:18:28 +0300
To: bug-Alien-uv [...] rt.cpan.org
From: Олег Пронин <syber.rus [...] gmail.com>
For example, this one is a fail on Win10 http://service.crazypanda.ru/v/monosnap/2020-01-29-17-17-24-mc7fp.png ср, 29 янв. 2020 г. в 16:55, Chase Whitener via RT <bug-Alien-uv@rt.cpan.org Show quoted text
>:
Show quoted text
> Queue: Alien-uv > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=131570 > > > Installation on WinXP does not work as upstream libuv does not work on > WinXP. Also, WinXP is long EOLed and any effort to get anything to work on > that platform is just wasted time. > > Installation on Win10 works without problem. Part of the reason it works > at all on Win10 is because the test suite on Windows is completely turned > off (libuv itself has broken tests on the platform) > https://metacpan.org/source/CAPOEIRAB/Alien-libuv-1.012/alienfile#L33 > > Unfortunately, most testers contributing to the testers matrix use WinXP > still. This is a constant thorn in my side as it makes it appear as if the > library doesn't work on Windows. That's just not true. > > Installation on other platforms, such as Solaris and NetBSD, are again not > in the Supported Platforms for libuv: > https://github.com/libuv/libuv/blob/v1.x/SUPPORTED_PLATFORMS.md However, > I'm not doing anything at all to prevent installation on those platforms > other than running make check so that libuv's own tests are run after > compilation. I know certain key members maintaining NetBSD are working to > get it behaving on current versions of NetBSD, but that testers matrix does > not have anyone testing on the latest NetBSD, so it appears all fail. Look > into each failure. The testers matrix is a bit misleading here. > > In short, libuv itself will compile and install on any machine currently > listed in the supported platforms matrix. It will also install cleanly on a > few more as the upstream tests are turned off (Windows). > > It definitely installs on Mac, FreeBSD, Linux, and Windows. > > If you find that you can make it install on another OS, please let me know > and I'll be happy to alter the install script or send it upstream to libuv. > > -- Chase > > >
On Wed Jan 29 09:18:50 2020, SYBER wrote: Show quoted text
> For example, this one is a fail on Win10 > > http://service.crazypanda.ru/v/monosnap/2020-01-29-17-17-24-mc7fp.png
I suspect that version is misreported, or might be the OS that was used to build Windows. https://metacpan.org/source/CAPOEIRAB/Alien-libuv-1.012/Makefile.PL#L13-24 On my windows 10 machine I get this: F:\>perl -MWin32 -E "say [Win32::GetOSVersion()]->[1]" 10
On Wed Jan 29 09:58:14 2020, PLICEASE wrote: Show quoted text
> I suspect that version is misreported, or might be the OS that was > used to build Windows.
sorry should have read: used to build Perl.
On Wed Jan 29 09:18:50 2020, SYBER wrote: Show quoted text
> For example, this one is a fail on Win10 > > http://service.crazypanda.ru/v/monosnap/2020-01-29-17-17-24-mc7fp.png >
Right. That is a WinXP machine. If you look at the report, it shows that it's on WinXP. The version of Perl it is using was _built_ using Windows 10. That column is a bit misleading. We can't just trust what's in Config.pm here. We actually have to check it using the Win32 API to find out the actual host's OS version. Hope that helps.
Срд Янв 29 10:04:18 2020, CAPOEIRAB писал: Show quoted text
> On Wed Jan 29 09:18:50 2020, SYBER wrote:
> > For example, this one is a fail on Win10 > > > > http://service.crazypanda.ru/v/monosnap/2020-01-29-17-17-24-mc7fp.png > >
> > > Right. That is a WinXP machine. If you look at the report, it shows > that it's on WinXP. The version of Perl it is using was _built_ using > Windows 10. That column is a bit misleading. We can't just trust > what's in Config.pm here. We actually have to check it using the Win32 > API to find out the actual host's OS version. > > Hope that helps.
Thanks for the explanations!
We're completely moved out of Alien::* namespace, so that the issue is no longer an issue)