fortran-lang / fpm

Fortran Package Manager (fpm)
https://fpm.fortran-lang.org
MIT License
884 stars 99 forks source link

Docs: manual bootstrapping via single source warning and error #770

Open rjzak opened 2 years ago

rjzak commented 2 years ago

Description

$ gfortran -J _tmp _tmp/fpm-0.6.0.F90 -o _tmp/fpm
/bin/ld: /tmp/ccbWJt90.o: in function `__fpm_filesystem_MOD_get_temp_filename':
fpm-0.6.0.F90:(.text+0x5fa14): warning: the use of `tempnam' is dangerous, better use `mkstemp'

$ ./_tmp/fpm install --flag "-g -fbacktrace -O3"
<ERROR>'fpm.toml' could not be found, check if the file exists
STOP 1

Using the install.sh script worked perfectly.

Expected Behaviour

I expected it to compile cleanly, and for FPM to be able to do the install without needing the .toml file when installing itself.

I suspect this is just a documentation issue, not a code issue.

Version of fpm

N/A

Platform and Architecture

Void Linux on powerpc64le

Additional Information

No response

SRAZKVT commented 2 years ago

the fpm install command won't work on the single file, you need to run it in the project (there is a zip in the releases tab which you can use)

rjzak commented 2 years ago

Ahh I see. That wasn't clear from the readme. It seemed that the single file release had everything needed. Seems that wasn't the case. So maybe the single file release isn't needed?

SRAZKVT commented 2 years ago

the single file is needed to create a temporary bootstrapping build of fpm, which will be used in the final build (i.e. you build fpm twice)