Hacker News new | past | comments | ask | show | jobs | submit login
MSYS2: Arch Linux on Microsoft Windows (msys2.github.io)
203 points by g1n016399 on March 2, 2016 | hide | past | favorite | 97 comments



MSYS2 makes Windows be less of a special case for C/C++ software development. You can use all your favorite build tools from Linux, and there is a large and growing library of software you can install with the package manager. It's easy to contribute your own packages or improve existing ones by making pull requests to here:

https://github.com/Alexpux/MINGW-packages


Yes it helps a whole lot. For me the big conceptual leap was about dynamic libraries (linking, loading and organizing it in the file system). Windows and Linux does them differently and organize them differently.


We adopt that. We buck the "Program Files" silliness, and go all-in for FHS layout and shared libraries.


If you don't mind, could you elaborate a little. Not that I could do more than thank and upvote in return. In fact consider those done already.


Ok, I don't know the level of elaboration you are asking for, so apologies if it I go too far.

FHS is just the split up at the top level into bin, lib, include, etc, share as opposed to having a folder called, e.g. MyApplication. Some people hate it, but it allows sharing libraries easily. Apple go for something of a hybrid with Frameworks. MSYS2 goes full Linux-style, even for our mingw-w64 (native) softare. "C:\Program Files\MyApplication" is the complete opposite. No sharing. No good for anyone.

Usually software is configured so that at `make install` time it will pull the DLLs of its dependencies beside its executables on Windows, so that, for example a Qt-based game would be packaged with the Qt DLLs in the same folder as the executable.

On MSYS2 we disable this code-path (ok, build-system code-path) and adopt the Linux path instead, so that our final package contains only the executable and a record to say "I also need the Qt shared libraries package version 5.5-3".

In fact, pacman doesn't allow us to make two packages with the same final files in it since it's a System Package Manager and it disallows such conflicts (unless the packages are marked as conflicting).

The other common thing you'll see with Windows software is people compiling and linking to static libraries because it's safer than DLL hell. It might be safer in that regard, but it's a security nightmare for the user (though they often can't know it), so we don't do that either. Our library packages do tend to come with static libraries, but our executables link to shared libraries by default which are also provided.

This way, when a security issue is found in a library, we don't need to update a load of packages containing executables that linked to that library statically, since none (or very few, some may slip through by mistake) do.


You could say the same about any other OS that isn't GNU/Linux.

Windows isn't the only one non POSIX and even POSIX ones do have substantial differences.


I don't know why my sibling comment is dead, but windows is the only non POSIX and UNIX-like still relevant. May be there is a niche non-UNIX OS that I don't know about?

OS X is POSIX certified, and Linux and BSD are obviously UNIX-like and mostly compliant.

Apart from the precise meaning of POSIX, windows is the only OS in widespread use not part of the UNIX-like family.


There are the embedded and mainframe OSes, but I guess they might be considered niche.

Not so niche are iOS and Android, which aren't fully POSIX compliant.

Then being POSIX compliant is only half of the story, because each OS tends to be certified to specific versions and there is room for implementation specific behaviours.

For example, Aix used to have Windows like model for dynamic libraries. OS X and its derivatives have Frameworks and so on.

Finally POSIX only applications are constrained to CLI and daemons only, as everything else falls outside POSIX.


> Finally POSIX only applications are constrained to CLI and daemons only, as everything else falls outside POSIX.

That is not a small group, especially as it includes your build environment. In Windows, many times I had a problem that I cannot run ./configure (or worse: the package used a home grown build system that assumed unix-y environment; py2cairo, I'm looking at you), not only because of bash/sed/m4/awk/etc, but also not counting with cl.exe (VS compiler).

Side note: OSX has not only frameworks, but also dylibs. You can treat existing framework as dylib, it will link fine.


> That is not a small group, especially as it includes your build environment.

Assuming the build environment is about CLI and daemons as I mentioned.

Anything else isn't guaranteed to work. To pick on your example, Cairo needs more than just POSIX to compile. X11 isn't part of POSIX.

Have you experience with big UNIXes like Aix, Solaris, HP-UX, Tru64 and DG-UX?

It been awhile since I used most of them (1994 - 2006), but I clearly remember surprises with those scripts (autotools and friends) when running them outside GNU/Linux.

Maybe the situation has improved there, since like many of us, my UNIX like experience is nowadays constrained to GNU/Linux distributions and Mac OS X.


Build environment usually is about CLI. Without daemons, abstracting from distcc and similar tools.

X11 for Cairo is optional. As is OpenGL or Win32 GDI. But yes, POSIX as it is, is a very limited API and for practical purposes, you need other APIs.

Yes, I have past experience with DX-UG/Tru64 and Solaris. At the time when Alpha AXP was a current chip, it was a little wonder to get to compile the same source code with different compilers, as they had different ideas about what a valid C code is. For Solaris, the easiest way to build anything was to get gcc instead of sun studio compiler. I think that Sun's GNU packages were built using gcc too.

Nowadays, I don't know about all other unices, because I'm using only Linux and OSX too. From the commonly used OSes, the most annoying to build something on is Windows.


Does it support hardening flags by now? (ASLR etc.)


It does. We build mpv with hardening flags (--dynamicbase, --nxcompat, etc.) and it can build in MSYS2.


Is there any way to summon dang to fix a title? This project uses the Arch Linux package manager, but is otherwise completely unrelated to Arch.


Just because it is a lot of clicks away, here is the introduction in the wiki for MSys2: https://sourceforge.net/p/msys2/wiki/MSYS2%20introduction/

Basically it is mostly POSIX development platform for Window based on cygwin, using the pacman package manager. When I was working on a Windows box oh-so-many-years-ago, I would have loved this. It's too bad that this title is here because I assumed this was running Arch in a container on Windows or some such thing. This is much more useful.


Msys2 is amazing, and everyone should know about and support this project.


I had never heard of it before this. Does it have updated cygwin libraries? The ones in msys are really old and crufty.


Yes, we are very concurrent with Cygwin. We have a modern Github-centric approach to software development and use ArchLinux's Pacman so like them are a rolling software distribution.

We hope that other software projects will use us as their library provider and build enviornment on Windows, as that way it should be easier for them to also keep up to date.

Unlike the old MSYS, we are also 64-bit and that allows using --enable-auto-image-base which means no more needing to rebase your DLLs. Also, Cygwin have made great strides over the many years since MSYS forked from them and it is now both much faster and more standards compliant.

Git-4-Windows is also based on MSYS2 now and some day (hopefully soon) we will fully merge their work (a lot has been merged already) and use their native git executable.


Sorry for the basic questions, but the github page (and SourceForge page) aren't answering all of my beginner's questions...

If Msys2 is Cygwin-derived, does that mean all packages in the Msys2-Pacman are all Cygwin packages? I.e., making this "Cygwin with Pacman as a package manager?"

Does this also mean Msys2 packages can never be more current than Cygwin packages (not that this is a bad thing, but as far as I know Python3 in Cygwin is still < 3.5).

Is the benefit of Msys2 that some packages could be native windows builds instead of Cygwin-dll reliant packages?


This has been answered before.

No, the msys2 repo doesn't follow the Cygwin packaging versions or schedules at all. They are built from the recipes at: https://github.com/Alexpux/MSYS2-packages

.. they link to msys-2.0.dll which is Cygwin derived and are thus GPLed and exist to provide a POSIX-y shell and build tools to allow building:

https://github.com/Alexpux/MINGW-packages

.. which are full of native Windows software under various licenses.


Is there some more documentation on how msys2 relates to mingw somewhere? I recently came across msys2 when half-heartedly trying to compile Darktable[1] for windows 10.

As far as I can tell, msys2 is still posix/GNU for windows, with alternate shell (bash, not powershell etc) and alternate filesystem (posix/gnu-like)? While mingw is/was gnu/posix binaries for windows.

Both have their place -- but I'd be really happy if something akin to msys2 was available more like mingw -- so I could use the (now finally quite usable) standard windows command line along with (hopefully) MS compilers and have some hope of compiling stuff that uses automake etc.

As far as I can figure out, msys2 doesn't (try to) help with that? It's more like a GNU chroot that runs under windows? In which case most/many use-cases might be better served with a vm under VirtualBox/hyper-v[2] and/or a true "native" windows port?

Not meant as criticism of the project, I'm just trying to figure out if I've understood the focus of msys2 correctly.

Finally, for those wishing for "more GNU" on windows, one of the most pleasant discoveries I've made, is the scoop package manager:

http://scoop.sh/

[1] http://www.darktable.org/install/

[2] Especially if/when Vagrant works out of the box with hyper-v -- I'm not quite clear on the current status, but looks like it's been enabled and is included in default Vagrant now: https://www.vagrantup.com/docs/hyperv/index.html


> As far as I can tell, msys2 is still posix/GNU for windows, with alternate shell (bash, not powershell etc) and alternate filesystem (posix/gnu-like)? While mingw is/was gnu/posix binaries for windows

The M in MSYS2 stands for Minimal. Meaning the Cygwin-y part is as small as is necessary to run a shell, bash and autotools to configure and build native Windows software that links to msvcrt.dll with no dependency on the Cygwin derived msys-2.0.dll what-so-ever.

The software built from the recipes here:

https://github.com/Alexpux/MINGW-packages

.. does not link to the GPLed msys-2.0.dll. It is built with mingw-w64 GCC. The focus of the project is to expand that collection of software.


Ok, thank you for the reply. Is there some more documentation on building "complicated" packages somewhere?

Eg. for darktable, one needs libgtk+ and intltool -- as well as a xslt library -- perhaps there's a quick way to leverage what's already done for Arch[1] when attempting to build on windows?

Note, I'm not necessarily expecting such a build to work perfectly -- but if one could at least get to the point where any build-failures where in the darktable source, not from missing essential dependencies -- that'd be a start :-)

> The software built from the recipes here: (...)

So, if I understand correctly, one installs msys2 from the exe-installer, then updates the system with pacman -- and installs packages one wants from the ones in mingw-packages... and then those packages/binaries should/can be added to the normal windows path?

And that last bit one has to do manually? (Lets say I just want grep.exe and sed.exe in my path for example)?

[1] http://redmine.darktable.org/projects/darktable/wiki/Buildin...


The documentation (once you've read about pacman, and makepkg on the wiki or on Arch Linux's wiki) is in the PKGBUILD files. Building all packages should be done with the exact same command, so there's not really any different documentation for "complicated" packages. Just emit:

    makepkg-mingw -s (*)
.. the complication is in the recipes and patches (which hopefully end up being upstreamed, but not often enough).

Darktable won't work without a good amount of effort as AFAICT, no one's built it for Windows. We have most of the dependencies though.

You'd install MSYS2, then pacman -S base-devel and mingw-w64-{x86_64,i686}-toolchain, then not install anything else (*). The -s here means "sync dependencies", sync is pacman speak for install, more or less. By setting up the dependencies in the PKGBUILD correctly, and adding -s to the makepkg-mingw command, you guarantee that you've got it correct for when people install the binaries when it gets to that stage, and that the CI systems fetch the right dependencies when they try to build darktable.

Don't add anything to your Windows PATH. Ever. Why would you break other software by having it run MSYS2 software by mistake? I've never understood software that presumes to add itself to the Windows PATH. Particularly without asking. Really, just what? We don't even ask. When you run our shells we add you to the PATH during that session.

Anyway, that's my global Windows PATH rant over.

I guess that's the bit you didn't get. To use MSYS2, don't use cmd.exe or powershell. Instead, run msys2_shell.bat (to use makepkg_mingw or makepkg), mingw64_shell.bat or mingw32_shell.bat, accept the ways of and use the mintty terminal.

Next you would convert the following PKGBUILD from Arch Linux:

https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=darkt...

.. to MSYS2/mingw-w64 form (look at the roughly 1000 references in MINGW-packages), use pacman -Ss to find the equivalent package name, use makepkg-mingw -s to test.

Good luck. Join #msys2 on OFTC to ask for help.


If I'm understanding it right, this is fantastic! I'm very happy using pacman and AUR with Arch, and having analogous resources for MSYS opens up a whole world of possibilities for running good software on Windows.


Great. MSYS2 please though.


Right. Then I think I had the right idea (of what MSYS2 is/aims to be). I was sort of hoping it was less self-contained - and more integrated with the windows-side.

Thank you for the detailed reply.


I hope you misunderstand slightly still. So msys2 executables - those linked to msys-2.0.dll can be run from Windows executables (or double clicked to launch from Windows Explorer, or pinned to the Start Menu or the Task Bar), for example, you can tell TortoiseGit to use MSYS2's git.exe and it'll work quite well, or Qt Creator to use msys2's msys-2.0.dll linked gdb.exe (as opposed to our mingw-w64-{x86_64,i686}-gdbs that are not). I went to some lengths to make that stuff work correctly. The same applies to MSYS2's mingw-w64 executables.

Both types of executable can also be run from from PowerShell or cmd.exe too of course. In very few cases you may need to add the correct "bin" folder to your PATH before you do so.

If you want to build MSYS2 packages using the build system we've adopted, then you need to use our shell. That is all (and a reasonable requirement).

You can't link (at the C/C++ level) msvcrt.dll linked-executables with Visual Studio > 6.0 executables / libraries and expect things to work properly for anything but the most trivial cases.

These aren't things that MSYS2 imposed though, these are just the realities of inter-operation between GCC and MSVC as they stand at present.


> I hope you misunderstand slightly still.

Maybe I did :-)

Thank you for all your detailed answers.


Thanks for answering! I'll have to check it out. Fortunately I don't spend much time on windows these days, and I had switched to babun from msys because of so many deficiencies in their old cygwin fork.


Babun brings nothing to the table. I hate what they did to the apt-cyg copyright notices. Bad behaviour.


Yea, they track it pretty closely.

See: https://github.com/Alexpux/Cygwin/tree/msys2-master


One thing I do like about msys over cygwin is that compiled binaries don't have a dependency on a dll. If msys2 is using cygwin libraries, does it have the same dependency?


You're wrong about that; mingw doesn't require dependency on the dll, msys does.


Huh?

No. Cygwin depends on a DLL. Mingw does not.

Msys is just a user-land set of tools.


Yep, but those tools rely on a DLL (msys-1.0.dll or msys-2.0.dll,) which is Cygwin by another name. MSYS is not MinGW. Programs like Bash will never run under MinGW because they rely on things like fork(), which are only provided by Unix, Cygwin, or a Cygwin fork like MSYS.


.. ish, there are significant differences. In terms of amount of code, minor, but in terms of behaviour, not so. Mainly, when msys-2.0.dll detects it is calling a native program it translates any arguments that look like paths to Windows form. The same is true for some specific environment variables.


I thought some of the msys tools relied on a cygwin-like DLL for fork().


It has new libs like new GCC etc. However, it's not nearly as usable as arch. Things like vim configs have differences.


You can always update the configuration to better match Arch's and file a pull request against it. Here's the link to the msys2-packages repo for Vim, for example: https://github.com/Alexpux/MSYS2-packages/tree/master/vim

Same build system and everything, it just requires some finagling and copying of the PKGBUILDs.


Indeed, we really want people attached to or passionate about the projects we provide packages for to jump on board. There's loads of interesting work to do, so please consider rolling your sleeves up.


vim configs are often different per-platform anyway. I have an if mac/else block in my gvimrc, since gfn, for example, requires "Font:hSize" on OS X and another type of font selector on Linux-based systems. Things like that are not really new.


How are packages authenticated? I did an evaluation a couple of months ago but decided to drop it when I saw that packages where being pulled over plain HTTP and seemingly no authentication was being preformed.

For software build systems - my use case - this type of security lapse is a deal breaker.


I don't know about msys2, but pacman supports gpg signatures, so all they would need to do (and perhaps have done already) would be to configure it for master keys.

The initial download that includes the master public keys ought to be done over https, of coures.


Yep. MSYS2 uses pacman's support for GPG signatures. The links to the installers on the website don't use HTTPS, but it looks like they've added checksums of the installers to the website itself, which is served over HTTPS.


For what it's worth, pacman does support GPG signature verification, HTTPS, and SHA-256 checksums. There is a GitHub user right now making a bunch of pull requests to MSYS2 to make our PKGBUILD scripts more secure, mostly by using HTTPS and SHA-256 whenever possible.


Cygwin's got some issues about portability, IMHO. When a Cygwin application is run from a shell & terminal emulator other then Cygwin's defaults it throws up an error like:

"cygheap base mismatch detected - 0x612F7400/0x612FB400 This problem is probably due to using incompatible versions of the cygwin DLL. Search for cygwin1.dll using the Windows Start->Find/Search facility and delete all but the most recent version. The most recent version should reside in x:\cygwin\bin, where 'x' is the drive on which you have installed the cygwin distribution. Rebooting is also suggested if you are unable to find another cygwin DLL. Segmentation fault"

It's almost like they're coupled to some particular shell and some particularly configured terminal emulator (Mintty). Cygwin is the historical leader of Linux on Windows but that limitation is never desirable.

MSYS and MSYS2 don't seem to have such a limitation and that's nice.


IMHO you have managed to get into a situation where Windows has been asked to run two different cygwin1.dlls at the same time and Cygwin has detected this. (I recommend using Process Hacker 2 for helping to track down which processes have handles to cygwin1.dll).

This is unfortunately just something you need to manage for yourself.

Cygwin got itself into trouble like this because it never had a good enough package management story (because Windows can't overwrite a currently loaded dll, they didn't attempt a good system package manager, as best I understand it) so developers would end up bundling cygwin1.dll alongside their own executables instead, so there would end up being lots of cygwin1.dlls on a users machine.

The same thing could happen on MSYS2 if you had two MSYS2 environments, however, to get them both in-sync again, you'd just have to do "update-core" in each and that would be that.


MSYS is Cygwin based and so does have the same issue.

As has been mentioned, its a DLL management issue, not inherent to the design of CygWin.


So am I understanding this correctly, but this is not a compatibility layer where we can run native linux applications on windows, instead it's like cygwin where we can run ported applications, only this one uses pacman for distribution of packages?


Correct. The title is definitely misleading. The linked website doesn't even mention Arch Linux at all.


Please read the links on the linked to page. MSYS2 is a rolling software distribution providing software built with the mingw-w64 compilers.

Some of the software is Cygwin-like, but not much, only enough to distribute (and build) the native (mingw-w64) software and provide a shell.


Nope, and apart from virtualisaton there isn't a good story for that.

There was LINE which was superceded by CoLinux. However the 64 bit port of CoLinux was never completed.


Yeah, +1 for this project. Using it to compile cross-platform software (Heimdall) on Windows. Saves me maintaining two project files. Pair this with CLion and you've got yourself a complete cross-platform workflow.


if you already have Linux or OS X running, but just want to compile some stuff for Windows then I'd recommend looking into http://mxe.cc


What specific stuff does mxe add compared with MinGW cross compiler itself?


It makes it easies to use MinGW in Linux and OS X, I guess. I wasn't aware that MinGW worked anywhere other than Windows before I heard of MXE.


Looks like there are two gcc versions, one is msys/gcc which is 4.9 and the other is mingw gcc which is 5.3. For a person like me who doesn't know anything about the differences between cygwin/mingw/msys etc. this is a little bit confusing.


As far as I understand, cygwin/msys gcc compiles and links against cygwin.dll/msys.dll which is a incomplete POSIX emulation on Windows. mingw gcc compiles and links against msvc.dll which is MS c runtime for MS win32 native application.


I love this project. At work we had to make our software run on Windows and MSYS2 makes it feel you're not that far from your confort zone.

Maintainers are really helpful when I sent patches and on IRC, and the software has been running stable for over a year now.

Rock on folks!


is this actually arch linux or pacman + packages ported to windows?

maybe that's the same thing, idk


It's the latter. Arch Linux is Arch Linux.


More GNU software taking over windows is a good thing. Especially when it painlessly handles package management. If I'm ever forced to use a windows machine for work, I'll make sure to install this first.


It's really nice to see the amount of gnome stuff we've got now. And GTK-3 on Windows looks quite pretty I think.


I'll have to check gtk3 on windows out. gtk2 was sad looking on windows compared to Qt and Tk


Would be nice to have a small section explaining what MSYS2 is on that page first.


I tried it recently, didn't work with cmake OOB the way old msys did for me.


pacman -S mingw-w64-{x86_64,i686}-cmake

There's you out of the box. You might have tried pacman -S cmake which will have gotten you the msys/cmake package which is used for building the packages in the msys repo (i.e. those linked to msys-2.0.dll). Having to add the mingw-w64-.. prefix is kind of strange, but you get used to it.


Nope, cmake that was working OOB was installed separately, from https://cmake.org/download

I'll try your suggestion and report back.


Well, we package our own software so we can work around any quirks that our system introduces, but actually generic cmake should work fairly well out of the box.

The difference will the down to path translation. We don't stick to the old MSYS rules precisely as that code was re-written for MSYS2. MSYS2_ARG_CONV_EXCL can be used to prevent specific translations from happening too.

A bug report would be appreciated anyway.


Sure, I'll make a bug report, should it go here?

https://github.com/alexpux/mingw-packages

BTW thing that I was able to compile with old MSYS + cmake from cmake.org, but can't with MSYS2 and mingw-w64-i686-cmake is https://github.com/Absolight/pkcs11-proxy


Yeah, but you need to be clear that it wasn't our cmake build of course.

Generally get used using, asking for and contributing to MSYS2 packages if you can. That way everyone benefits. It's not the norm on Windows, but it very much should be.


Can someone give a good rundown what is improved in MSYS2 vs MSYS/MinGW?


It's too much, honestly, but I'm biased.


how does this compare to the bash emulation that comes with git for windows? https://git-for-windows.github.io/


But isn't that just Bash and a few other tools here and there ?

This is a more complete suit of tools that intends to be sufficient for building any Gnu/Linux/Posix software on a Windows platform. A much more ambitious goal.


Git-4-Windows is a great project, just with a different focus. They contribute a lot to our packages (and Cygwin) too since git (and the shell) drags in quite a lot of stuff.



... but doesn't include pacman


We need to merge our work carefully. Git-4-Windows with pacman and makepkg wouldn't work too well at present, as MSYS2 with a native git wouldn't work too well at present.


Maybe you should mention this on that page then instead of going on and on about pacman when you don't even include it lol


I work on MSYS2, not Git-4-Windows. We come with Pacman included.


The effort for MSYS2 and Git-4-Windows should be merged as one project.


How is fork() implemented?


The same way that Cygwin implements fork (the msys2-runtime is a very light fork of Cygwin):

https://www.cygwin.com/faq.html#faq.api.fork

The packages in the msys2 repository (which, if they link to msys-2.0.dll are all GPL licensed) only really exist to aid building the packages in the mingw32 and mingw64 repositories which don't implement fork() at all and are the real purpose of MSYS2, i.e. providing normal Windows software.

If you want a POSIX-y system, please use Cygwin.


midipix has real fork. It's in alpha http://midipix.org/


midipix is a very interesting project.


what is the benefit for midipix comparing with mxe.cc mentioned above?


real fork is the benefit


Hi totally not topic related but i just created a acc just to ask you rather rudely one thing. Could you tell me how the FPS locking works in MGS Integral? I've found a post of you years back about working on the pc port. I've been hacking away the last few days. managed to make it run semi decent on W10 64b & fullscreen But the frames are locked at 24fps ingame (not 30 as you thought to remember in that post) wish you give me some pointers i have allot more questions. I'd appreciate any form of help. my mail// j j r t 1 9 9 0 AT G mail DOT com


MSYS2 is really nice, but it fails on bigger projects like compiling Blender.


There was a time (around Blender 2.70) when we did provide Blender packages and it did compile (of course, since all our software is built from source) but then llvm dropped JIT around version 3.5 and it became incompatible with OpenShadingLanguage.

We made a choice that we'd rather forge ahead with modern LLVM and Clang (for Rust, Clang-GCC and Julia) than hang back to support Blender. Given our very limited resources, this was still probably the right decision, however, we might have made a choice to create a special llvm35 package at that point, but we had no idea that OpenShadingLanguage would take so long to adapt to MCJIT, which the still haven't done to this day, as far as I know.

The important point here is that MSYS2 is a very open-source, limited resources project. We aren't experts in all packages, so if you are knowledgeable about llvm, OpenShadingLanguage and Blender and are interested to do so, then please help out.

For Blender, getting CUDA support into MSYS2 is probably high up on the priority list too.


Msys2 is a fantastic project with a lot of packages. It saved the day when compiling H3D and even Hugin.

It is a pitty it cannot build latest Abiword/Gnumeric yet. But we have Cygwin for this.

In any case it is a very serious addition to Windows ecosystem and people should start rethinking using Visual Studio which provides no pre-compiled libraries or package management.

However, one ca get a descent alternative development environment by using

msys2/tdm-x64 and fedora precompiled packages.


I have literally no idea why you would even consider combining MSYS2 with TDM-x64 and Fedora precompiled.

Just use MSYS2. It is all that you need. Can you explain why you would do this?


Because I needed libvirt.

I have msys2/mingw64 but for my Golang cgo I have an alternative install

tdm-x86_64 + fedora mingw64 x86_64 packages

I used msys2 to hand compile pkg-config with these packages.

In this respect I have libvirt available to my golang.


It seems we have a libvirt PKGBUILD but no released package. Here is the MSYS2 approach to software development, shamelessly taken from ArchLinux. Could you try this:

    pacman -Ss base-devel mingw-w64-x86_64-toolchain
    git clone https://github.com/Alexpux/MINGW-packages.git
    cd MINGW-packages/mingw-w64-libvirt
    MINGW_INSTALLS=mingw64 makepkg-mingw -s
    pacman -U *pkg*xz
.. and if it doesn't work file a ticket on: https://github.com/Alexpux/MINGW-packages/issues

.. otherwise you should have an MSYS2 libvirt.

even if it does work, file a bug asking that mingw-w64-libvert gets packaged.

You really should not mix binaries from different ecosystems and compilers. I do not know how TDM configure their compilers or how Fedora configures theirs (exception models, C++ ABIs) but it is a risky business and I caution strongly against it. All your packages should be compiled with the same toolchain.

Why would you use TDM compilers anyway? MSYS2 comes with its own: pacman -S mingw-w64-x86_64-toolchain gets you the 64-bit version.


I keep the ecosystems tightly separated. I will try later today and inform you.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: