This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
RE: assembler messages...
- To: "'luca dot spinacci at marconicomms dot com'" <luca dot spinacci at marconicomms dot com>, binutils at sourceware dot cygnus dot com
- Subject: RE: assembler messages...
- From: David Korn <dkorn at pixelpower dot com>
- Date: Wed, 14 Mar 2001 14:31:46 -0000
>Can anyone let me know what means "Assembler messages: for
>reading.open :NO such
> file or directory" ?
It means you've got the wrong kind of line ends in your makefile, and
somehow the carriage return (because DOS uses CR-LF, but Unix and Cygwin
expect only LF) has been treated as a filename, so when the assembler tries
to open the file it fails (you cannot have a file named CR)
--------
Cannot open <filename> for reading.
<filename>: No such file or directory
-----------
it prints the carriage return instead of the filename, giving
--------
Cannot open
for reading.
: No such file or directory
-----------
except that since this is a CR without LF, the second part of each line
prints on top of the first part, so you see
--------
for reading.open
: No such file or directory
-----------
When you're building under Cygwin it's always a good idea to keep your
source code in a directory that is mounted in text mode (as long as there
aren't any binary files going in there!). Alternatively you can create a
file called /bin/dos2unix, containing this code:
#!/bin/sh
cp $1 $1.dos && tr -d '\015' <$1.dos >$1 && rm $1.dos
and make it runnable by executing
chmod ugo+x /bin/dos2unix
and you can then say 'dos2unix <filename>' any time you get this problem
again.
DaveK
--
All your base are belong to us!
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************