Skip to content

Bugs encountered when trying to bootstrap with intel ifort 2021.7 #772

@rweed

Description

@rweed

Description

It appears that with ifort 2021.7 the word "unix" is predefined as a macro. Therefore in functions like os_is_linux and other places where the word "unix" is used. It is reset by the pre-processor to "1". ie.

logical function os_is_unix(os) result(unix)
.
.
unix = build_os /= OS_WINDOWS
end function os_is_unix becomes

Becomes

logical function os_is_unix(os) result(1)
.
.
1 = build_os /= OS_WINDOWS
end function os_is_unix

I got everything to compile by changing all occurences of the logical variable unix to unix_ but
I still get a couple of warnings.

ie

fpm-0.6.0.F90(5150): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
read(nan_string,'(g3.3)')valu
----------------------------^
fpm-0.6.0.F90(13432): warning #6843: A dummy argument with an explicit INTENT(OUT) declaration is not given an explicit value. [SELF]
subroutine new_keyval(self)
----------------------^
ld: /tmp/ifortUNxRu0.o: in function fpm_filesystem_mp_get_temp_filename_': /mnt/Work/FPM/fpm-0.6.0.F90:10050: warning: the use of tempnam' is dangerous, better use `mkstemp'

and yes I know I could use gfortran but I prefer to use intel.

Expected Behaviour

It should have compiled from the start

Version of fpm

0.6.0 fpm-0.6.0.F90

Platform and Architecture

Linux Mint 20.3 (Ubuntu 20.04 base) X86-64

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions