Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

using ifort with cygwin

Blane_J_
New Contributor I
747 Views

Hi,

I'am using windows version fo ifort compiler with cygwin system. The link problem has been solved by editing the ifort.cfg configuration file, but it seems ifort still could not recognize unix-like paths which start with '/'. The following command line generates an error message:

> ifort -c /home/operation/test.f90 -o /home/operation/test.exe

ifort: command line warning #10006: ignoring unknown option '/home/operation/test.f90'

ifort: command line error: no files specified; for help type "ifort /help" 

There willl be no error if relative path was used. Someone please help, thanks.

0 Kudos
9 Replies
Steve_Lionel
Black Belt Retired Employee
747 Views

See https://software.intel.com/en-us/articles/alias-method-for-using-intel-windows-compilers-under-cygwin-bash-shell/

There used to be a -unix option that told the ifort command to ignore forward slashes in paths, but it does not seem to be recognized in the current versions. Maybe Lorri will see this and comment.

Blane_J_
New Contributor I
747 Views

Steve Lionel (Ret.) wrote:

See https://software.intel.com/en-us/articles/alias-method-for-using-intel-w...

There used to be a -unix option that told the ifort command to ignore forward slashes in paths, but it does not seem to be recognized in the current versions. Maybe Lorri will see this and comment.

Thanks Steve, It seems as is, then I have to try some workaround maybe.

TimP
Black Belt
747 Views

cygwin has utilities to translate path representations, if that is what you want.  It's also possible to make Microsoft style paths using \ escape sequences, but it's ugly and error prone.  In case you've forgotten what a posix shell does, the first \ is swallowed as an escape character.

Blane_J_
New Contributor I
747 Views

Tim P. wrote:

cygwin has utilities to translate path representations, if that is what you want.  It's also possible to make Microsoft style paths using \ escape sequences, but it's ugly and error prone.  In case you've forgotten what a posix shell does, the first \ is swallowed as an escape character.

Thanks Tim, now I'm able to compiler single Fortran source file using ifort. As metioned in the thread given by Steve above, in auto build system(autotools, cmake...etc.) there is still lack of support for ivf.

gib
New Contributor II
747 Views

I don't know if this will be of use to you, but Code::Blocks is a very configurable cross-platform free IDE.

http://www.codeblocks.org/

Blane_J_
New Contributor I
747 Views

gib wrote:

I don't know if this will be of use to you, but Code::Blocks is a very configurable cross-platform free IDE.

http://www.codeblocks.org/

Thanks gib, I'll have a try.

TimP
Black Belt
747 Views

I don't know why cmake wouldn't work.  I and others have used standard make for years.  cygwin doesn't change any defaults; you could use builds set up in cygwin sources for examples.  For example, a minimum override of detaults for make:

FC  = ifort

CC = icl

FFLAGS = -O3 -fpp -align:array32byte -debug:inline-debug-info -Qunroll:4 -standard-semantics -Qopt-report-file=$*_opt.txt

.SUFFIXES:      .obj .f90

although Microsoft link accepts .o with warnings.

The following isn't the way most people would go, but I use make rules like:

target:   mains.obj subs.obj 

             mv mains.exe $@.exe

             mv mains.pdb $@.pdb

.f90.obj:

            $(FC) $(FFLAGS) -c $*.f90

cygwin build setups will show how to set up $@.exe correctly; it might be considered a bit ugly after you add -Fe$@

Actually, you can use either / or - in FFLAGS as the shell doesn't interpret inside there.

I think Steve L has indicated his disapproval of adding options like -assume:underscore,old_maxminloc -names:lowercase but they do work.

I don't know whether cmake for Windows has default rules which differ from the ones for cygwin or linux.  If you don't install cygwin cmake, you should be able to run the Windows one.

 

Blane_J_
New Contributor I
747 Views

Yes, Tim, standard make may work fine by using relative paths or other strategies but the big difference for cmake tool is that it would use absolute path in its generated make file which the windows version of ivf cannot recognize properly so it may sometimes fail.

Lorri_M_Intel
Employee
747 Views

RE: "-unix" switch

That is not supported with Intel Fortran; it was a legacy switch from the Digital/Compaq Visual Fortran days.

 

Reply