Description
On my Ubuntu 20.04 machine, I have installed Haskell Stack unpacking the tarball and adding it to my PATH
, as described in the README
. After having cloned the fpm
repository, stack build
failed because I did not have the developers library of gmp
(the package libgmp-dev
, in my case). I have created PR fortran-lang/fpm#97 to add this information to the README
(plus the fix to a trivial typo).
However, I believe that we should provide the user with info to cover far more cases (consider also that my test did not start from a "vanilla" Ubuntu 20.04 and it is likely that I had already some required packages installed without knowing it). Ideally, I think that the following should be covered in the README
:
- packages required for all the major GNU/Linux distributions
- pre-requisites on Windows 8 and 10
- pre-requisites on Apple OSs
Considering that I have no clue on how to action the above points, I wonder if the CI tools could help. (Disclaimer: I only vaguely know what CI is.)
PS: just for the records, I was temporary stopped also by the following error in my attempts to complete stack build
$ stack build
Linking /home/emanuele/.stack/setup-exe-cache/x86_64-linux-tinfo6/tmp-Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.5 ...
clock > configure
clock > Configuring clock-0.8...
clock > build
colour > configure
clock > Preprocessing library for clock-0.8..
clock > Building library for clock-0.8..
clock > [1 of 1] Compiling System.Clock
colour > Configuring colour-2.3.5...
colour > build
file-embed > configure
colour > Preprocessing library for colour-2.3.5..
colour > Building library for colour-2.3.5..
colour > [ 1 of 14] Compiling Data.Colour.CIE.Chromaticity
file-embed > Configuring file-embed-0.0.11.1...
file-embed > build
file-embed > Preprocessing library for file-embed-0.0.11.1..
file-embed > Building library for file-embed-0.0.11.1..
colour > [ 2 of 14] Compiling Data.Colour.CIE.Illuminant
file-embed > [1 of 1] Compiling Data.FileEmbed
colour > [ 3 of 14] Compiling Data.Colour.Chan
colour > [ 4 of 14] Compiling Data.Colour.Internal
colour > [ 5 of 14] Compiling Data.Colour.Matrix
colour > [ 6 of 14] Compiling Data.Colour.RGB
clock > copy/register
clock > Installing library in /home/emanuele/.stack/snapshots/x86_64-linux-tinfo6/49a576afeb5ab2de0c5f11799c421ee126e112c03a2f7d31c3261efc00737d53/8.6.5/lib/x86_64-linux-ghc-8.6.5/clock-0.8-H1S1zDefxirImaRbI6ITNv
clock > Registering library for clock-0.8..
colour > [ 7 of 14] Compiling Data.Colour.RGBSpace.HSL
file-embed > copy/register
file-embed > Installing library in /home/emanuele/.stack/snapshots/x86_64-linux-tinfo6/49a576afeb5ab2de0c5f11799c421ee126e112c03a2f7d31c3261efc00737d53/8.6.5/lib/x86_64-linux-ghc-8.6.5/file-embed-0.0.11.1-1DkjC7VmQhQFLvxtpUIE3o
colour > [ 8 of 14] Compiling Data.Colour.RGBSpace.HSV
colour > [ 9 of 14] Compiling Data.Colour.SRGB.Linear
file-embed > Registering library for file-embed-0.0.11.1..
colour > [10 of 14] Compiling Data.Colour.RGBSpace
colour > [11 of 14] Compiling Data.Colour.SRGB
colour > [12 of 14] Compiling Data.Colour
colour > [13 of 14] Compiling Data.Colour.Names
colour > [14 of 14] Compiling Data.Colour.CIE
colour > copy/register
colour > Installing library in /home/emanuele/.stack/snapshots/x86_64-linux-tinfo6/49a576afeb5ab2de0c5f11799c421ee126e112c03a2f7d31c3261efc00737d53/8.6.5/lib/x86_64-linux-ghc-8.6.5/colour-2.3.5-y0xjV3ONUd40VuBtReEvC
colour > Registering library for colour-2.3.5..
HttpExceptionRequest Request {
host = "casa.fpcomplete.com"
port = 443
secure = True
requestHeaders = []
path = "/v1/pull"
queryString = ""
method = "POST"
proxy = Nothing
rawBody = False
redirectCount = 10
responseTimeout = ResponseTimeoutDefault
requestVersion = HTTP/1.1
}
(ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [AI_ADDRCONFIG], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = <assumed to be undefined>, addrCanonName = <assumed to be undefined>}, host name: Just "casa.fpcomplete.com", service name: Just "443"): does not exist (Try again))
Progress 4/30
but simply running stack build
again solved magically the issue (I don't know what that is).
Activity
certik commentedon Jun 14, 2020
I see, thanks.
We are planning to actually implement the production version of
fpm
in Fortran itself, and distribute it as a binary. So most of these issue will not be issues in the future. But in order to bootstrapfpm
, we will keep the Haskell verison with minimal features (roughly as it is now), so that we can use it to actually develop the Fortran version offpm
.Thanks for submitting this.
ivan-pi commentedon Jun 15, 2020
Was this mentioned somewhere previously? I recall reading it would be done in C++ for performance. If we could set up stdlib to work with the current fpm, and get the necessary string and system routines in stdlib it would be a nice test of the entire project.
LKedward commentedon Jun 15, 2020
Do you mean building stdlib using fpm? I think this is a good short-term goal for fpm - I believe the prerequisites before we can do this are fortran-lang/fpm#78 (preprocessor support) and fortran-lang/fpm#86 (submodules support).
If fpm is implemented in Fortran, then using stdlib for this would also be a good demonstration of stdlib.