Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28445 Discussions

nm tool not recognizing object file format

Kunal_Rao
Novice
1,629 Views
Hi
I am trying to compile parallel netcdf in cygwing ev. on Windows using Intel compilers. I've made some changes in the "configure script" and it is proceeding for some time and then stops with this error message:
-------------
checking for C-equivalent to Fortran routine "SUB"... nm: conftest.obj: File format not recognized
-------------
That portion of the configure script is as follows:
-------------

{ echo "$as_me:$LINENO: checking for C-equivalent to Fortran routine \\"SUB\\"" >&5

echo $ECHO_N "checking for C-equivalent to Fortran routine \\"SUB\\"... $ECHO_C" >&6; }

cat >conftest.f <<\\EOF

call sub()

end

EOF

doit='$FC -c ${FFLAGS} conftest.f'

if { (eval echo "$as_me:$LINENO: \\"$doit\\"") >&5

(eval $doit) 2>&5

ac_status=$?

echo "$as_me:$LINENO: \\$? = $ac_status" >&5

(exit $ac_status); }; then

FCALLSCSUB=`$NM $NMFLAGS conftest.$OBJEXT | awk '

/SUB_/{print "SUB_";exit}

/SUB/ {print "SUB"; exit}

/sub_/{print "sub_";exit}

/sub/ {print "sub"; exit}'`

case "$FCALLSCSUB" in

'') { { echo "$as_me:$LINENO: error: not found" >&5

echo "$as_me: error: not found" >&2;}

{ (exit 1); exit 1; }; }

;;

*) { echo "$as_me:$LINENO: result: $FCALLSCSUB" >&5

echo "${ECHO_T}$FCALLSCSUB" >&6; }

;;

esac

else

{ { echo "$as_me:$LINENO: error: Could not compile conftest.f" >&5

echo "$as_me: error: Could not compile conftest.f" >&2;}

{ (exit 1); exit 1; }; }

fi

-------------------

So, basically the "nm" tool is not able to recognize the file format of the object file produced by Intel compiler (v11.1.067 ). It works with gcc.
I am working on Windows Server 2008, Enterprise Edition. Compiler info is as follows:
-------------------
Intel Visual Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20100806 Package ID: w_cprof_p_11.
1.067
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
-------------------
Any clues on how to resolve this ?
Thanks & Regards,
Kunal
0 Kudos
3 Replies
mecej4
Honored Contributor III
1,629 Views
Cygwin provides a 32-bit environment. Tools such as nm, etc., that are developed for Cygwin are also 32-bit binaries, and do not support objects and *.exe files that target 64-bit Windows versions. The Cygwin FAQ states "..As far as we know no one is working on a native 64 bit version of Cygwin". You are welcome to contribute to Cygwin and help provide this capability.
0 Kudos
TimP
Honored Contributor III
1,629 Views
A first step, if you're contributing to cygwin, might be to modify make so that it is possible to substitute Microsoft or mingw-x64 tools under AR, NM, and the like. What do people do when running mingw-x64 under Cygwin?
0 Kudos
Kunal_Rao
Novice
1,629 Views
Thanks for your reply. That gave me some hints.
mingw-x64 has its own nm tool ( /usr/bin/x86_64-w64-mingw32-nm.exe ) under cygwin for x-64. When I used this nm tool (for object files compiled with intel compiler) then it worked !!
Thanks & Regards,
Kunal
0 Kudos
Reply