Is there any package management system for MinGW+MSYS? - gcc

I am trying to compile some open source libraries in MinGW+MSYS. During the configure phase, I kept seeing some 3rd party libraries are missing.
For now, my solution is to download the source of the missing libraries and follow the GNU build process to compile and install them into my MinGW environment.
Is there any package management system for MinGW+MSYS to install packages easily? Just like apt-get.
I tried the mingw-get for the missing package. But it reports the error below.

mingw-get is the (closest equivalent to apt-get) package manager for MinGW and MSYS. However, it can only manage packages which are actually available for MinGW and/or MSYS, (either because a MinGW developer has built and packaged them, or a member of the MinGW user community has contributed them).
Arbitrarily guessing what packages may be available, and even what their correct package names may be, is unlikely to be productive. Run mingw-get in its GUI mode, (if it's properly installed, just running mingw-get without arguments should start it in this mode), to see a list of packages which are actually available; if you don't see any likely candidates for what you are looking for, then it doesn't (yet) exist. In that case, you will need to either find a non-MinGW alternative build, or build it yourself, from source. (If you choose the latter option, and your build is successful, then you may wish to consider contributing it to MinGW.org).

This works for me as a "package manager".

Install MSYS2. It comes with a package manager called pacman.

Related

When you build llvm from source, how do you install it to your system?

When reading through this:
https://www.llvm.org/docs/CMake.html
It tells you how to install to a target, but it doesn't tell you how to install to the system.
cmake --build . --target install
I am not sure what the target is in this case, nor how to properly configure it so it appears as a standard installation into my ubuntu system, insofar as it would be functionally the same as if I installed the development debian packages, and have it picked up by any other build looking to see if the libraries are installed.
Hence, how do I install all the projects under the llvm suite, from source, into Linux?
That command will install LLVM and all the configured projects (via LLVM_ENABLE_PROJECTS) to whatever location you specified in the first step with the CMAKE_INSTALL_PREFIX variable.
If you did not set it, it takes on a platform-dependent value, most likely /usr/local on Linux. This is an appropriate place to put it. I would discourage you from trespassing on the package manager's territory. Untold misery is likely to result.
A "target" in CMake (and many other build systems) is just "something that must be done". Usually it's "compile something to a file with a corresponding name", but it can also be "run an installation script". CMake creates an install target for that purpose in every project. It's also a popular convention in Make/autotools based build systems.

Installing Aubit4GL via a source package

please tell me how to install Aubit4gl using a source package in windows i.e. I'm looking for windows commands equivalent for ./configure and make install. I can install binary but I particularly want to install from a source package for certain purposes.
Compiling from source on windows is a particularly complicated process involving mingw and collecting all the dependencies etc.
You're much better off grabbing one of the pre-compiled binaries.
I'd be interested to know what the "certain purposes" are that make compiling from source (for windows) a requirement.

Installing Primer3

I need to install Primer3 for my research in Windows, and I really have no idea of how to go about it. I was following the instructions mentioned here.
I'm getting to the part where I need to run
mingw32-make TESTOPTS=--windows
and I keep getting an error saying:
'mingw32-make' is not recognized as an internal or external command,
operable program or batch file.
Just for reference, I went into the minGW Installation manager and got the ming32-make packages, including the bin, doc, lang, and lic ones, because I really had no idea which one was the correct one.
If someone could help me, I would be very grateful! Installing these niche programs without an installation wizard is a challenge!
You will need to install mingw32-make. This is a
Windows of port of GNU Make,
a software-build tool that is supported on all operating systems,
indeed the daddy of such tools.
But make alone will not suffice. To build primer3 you will
need a Windows port of the whole GNU toolchain for building software
from source code. Without that, running make by itself will
just expose the absence of the GCC compiler and linker that it
expects to do its bidding.
This is quite a lot of software, but it is easy and quick to install and there
are several open-source offerings. I suggest you go to TDM GCC
and download the TDM64 bundle. This will give you an executable installer.
Just run it and you will end up with the complete GNU toolchain, including,
mingw32-make, in your chosen installation directory.
It will also install in your Windows launch menu the MinGW command prompt.
Launch this and you will be presented with a Windows commandline console
with its environment set up to find and run any of the GNU tools.
In this console change directory to your primer3-X.Y.Z/test directory
and then run mingw32-make TESTOPTS=--windows as per documentation.
Be forwarned that the self-tests of primer3 that are executed to
verify the build may take 1/2 hr. to 1 hr. to run, depending on your
hardware, but they will finish successfully with the steps I've
described, barring problems specific to your machine. It is a foolproof-simple build.
All the built executables are deposited in the primer3-X.Y.Z/src
directory. You may want to move them somewhere more convenient
in in your PATH.
It does seem oddly amateurish that the documentation simply
directs you to run mingw32-make with no preliminary account of
what that is or how to install it, while on the other hand it
advises that you must install perl and strongly recommends a
specific perl distribution; but evidently primer3 is open-source
scientfic software and its documentation is not bad by the standard
of that genre.

using stackage on windows

I am trying to use stackage on windows. I cloned the git repo, ran cabal install --only-dependencies, cabal configure, cabal build. Everything works
then dist\build\Stackage\stackage.exe select
Loading Haskell Platform
Loading package database
Narrowing package database
Printing build plan to build-plan.log
Checking for bad versions
authenticate-oauth-1.4.0.8 (FP Complete <michael#fpcomplete.com> #yesodweb) cannot use:
- RSA-2.0 -- ==1.2.*
threepenny-gui-0.4.1.0 (FP Complete <michael#fpcomplete.com>) cannot use:
- aeson-0.7.0.2 -- ==0.6.*
stackage.exe: Conflicting build plan, exiting
the readme mention *.sh scripts like ./patching/scripts/create-tarballs.sh. I tried but failed to run them with cygwin. Are they important?
How can I use stackage on windows?
edit I was able to run the ./patching/scripts/create-tarballs.sh script using msys. But now the error message is:
Loading Haskell Platform
Loading package database
stackage.exe: Missing cabal file "MFlow-0.3.3/MFlow.cabal" in tarball: "patching/tarballs\\MFlow-0.3.3.tar.gz"
I checked the archive: the cabal file is inside.
Windows users are not recommended to install stackage by Haskell Platform installer due to some limitation:
On Windows, it does not provide a complete environment (missing MSYS).
By placing a large number of packages in the global package database, Haskell Platform installations are more easily corrupted.
The choice of package versions conflicts with the needs of many commonly used packages.
Some of the package versions included with the platform have known and severe bugs, and cannot be reliably upgraded.
As for solution to overcome, uninstall the Haskell platform first, then install minghc for windows by the following link: https://github.com/fpco/minghc#readme
Open command prompt run cabal update and cabal install alex happy.
Finally, install stackage.
Update 2015
A new tool has been developed by Commercial Haskell group for project development -- Stack, it can be install along with the latest Haskell Platform (7.10.2).
Features include:
Installing GHC automatically, in an isolated location.
Installing packages needed for your project.
Building your project.
Testing your project.
Benchmarking your project.
I have tried it for haskell web project, it works smoothly.

How to check a makefile for dependencies?

I'm trying to install something with the following command:
make world
It takes a long time, and usually it ends up with an error saying that I'm missing some kind of package. I found out what the package is, install it, and run the thing again, only to find out after a long time that I'm missing another package. Is there a way to find out all the packages I need to install without having to go through this process?
This is generally what the configure script does. If the project you're building doesn't have one, you should write one.
The best way to deal with dependencies is with a package manager such as:
On Ubuntu: apt-get
On Red Hat / Fedora: yum
On Mac OS X: port
On Windows: cygwin
If you install software with a package manager, it will automatically fetch, download, and install any dependencies as necessary. These package managers support a huge number of popular open source projects, but not all projects are supported. Some of these package managers support creating custom package repositories, which allows them to be used for dependency management in-house, as well.
Unfortunately, there is no general way to get all the library dependencies of a Makefile (short of grepping for "lib", ".so", and "-l" which may give you spurious results); however, if you are installing an open source project, chances are that it is supported by a package manager on your system.

Resources