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

Can we use VS Build now? #11

Open
genio opened this issue Feb 15, 2023 · 4 comments
Open

Can we use VS Build now? #11

genio opened this issue Feb 15, 2023 · 4 comments
Assignees

Comments

@genio
Copy link
Member

genio commented Feb 15, 2023

My attempts to get Microsoft to allow free use of their C/C++ compiler has led to
https://devblogs.microsoft.com/cppblog/updates-to-visual-studio-build-tools-license-for-c-and-cpp-open-source-projects/

While the wording seems kind of ... I don't know the right words ... it may be that we can stop using MinGW now?

@shawnlaffan thoughts?

@genio genio self-assigned this Feb 15, 2023
@shawnlaffan
Copy link
Contributor

If it all looks reasonable then an experimental VC build could target 5.38 when it is released.

Some general thoughts are below.

Are there any limitations on the redistribution of compiled binaries? I assume not.

If a company builds a non-Open Source product using this system then can they distribute it? Looks like no? Maybe it is their problem if they are making money from it?
https://developercommunity.visualstudio.com/t/CC-compiler-and-linker-free-CLI-only/10042178#T-N10281009

I guess a VS build would enable the use of the VCPKG system for some external libs? However, then there is the effect of VCPKG changes as external libraries are updated or removed. This is the same with homebrew/macports on a mac so is not a novel issue. There might also be redistribution limits under the license.

What is the potential effect on Aliens? Alien::Build has VCPKG and Visual C++ support but I am not sure if it will work out of the box on a VS compiled Strawberry perl. @plicease will have a better sense of this.

Something of a segue from this issue but I think the external libs are now at a sufficient standard to try building a distribution for 5.36 as a minimum viable product check. The libs that are not yet complete have Aliens that could be provided under vendor/lib (libsodium, libproj, cfitsio) while those that have test failures might not be an issue (GDBM). The details of an MVP should go under a separate issue/discussion.

@plicease
Copy link
Contributor

plicease commented Feb 16, 2023

What is the potential effect on Aliens? Alien::Build has VCPKG and Visual C++ support but I am not sure if it will work out of the box on a VS compiled Strawberry perl. @plicease will have a better sense of this.

I've done some testing and development with a VC build of Perl with AB and the Vcpkg plugin, it works quite well and I've been able to build things like are otherwise quite difficult to build with VC Perl like Net::SSLeay. But any AB based Alien needs a Vcpkg aware alienfile to work. This is mainly because most Aliens are geared for pkg-config, and the package names for Vcpkg are of often not the same. The good news is though that the changes typically required to an alienfile are pretty small usually just using the Vcpkg plugin with the correct name.

Another approach worth considering (or even doing in parallel) is to get Vcpkg to add a VC Perl package. They already have a (MinGW based) Strawberry Perl package I think mainly because it is needed for OpenSSL. A proper VC Perl package for Vcpkg could potentially be much more aware and integrated into the Vcpkg ecosystem and they have packages that have already been ported for most things that you could want to use. Caveat: I really don't know CMake well enough to do this myself, and I don't know what appetite there is in the Vcpkg community for something like this.

@genio
Copy link
Member Author

genio commented Feb 16, 2023

@genio
Copy link
Member Author

genio commented Feb 16, 2023

Yes, I think the thing to do at this point is continue with the MinGW build while testing and debugging the VC build

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

No branches or pull requests

3 participants