To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 2346
2345  |  2347
Subject: 
Re: Makefile command to make *.map files
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Sat, 9 Mar 2002 00:54:49 GMT
Viewed: 
2005 times
  
I had a similar problem with the "sort" program apparently not
functioning and then someone kindly looked at my error output and
pointed out that I should make sure that the CYGWIN bin path was added
to the FRONT of my path as declared in my autoexec.bat

Otherwise, the OS was trying to use the first sort command it found in
the /windoes directory as opposed to the Unix sort command in the Cygwin
package.  That took care of my problem and LegOS as worked flawlessly
ever since.

Dave

Ed Manlove wrote:

For clarity I am running under Win98 using CYGWIN tools as outlined by the
instructions "LegOS0.2.4 - Instructions for installing on NT/Win9x with
Cygwin".  I was looking for help on the sort command using $sort --help but
I was getting a similar error message.  I just discovered that using the
option /? gave me the help for sort.  This slightly confussed me because all
that I have learned about cygwin tools is that --help gives you the help.
And as I checked my system sort is also a dos command.  So the dos command
is taking precedence over the cygwin command. I have fixed this by adding in
Makefile.common another define CYGWINTOOLPREFIX as shown below

#
# WindowsNT/Cygnwin, test against several values:
#
ifneq (,$(findstring $(OSTYPE),cygwin32 CYGWIN_NT-4.0 WindowsNT Windows_NT))

# NT
TOOLPREFIX=/cygnus/cygwin-b20/H-i586-cygwin32/bin/h8300-hms-
CYGWINTOOLPREFIX=/cygnus/cygwin-b20/H-i586-cygwin32/bin/
SED_SFLAG=i

endif

And then in the rules for building the kernel in Makefile.kernel I modified
the rule for building map files to

# how to make map files
%.map: %.coff
        $(NM) $*.coff | $(CYGWINTOOLPREFIX)sort -u > $*.map

This solved my problem and solved another common issue for which I will make
another posting about.  Thanks for the hint there Geoff.

Ed

In lugnet.robotics.rcx.legos, Geoff Gerrietts writes:
Quoting Ed Manlove (emanlove@ieee.org):
What is the sort command doing in the command to create *.map files within
the Makefile.kernal?

# how to make map files
%.map: %.coff
     $(NM) $*.coff | sort -u > $*.map

Doing my build I get the following error and the resulting map file has size
zero.

/cygnus/cygwin-b20/H-i586-cygwin32/bin/h8300-hms-nm legOS.coff | sort -u > legOS
.map
SORT: File <-U> not found

I can't speak for absolute certain about this, not being familiar with
that part of the code, but sort -u is used to unique a list of
strings. That is, if you pipe a file:

spam
spam
spam
eggs

through sort -u, you get back

eggs
spam


It looks like the "sort" on your system doesn't grok -u tho.

--G.



Message is in Reply To:
  Re: Makefile command to make *.map files
 
For clarity I am running under Win98 using CYGWIN tools as outlined by the instructions "LegOS0.2.4 - Instructions for installing on NT/Win9x with Cygwin". I was looking for help on the sort command using $sort --help but I was getting a similar (...) (22 years ago, 8-Mar-02, to lugnet.robotics.rcx.legos)

4 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR