Dear community, this is my first steps with fpm. I have followed the bootstrapping instructions in the README.md file. Everything works fine (fpm test says: "
~/Fortran/fpm/fpm$ fpm run --runner cp -- ~/.local/bin
cp: cannot create regular file '/home/vmagnin/.local/bin/fpm': Text file busy
As it is the first time I read that error, I have inquired:
https://stackoverflow.com/questions/16764946/what-generates-the-text-file-busy-message-in-unix
Is it because the fpm file tries to modify itself? (which is the objective of the bootstrap if I have understood...)
I am working on Linux Kubuntu 20.10.
Is it because the fpm file tries to modify itself?
Thanks for trying it out and reporting this problem @vmagnin. Yes you're right this is because we're trying to replace the Haskell version while it is running; it looks like this is only possible by unlinking the old executable first which doesn't happen with cp(1).
A possible solution is to update the README to suggest mv(1) instead:
$ fpm run --runner mv -- ~/.local/bin
Thanks @LKedward
your suggestion seems to have done the job, since there is no error message, and now when I launch fpm or fpm --help, the message seems longer with more options. I had not noted the previous version, but this is the version I have after bootstrapping:
~/Fortran/fpm/fpm$ fpm --version
Version: 0.1.3, alpha
Program: fpm(1)
Description: A Fortran package manager and build system
Home Page: https://github.com/fortran-lang/fpm
License: MIT
OS Type: Linux
Most helpful comment
Thanks for trying it out and reporting this problem @vmagnin. Yes you're right this is because we're trying to replace the Haskell version while it is running; it looks like this is only possible by unlinking the old executable first which doesn't happen with
cp(1).A possible solution is to update the README to suggest
mv(1)instead: